Operating System - OpenVMS
1753731 Members
4547 Online
108799 Solutions
New Discussion юеВ

Re: Text to PDF converter for OpenVMS Integrity

 
Phil VanKley
Occasional Contributor

Text to PDF converter for OpenVMS Integrity

I am looking for a text-to-pdf converter that will run on VMS Integrity V8.3-1H1. I'd like to be able to convert my text-based report files, for example, to a PDF file by using a DCL command. Ideally, a command where I pass in the input text file as an argument and the output pdf filename as another argument.

In scanning through various resources, I have come across two possibilities that may work, but I'd like more information about them, if possible.

Option #1 is "text2pdf", which I obtained from http://eisner.decus.org/~berry_c/TEXT2PDF.ZIP. This zip file only contains a single C source file. I was hoping to obtain some additional information about how to use this. For example, can arguments be specified in a command to dictate whether the output PDF should be created in landscape vs portrait mode, for example? I'm looking for the command options, essentially.

Option #2 is "txt2pdf" from http://www.sanface.com/. I have never used Perl, so this is a little foreign to me. I'm assuming I would need to install the Perl for OpenVMS product on the Integrity system, and then go through a build procedure of this application on the VMS system? Can anyone point me to any instructional documentation about how to setup and use this on VMS?
8 REPLIES 8
Hoff
Honored Contributor

Re: Text to PDF converter for OpenVMS Integrity

Joseph Huber_1
Honored Contributor

Re: Text to PDF converter for OpenVMS Integrity

For the sanface txt2pdf product (commercial), why not simply read and follow their installation instructions on
http://www.sanface.com/txt2pdf.html#installing
?
They mention VMS , and it seems to be nothing more than unpacking the distribution into a directory, and to edit the configuration file to Your taste.
Of course, as a perl program, it needs Perl as a prerequisit.
Sanface txt2pdf seems to offer much more formatting options than the simple opensource text2pdf.
http://www.mpp.mpg.de/~huber
Craig A Berry
Honored Contributor

Re: Text to PDF converter for OpenVMS Integrity

The help text that Hoff points to is also available by simply running the program:


$ mcr []text2pdf -h

text2pdf [options] [filename]

text2pdf makes a 7-bit clean PDF file (version 1.1) from any input file.
It reads from standard input or a named file, and writes the PDF file
to standard output.

There are various options as follows:

-h show this message
-f use PostScript (must be in standard 14, default: Courier)
-I use ISOLatin1Encoding
-s use font at given pointsize (default 10)
-v use given line spacing (default 12 points)
-l lines per page (default 60, determined automatically
if unspecified)
-c maximum characters per line (default 80)
-t spaces per tab character (default 8)
-F ignore formfeed characters (^L)
-A4 use A4 paper (default Letter)
-A3 use A3 paper (default Letter)
-x independent paper width in points
-y independent paper height in points
-2 format in 2 columns
-L landscape mode
-ml left margin in points
-mt top margin in points

Note that where one variable is implied by two options, the second option
takes precedence for that variable. (e.g. -A4 -y500)
In landscape mode, page width and height are simply swapped over before
formatting, no matter how or when they were defined.

text2pdf v1.2 (c) Phil Smith, 1996
Jerry Alan Braga
Occasional Advisor

Re: Text to PDF converter for OpenVMS Integrity

I have created and posted my version of the command file. It is written in c and needs to be compiled on ia64. I wrap this routine around a command file of the same name. I tweaked the version in order to pass an argument that will detect the length of a record from the text file and pass this to the converter. From their the c code creates the correctly scaled document P80 L100 L132
Goto <> and cut and paste this into a txt2pdf.com and txt2pdf.c
abrsvc
Respected Contributor

Re: Text to PDF converter for OpenVMS Integrity

Jerry,

The link you provided results in a "story not found" message.

Dan
Phil VanKley
Occasional Contributor

Re: Text to PDF converter for OpenVMS Integrity

Thanks for the pointer to the help information for text2pdf. I'm having a challenge getting the conversion to do what I want. I have a 132-character width report that was produced by a COBOL application on the VMS system. There is a form-feed character separating each page.

I want a PDF report created from this in landscape mode. I've tried a few iterations of commands, and always get a PDF file with a single report line per page. I've tried the following commands:

$ text2pdf -L report132.rpt >report132.pdf
$ text2pdf -L -c152 report132.rpt >report132.pdf

Any suggestions?

I also have some wider reports (198 characters) that need to be converted to PDF. Will I be able to do this with this tool?
Joseph Huber_1
Honored Contributor

Re: Text to PDF converter for OpenVMS Integrity

I can't verify the problem with text2pdf:
it produces a page when either the number of lines per page is reached, or a formfeed character is encountered (unless -F option).
Your problem is either:
the file contains a formfeed for each line (verify with and editor).
or
the "-L" option arrives as "-l" ,, leading to 1 line per page.
Try: text2pdf "-L" ,
If that succeeds then Your DCL and/or CRTL parsing rules are set to make all unquoted arguments to arrive lower case in the C arguments.

$ show process/parse_style
if it is "Traditional" do
$ SET PROCESS/PARSE=EXTENDED

and
$ DEFINE ├В DECC$ARGV_PARSE_STYLE "ENABLE"

to see the difference with unquoted options.

Second question: longer lines can of course be handled, but text2pdf only can set a fixed maximum line length: You have to decide the value of the "-c" option, eventually adjust the fontsize using the "-s" option.
http://www.mpp.mpg.de/~huber
Joseph Huber_1
Honored Contributor

Re: Text to PDF converter for OpenVMS Integrity


Sorry, pasted an additional character in the define statement above, it should read:
$ DEFINE DECC$ARGV_PARSE_STYLE "ENABLE"


http://www.mpp.mpg.de/~huber