[cups.general] CUPS 1.4.2 on CentOS6: Problems with -o fitplot option

Jan Hubený hubeny at soma.cz
Mon Nov 7 01:40:49 PST 2011


Dne 4.11.2011 16:17, Helge Blischke napsal(a):
> Jan Hubený wrote:
>
>> Hello,
>>
>> we have problems with printing postscript (or pdf) files with the -o
>> fitplot option on our server.
>>
>> Our server configuration is following
>>
>> CentOS 6, CUPS 1.4.2, ghostscript 8.70
>>
>> when we tested  the fitplot option with following commands:
>>
>> lpr -Pprinter -o fitplot  test.ps
>> lp -d printer test.ps -o fitplot
>>
>> It seems that the option fitplot is completely ignored. The printer
>> output is same as without this option. Further, it is not problem of one
>> specific printer, the behaviour is same on all 40 printers in our company.
>>
>> Moreover we suppose that the problem  is in the CentOS distribution of
>> CUPS because of this two reasons:
>>
>> 1) We test the cups print server with the identatical configration
>> (files in /etc/cups/) and ppd's on Ubuntu server and the fitplot option
>> works correctly on this configuration.
>> 2) We have found a Redhat EL5 bug report which is quite similar to our
>> problem and CentOS 6 is just free RedHat EL6 recompilation.
>>     for the bug report see
>>     https://bugzilla.redhat.com/show_bug.cgi?id=629932
>>
>> Finally, my questions:
>>
>> 1) Did anybody in this conference solve this problem (on CentOS6)? How
>> (workaround)?
>> 2) Is there a way how to test where in the cups filter chains is the
>> fitplot option ignored on my server?
>>
>>
>> With regards,
>>
>> Jan Hubeny
>>
>>
>>
>>
>> __________ Information from ESET Mail Security, version of virus signature
>> database 6593 (20111101) __________
>>
>> The message was checked by ESET Mail Security.
>> http://www.eset.com
> Jan,
>
> thanks for the files. Looking into the input file (test.ps) reveals that the
> page setup section of the (only) page contains the statement
> 595 842 /a4 setpagesize
> which forces the printer to use an A4 page size ignoring whatever  the
> pstops filter might have inserted in the global setup section. Thus the
> PostScript job itself cancels any fit-to-page implementation by the pstops
> filter.
> Moreover, the pstops filter does the page fitting by computing the scale
> factor for page fitting from both the specified media size (job options of
> default page size from the PPD) and the job's bounding box. As both of them
> specify A4 page size, there is in fact no scaling to do.
>
> What did you expect instead?
Helge,

  thank you for the notification that in the source file is the ps 
statement which forces the printer to use A4 page. I check our printing 
command chain and I have solved my problem with ignored fitplot option. 
Those who are interested can read further:

Our company has a huge database of postscript technical drawing. The 
drawings are in ISO DIN formats A0 to A4. A0 and A1 plots are quite 
often printed fitted on A3 or A4 printers. For this task we have several 
utils on our file server.

Therefore consider an input technical drawing postscript file:

http://www.uschovna.cz/zasilka/D43R2ZB6FJ3SY56S-A45

this file is in A1 format. In order to print it on A4 printer we run 
following commands (extracted from our printing utils...):

psresize -q -W2383 -H1683 -w595 -h842  input_A1.ps intermediate_result_a4.ps
gs -q -dNOPAUSE -dSAFER -sPAPERSIZE=a4 -dEPSFitPage -sDEVICE=pswrite 
-sOutputFile=final_A4_result.ps intermediate_result_a4.ps -c quit

the first command resizes the drawing from A1 to A4 but it preserves the 
A11 paper format,
The second gs command crop the A1 paper to A4 paper.

I don't know why, but the second command adds the statement

595 842 /a4 setpagesize

to the resulting file.

Therefore we add a script, which comments  out such statements in the 
resulting file and the fit-to-page (fitplot) option now works perfectly. 
I know that this is not the most clever solution but I do not know how 
force the gs interpreter to not add the statement "595 842 /a4 
setpagesize".

Jan

> Helge
>
> _______________________________________________
> cups mailing list
> cups at easysw.com
> http://lists.easysw.com/mailman/listinfo/cups




__________ Information from ESET Mail Security, version of virus signature database 6606 (20111106) __________

The message was checked by ESET Mail Security.
http://www.eset.com






More information about the cups mailing list