[cups] setting margins when printing a ps (postscript) file

Helge Blischke helgeblischke at web.de
Thu Feb 19 07:07:58 PST 2015


Wiothout fiddling around with the mime types or implementing a special filter, 
the following PPD modification will settle the issue (tested):

After the line

*cupsDNMPSupplies:	False

insert the line:

*JobPatchFile 1:	"<</BeginPage {pop -24 0 translate}>>setpagedevice“

and revert to the original imageable area line.

This will every rendered line shift 24 points to the left (adjust the „24“ to your real needs).
BTW, the second integer (the „0“ here) specifies the vertical shift if needed.

NOTE:
That your PDF workaround really works on your system is, I think, a design bug in
the pdftopdf filter (found from looking into the sources), as it shifts the coordinate
origin to the lower left corner of the PDF’s trim box if the option fit-to-page (or fitplot)
is specified. How the ImateableArea line from the PPD modifies the trim box, I could
not determine; I suspect that is due to a SuSE specific patch.
 
> Am 19.02.2015 um 11:37 schrieb Istvan Gabor <suseuser04 at freemail.hu>:
> 
> Istvan Gabor írta:
> 
>> What I don't know what to write exactly in the PsPrefilter file.
>> I tried
>> 
>> #! /bin/bash
>> 
>> ps2pdf -sPAPERSIZE=a4
>> 
>> but it did not work. I don't know how to write the script.
>> 
>> Could you please give hint?
> 
> By trial and error I could make a working filter.
> The filter contains this:
> 
> #! /bin/bash
> # have the input at fd0 (stdin) in any case
> [ -n "$6" ] && exec <"$6"
> ps2pdf -sPAPERSIZE=a4 - -
> 
> 
> Regards,
> 
> Istvan
> _______________________________________________
> cups mailing list
> cups at cups.org
> https://www.cups.org/mailman/listinfo/cups




More information about the cups mailing list