× 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 like this approach, it is pretty simple to implement by your own, it will eventually survive system upgrades as well.

One thing that I just recalled, is that for some reason, it will not work all the time with Client Access Emulated Printers.

Jorge Merino

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Mike Cunningham
Sent: Friday, October 15, 2010 9:50 AM
To: Midrange Systems Technical Discussion
Subject: RE: Forms printing

This sounds perfect. Thanks. Will give it a try. I never know I could FTP to a spool file

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Jorge Merino
Sent: Friday, October 15, 2010 11:06 AM
To: Midrange Systems Technical Discussion
Subject: RE: Forms printing

Hi Mike:

I love simplicity, where the user can do anything right from the IBM i box.

I'm successfully printing PDFs created in our IBM I box directly a Printers attached to it, either in the local network or remote printers and it works really well.

So, here is my advice in simple steps:
1) Convert the PDF to PCL using ghostscript.
2) Transfer the PCL file to a Printer File Defined as *USERASCII Device Type, using FTP.
3) Move the new spool file created to the IBM i Printer of you desire.

------------------------------------------
The instructions for those simple steps are:

1) Download GPL Ghostscript 8.54, precompiled for Unix, but will run on PASE http://computer-refuge.org/classiccmp/aixpdslib/pub/ghostscript/RISC/5.3/exec/

2) Download ghostcript Standard Type 1 base fonts http://code.google.com/p/ghostscript/downloads/detail?name=ghostscript-fonts-std-8.11.tar.gz&can=2&q=
2.1) Use 7z under windows to untar from .gz into .tar both files.

3) Open Filezilla, FTP the .tar files into /QopenSys

4) Open PASE on the System i: CALL PGM(QP2TERM)

5) tar -xvf "ghostscript.8.54.tar"
It untar it directly into the Folder needed.

6) tar -xvf "ghostscript-fonts-std-8.11.tar.gz"

7) On Regular IBM i Command line, add the environment variable:
ADDENVVAR ENVVAR(GS_LIB) VALUE('/QOpenSys/usr/local/bin:/QOpenSys/usr/local/share/ghostscript/8.54/lib:/QOpenSys/usr/local/share/ghostscript/8.54/Resource/fonts')
export GS_LIB=/QOpenSys/usr/local/bin:/QOpenSys/usr/local/share/ghostscript/8.54/lib:/QOpenSys/usr/local/share/ghostscript/8.54/Resource/fonts
set GS_LIB=/QOpenSys/usr/local/bin:/QOpenSys/usr/local/share/ghostscript/8.54/lib:/QOpenSys/usr/local/share/ghostscript/8.54/Resource/fonts

8) Execute the conversion:
CALL QP2SHELL2 PARM('/QOpenSys/usr/local/bin/gs' '-dQUIET' '-dBATCH' '-dNOPAUSE' '-sDEVICE=ljet4' '-sOutputFile=/temp/file.pcl' '/home/jorge/ShapesExamples-rpg.pdf')
/QOpenSys/usr/local/bin/gs -dQUIET -dBATCH -dNOPAUSE -sDEVICE=ljet4 -sOutputFile=/temp/file.pcl /home/jorge/ShapesExamples-i.pdf


8.a) If you want to test it on your windows environment:
set path = %PATH%;C:\Users\Jmerinoh\Documents\FIN\ghostscript\8.54\usr\local\share\ghostscript\8.54;C:\Users\Jmerinoh\Documents\FIN\ghostscript\8.54\usr\local\share\ghostscript\8.54\lib;C:\Users\Jmerinoh\Documents\FIN\ghostscript\8.54\usr\local\share\ghostscript\8.54\Resource\fonts

gs -dQUIET -dBATCH -dNOPAUSE -sDEVICE=ljet4 -sOutputFile=C:\Users\Jmerinoh\Documents\FIN\FTP\file.pcl C:\Users\Jmerinoh\Documents\FIN\FTP\AR0760RU-072310-20574348.NML.PDF


9) Duplicate QSYSPRT as YOURLIB/qsyspdf and change to DEVTYPE(*USERASCII)

10) Transfer using FTP
FTP localhost
namefmt 1
binary
put /temp/file.pcl /qsys.lib/YOURLIB.lib/qsyspdf.file

11) Move the spool file generated to a Laser Printed attached over the network on the System i.

----
After you are done with your testing, you might want to automate the steps 8,9,10 and 11.

Hope it helps.

Jorge Merino

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Mike Cunningham
Sent: Friday, October 15, 2010 7:52 AM
To: Midrange Systems Technical Discussion
Subject: RE: Forms printing

Change of direction a little on the topic. But does anyone know of a way to print a PDF document without user interaction? I have an existing RPG app that writes a spool file with an overlay and creates an AFP print file. I then have a tool that will convert that spool file to PDF and currently send the PDF to the user who has to open it and print it (sometimes). The user wants to sometimes email, sometimes fax and sometimes print and mail the form. How they get the PDF in an email and forward to the vendor, or email to our fax server as an email or open it and print it. I would like to try and ask them when they request the print what they want to do with it and directly email to the vendor or the fax server or direct the PDF to a printer in the user office. I know one option would be to get an AFP capable printer for this office but the use might expand to possibly dozens of other offices. We have a big Xerox printer connected to a Sun server and on that we can FTP to the server and it will automatically print the document. I might also be able to setup a Windows PC to accept incoming commands from the iSeries and FTP to the PC then send a command to print the PDF to the printer but I really would prefer to do this without that complexity added and just go direct form the iSeries to the printer.

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Charles Wilt
Sent: Friday, October 15, 2010 9:36 AM
To: Midrange Systems Technical Discussion
Subject: Re: Forms printing

Overlays are _ALWAYS_ full page...

If you want just pieces of pages, you need to create page segments instead of overlays.

HTH,

Charles


On Fri, Oct 15, 2010 at 1:06 AM, PaulMmn <PaulMmn@xxxxxxxxxxxxx> wrote:
Overlays can be full page bitmaps as described above, or they can be
smaller pieces (ie your logo/letterhead) that you position on the page
wherever you need it.  This doesn't need to be a full page bitmap.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.


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.