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




On Sun, 10 Mar 2002, Tony Lambley wrote:
>
> There may already be an easy way of doing scs2pdf. It's occurred to me that
> you can create a remote outq on the 400 to LPR the spooled file to your nix
> box running LPD, which can then generate your PDFs via a ghostscript filter
> in printcap.

Ghostscript produces non-searchable PDFs.  When we were discussing
"ps2pdf", that's what we were talking about.  ps2pdf is a shell script
that comes with ghostscript, it calls gs with the appropriate
parms to make a PDF.

It does not matter whether you're using lp5250d to get the data to the
PC or whether you use LPR directly from the AS/400.  (Except that page
ranges, and some other spool attributes don't work with straight LPR, and
that you have to configure LPR as a remote outq instead of a local
printer, which breaks compatability with a lot of software) In either
case, it transports the data to the PC, and you still face the same problem,
that of making a searchable PDF out of it.

>
> The host print transform option will convert SCS to ASCII.

Err... you're right that you don't need a seperate program to convert to
ASCII when sending with LPR.

I don't think it's done by HPT, HPT inserts printer sequences for things
like fonts & page orientation, etc.   I think LPR actually does the scs
to ascii conversion itself.

Or, at least, if you're using lp5250d with HPT, the data still arrives in
SCS format, and you still have to filter it through scs2ascii to remove
the SCS stuff from the stream.

>
> Anyone have any experience of filters in printcap?
>

Setting up a filter in printcap is quite easy.  You just do something
like :if=/path/to/filter:  to your printcap entry, and lpd will send
the spooled file to that filter's stdin, and then send the output to
the printer.

So, if your goal is to make PDF's that way, you'd need to write a
trivial shell script that first converts the input to postscript, then
sends it on to ghostscript to make into a PDF.

Maybe use something like:

pdf|PDF generator:\
        :sh:\
        :lp=/dev/null:sd=/path/to/spooldir:lf=/path/to/logfile:\
        :if=/path/to/myscript.sh:

then myscript.sh could be something as simple as (not tested):

        a2ps -q -o - | ps2pdf13 > /path/to/output.pdf


But, again this would not solve the "searchable" problem.  And, in any
case, it's a lot more complicated than simply typing:

lp5250d env.DEVNAME=PDF 'outputcommand=scs2pdf>/path/to/output.pdf' as400




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.