Page 1 of 1
Generate PDF files
Posted: Thu Mar 18, 2021 11:20 am
by baleyjk
Is there any way to natively generate a PDF file on OpenVMS v8.4-2L1? I looked at Xpdf documentation but it appears to be a product to display PDFs on graphics terminals. What I'm looking for is to create a PDF within OpenVMS, even if a 3rd party product is involved.
If not, then what we plan to do is to drop files into a Windows directory from VMS then have a Windows app check the contents and convert text files into PDF using Windows application.
Re: Generate PDF files
Posted: Sat Mar 20, 2021 12:26 am
by sms
Code: Select all
> Is there any way to natively generate a PDF file on OpenVMS v8.4-2L1?
> [...]
"generate"? Starting with what?
> [...] I looked at Xpdf documentation [...]
How about Ghostscript (ps2pdf)? I haven't looked lately at its
availability on VMS, but it has been available in the past.
I'd also guess that DCPS could generate PostScript from something.
https://vmssoftware.com/products/decprint-supervisor/
Re: Generate PDF files
Posted: Mon Mar 22, 2021 2:22 pm
by tomwade
Hi,
For converting text files to PDF, you could try text2pdf. A version for OpenVMS was posted by Craig some time ago in the thread referenced by
https://community.hpe.com/t5/Operating- ... -p/5527537
I used text2pdf for converting simple text files to PDF, and it seemed to work OK.
Tom Wade
Re: Generate PDF files
Posted: Mon Mar 22, 2021 6:00 pm
by sms
Code: Select all
> For converting text files to PDF, you could try text2pdf. [...]
There's more than one program with that name. I found one old
(1996), free version at:
http://www.eprg.org/pdfcorner/text2pdf/text2pdf.c
A modern compiler is happier, and the output more consistent, with a
couple of minor changes:
$ gdiff text2pdf.c_orig text2pdf.c_mod
38c38
< #define LINE_END '\015' /* CR used in xref table */
---
> #define LINE_END '\012' /* LF used in xref table */
65c65
< unsigned char buf[1024];
---
> char buf[1024];
No bets on the quality of its output, but Preview on a Mac seemed to
tolerate the output from:
pipe text2pdf -h | text2pdf > text2pdf.pdf
Re: Generate PDF files
Posted: Mon Mar 22, 2021 6:15 pm
by brett.cameron
The text2pdf utility is a good option for converting existing text files to PDF. If something a bit more dynamic is required, our Python distribution (see
https://vmssoftware.com/products/python/) includes the open source ReportLab (see
https://www.reportlab.com/opensource/), which could be an option, or if you need to do something programmatically from C code, then something like libharu (
http://libharu.org/) could be an option.
Re: Generate PDF files
Posted: Thu Jan 13, 2022 6:08 pm
by cricket_player
I have an working executable, used to convert Broadcom's performance advisor postscript generated performance files.
https://www.ghostscript.com/doc/9.53.3/ ... nstall_VMS
It needs some tweaks to get it to work.
Regards,
Z