|
On Fri, 30 Apr 2010, mail@xxxxxxxxxxxxxxxxxxxx wrote:
The config:It looks like you have a very recent version of tn5250 built from cvs.
print-30 {
host= 192.168.0.10
map= 273
env.DEVNAME= D30
outputcommand= scs2pdf >> /tmp/as400pdf/d30-$$.pdf
}
The trace looks like this:
lp5250d version 0.17.5, built on Apr 21 2010
Some time ago a change went in to cvs that fixes a problem with page sizes
and various SCS protocol options. That change requires an initialization
file. I tested without the initialization file and it crashed lp5250d.
Looks like I have a bug to fix.
To fix your problem (and improve the results for scs2pdf) create an empty
file somewhere (like /tmp/pdfprintinit) and then use the -i option to
scs2pdf like this:
outputcommand = scs2pdf -i /tmp/pdfprintinit >> /tmp/as400pdf/d30-$$.pdf
scs2pdf will populate this file with the data it needs. This should stop
lp5250d from crashing.
Note on why scs2pdf needs an initialization file:
The System i (AS/400, iSeries, etc.) only sends page configuration
information when a writer is first started and on every form type change.
Since lp5250d spawns a new instance of scs2pdf every time it receives a
print job, scs2pdf needs some way to remember what the previous page
configuration was since most likely that information won't be sent.
lp5250d doesn't have any SCS protocol handling code itself, it simply
passes the print stream directly to whatever command is specified in the
outputcommand parameter. Without a way to remember what the last page
configuration is, scs2pdf can only guess what the current page size should
be and usually that guess is wrong. If scs2pdf receives the page
configuration from the host, it writes it to the file specified using the
-i argument. When lp5250d first starts, it starts the writer and page
information will be sent and scs2pdf can simply fill an empty file with
page data.
I'm sure there is a better way to do this. Obviously a crash in lp5250d
is not the right thing to do. I'll see if I can get a patch this weekend
to make this better. In the mean time, simply create the file as
instructed and you'll be fine (and your PDFs will be sized correctly).
James Rich
if you want to understand why that is, there are many good books on
the design of operating systems. please pass them along to redmond
when you're done reading them :)
- Paul Davis on ardour-dev
As an Amazon Associate we earn from qualifying purchases.
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.