[Info-vax] OpenVMS printing to PDF

JF Mezei jfmezei.spamnot at vaxination.ca
Wed May 20 12:50:07 EDT 2015


On 15-05-20 05:11, Dirk Munk wrote:

> If we could do the same thing with PDF, then you could design a PDF form 
> with any tool you like, and then use a somewhat FMS-like utility to make 
> the data fields in that form available to an application. The 
> application can fill the data fields, and the issue a command to write 
> the PDF page/file.



/myform {
/name exch def
/city exch def
/country exch def
/product exch def

700 200 moveto (Acme Incorporated) show
600 200 moveto (Name: ) show  name show
580 200 moveto (Lcation: ) show city show (, ) show country show
400 200 moveto (enclosed is the product you purchased: ) show product
(show)
showpage
} def

%% end of prologue

%% the following code is generated by the app for each record

(Road Runner catching kit) (Canada) (Montréal) (Jean-François Mezei)
myform



this is pure postscript and you can create subroutines that do all the
work, like FMS and the application only needs to supply the values
followed by the name of the subroutine. When executed by the postscript
processor it draws a page for each "record" written by the app.

For more complex stuff, you have a routine that draws the boilerplate
with logos and customer info. and a sepaate routine to write the list of
items purchased. And the routine counts lines and when it gets to bottom
of page, generates a new one and calls the header routine to redraw the
logo etc and continues to add items.

The Cobol app only needs to generate very simple output and not be
concerned with form. And the postscript code could also have bilingual
support so when the customer language is French, then the postscript
uses text from the "French" variables/arrays to draw the form etc.
Again, separates this from the  app itself.

Note that this has nothing to do with PDF itself. You can add pdfmark
operator wich allows one to set many PDF attributes to the document.



More information about the Info-vax mailing list