× 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.



Lucia - that looks nice - let me show you what we used to do, using PCL -

First we use an override of QPRINT - OVRPRTF FILE(QPRINT) DEVTYPE(*USERASCII) PAGESIZE(88 127) LPI(8) CPI(15) plus some other parameters like SPLF name.

The following command converts the PDF to an IFS file that contains PCL, notice the -sDEVICE=ljet4 option (QShell can execute commands in PASE) -

// "Print" PDF to PCL using GhostScript - PAPERSIZE & FIXEDMEDIA are included to force letter size
cmdStr = 'qsh cmd(''/QOpenSys/var/opt/freeware/bin/gs -dBATCH -dNOPAUSE -q -sDEVICE=ljet4 -sPAPERSIZE=letter -dFIXEDMEDIA -sOutputFile=' + pclName + ' ' + pdfName + ''')';

IFS file is copied to a single-column PF that is 80 long, 65535 CCSID. That file is copied to QPRINT after override.

I hope that is complete enough!
Vern

On 8/11/2021 10:20 AM, Maria Lucia Stoppa wrote:
Hi all,

I try to recap all the tests I made and the results I got from these tests,
and I hope I can express myself properly enough to describe the constraints
under which the tests were taken.

The 3 printers I have used for the tests are:
P1: a physical very old HP Laser Printer P2055dn at the office, where my
colleague is today and helped me from;
P2: a physical new HP Color Laserjet Pro M283dwf at home, where today I am
working from. The printer and my physical PC as well, are in my home LAN so
I can print without any problem. From my physical PC I opened a remote
desktop session to my virtual PC at the office (Windows 10) where I run all
the software, ACS included. All the physical resources of my PC are shared
with the remote desktop; so, the physical printer is seen as:
P2.1) a properly HP Color Printerjet Pro from ACS printer session 2
(meaning: every spool should automatically transit from the remote desktop
printer queue to the physical one, then printed from here)
P2.2) a HP GENERIC PCL6 printer to FILE from ACS printer session 1
(meaning: every spool file generates a file.prn which I manually copy to
and print from the physical PC)

Here are the tests I did.

1) METHOD 1 - Printing PDF Stream Files to an IPDS or ASCII Laser Printer
that Does Not Support Direct PDF Printing
This method is what Roberto suggested to me in his answer, though there
were a few inaccuracies in those articles.
The original IBM link is this:
https://www.ibm.com/support/pages/printing-pdf-stream-files-ipds-or-ascii-laser-printer-does-not-support-direct-pdf-printing

I literally followed all the instructions in there, except I created a
generic final out queue so that the APF spool files can easily be moved to
any desired printer. I underline literally. To produce the AFP spool file
from a PDF file in the IFS both methods (FTP to out queue or read from
IFS/write to out queue) result the same:
- P1 prints garbage
- P2.1 prints nothing
- P2.2 prints as expected (wow! the file.prn is 19 Kb only)

2) METHOD 2 - Using Ghostscript to convert a PDF to a PS, then write it to
a laser printer that does not support direct PDF printing
I do have a little knowledge of Linux so I followed your advice and
installed open software libraries via ACS: no problem at all.
Also, Ghostscript is available among other packages, so I installed it from
ACS too: easy peasy.
Then I launched pdf2ps to convert my PDF file to a PostScript file in the
IFS as till now the system lacks the nc command; then I just FTPed (too
curious to wait) the PS file to the out queue.
The results are:
- P1 prints as expected (wow wow! though it takes a while to print the
spool file)
- P2.1 prints nothing
- P2.2 prints as expected (great, but the file.prn is 504 Kb, much bigger
than the former)

Final considerations
I am pretty sure I did some mistakes here and there, I mean I can't see any
acceptable reason why the first method should not work on P1 too. As a
matter of fact, I run a test with a second newer printer at the office with
the same result, but I know very little about the system AFP printing
process.
Anyway, processing a PS spool file seems to engage more the printer (and
the original PDF is very small, just a few lines and an image), so I think
I will further investigate both methods to find the one that best suits our
needs.

I know this is a long email, but hope it helps others.

Thank you all

Lucia



Il giorno mer 11 ago 2021 alle ore 13:48 Vern Hamberg <
vhamberg@xxxxxxxxxxxxxxx> ha scritto:

Hi Lucia

We have GhostScript installed, I don't remember whether it is installed
in PASE, since I am not looking at the system. We installed several
years ago. We used it to convert PDFs to a PCL file in the IFS, which we
copied to a *USERASCII PRTF in some fashion - didn't know about Scott's
tool for printing from the IFS. This was done because a vendor product
did not support the AFPRSC keyword in PRTFs. CPYSPLF to *PDF does
support that keyword, so this was all we could do - worked very well,
except that performance suffered because what used to be done on a
separate server that the vendor product used, a lot of that processing
was now done in our job on the i. Performance did not suffer because of
using GhostScript alone, there were several other steps involved that
used to be done on another box - you probably don't have that situation
to be concerned about.

I don't remeber that it was difficult to install GhostScript, it was
using something with repositories in the early days of open source
support on the system - and since it is all open source, support and
troubleshooting means we go to the web and other resources, not IBM.
Maybe now that it can be installed with yum, there is more support from
IBM. And IBM do have a support process available for all kinds of
products and open source applications, for a fee, of course.

On 8/10/2021 10:31 AM, Maria Lucia Stoppa wrote:
Hi Patrick,

Yes, installing Ghostscript (in PASE) would be a great solution as it
doesn't imply to have printers updated with a specific card to obtain
direct print feature: the *USERASCII stream to the printer will be
already
formatted in PCL.

The point is the only experience I have with PASE is 7z program
installation to zip/unzip files which I did following a link by Scott
Klement (as far as I remember).

What makes me feel uncomfortable with this solution is that I haven't
found
any clear instruction page yet alongside with the fact that I know very
little about PASE, so I am asking myself what to do in case of trouble,
since Ghostscript installation seems to be a bit more complicated than
7z.
Anyway, I will think about it.

Thanks

Il giorno mar 10 ago 2021 alle ore 17:10 Patrik Schindler <
poc@xxxxxxxxxx>
ha scritto:

Hello Maria,

Am 10.08.2021 um 14:54 schrieb Maria Lucia Stoppa <mlstoppa@xxxxxxxxx>:

Given the holidays time we are in I am waiting for the maintainance
service to call on us to help configure the Ricoh, hopefully, because I
don't know what's needed to have this feature and how to install it.

I'm not well-seasoned with modern printers, but usually the firmware can
deduct itself what's inside a print job and act on that accordingly.

As mentioned by Roberto and John, Ghostscript (in PASE) could be a
solution. Usually, it's installed with some helper scripts providing a
pdf2ps command, amongst others. Almost all modern printers understand
PostScript, so it comes down to convert a PDF via GhostScript to
PostScript, and upload that via FTP to the printer. Maybe the *USERASCII
method hinted by Vern can be used to not needlessly fiddle with FTP.

You can even optimize that stuff by using UNIX style pipes and netcat in
QSH:

cat pdffile |pdf2ps - - |nc printer-ip 9100

No tempfiles, thus no unnecessary disk I/O avoided. :-)

:wq! PoC

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

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com

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

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.