× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I'm using CGIDEV2 to send postscript to a printer. Not much experience yet, but seems to work very well. The way I do it is to define the postscript commands in the source file where the HTML usualy goes and in the RPG write just like a normal web page, except for the headings, I send "type=text/print", the browser does not know what to do, so when it asks I select "lpd" to procces this type of data. During the tests I selected ghostview. By giving reasonable defaults to the variables I can see the source mask in ghostview. Here is part of a file as example, it is very likely you can do something similar for pdf:
__________________________________________________________________________________

%!PS-Adobe-3.0
/!_pssuc_! {(Central) show} def
%%_ top _%%
%%DocumentMedia: A5 420 595 () ()
%%BeginSetup
%%PaperSize: A5
%%EndSetup
%%EndComments

%% cuadrito de referencia
/curva {5 arcto 4{pop} repeat} def
newpath
.90 setgray
18 45 moveto
18 577 lineto
402 577 lineto
402 45 lineto
closepath stroke

%%_ cabe _%%
newpath
230  80    moveto
/Helvetica-Narrow-Bold 16 selectfont
(EDITORIAL AZETA S.A.) show
/Helvetica 10 selectfont
240 94 moveto (Yegros 745 - Tel. 415 1000) show
240 103 moveto (ASUNCION - PARAGUAY) show

70 80 moveto
!_pssuc_!

%%_ pie _%%
showpage

%%_ fin_de_archivo_impdocu _%%
_________________________________________________________________________________________________

Jim Horn wrote:

Thanks for the great examples.  I will be trying them all.

We also use a tool (Coolspools) to create pdf/html/whatever from spool
files.  The new system will basically allow the existing report program to
be called from either greenscreen or browser, change the access method to
sql and send the report back to the user either via the printer he selected
or via html or pdf.  Almost no changes required to the original program to
do it.  Trying to make it a "fill in the blanks" kind of conversion so we
can use the same code a few hundred times.

Would like to write it directly from the spool file to the web if I had a
tool.  Will look into it with our tool provider to see if they have
suggestions.

If any of you are unhappy with your spool to pdf/html/excel
converter/emailer, we've been happy with this one and the support has been
great.  Works with generated sql statements also.

As a 30 year rpg developer who is just making the transition to the web,
your help is invaluable.  Many thanks.

Jim



message: 7
date: Thu, 28 Dec 2006 14:03:12 -0600 (CST)
from: Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx>
subject: Re: reading pdf/html from ifs send via cgidev2

Howdy Mr. History Channel,

Need some assistance on the retrieve from the ifs and send back vis cgi
part.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.