coniguration of pdftops

Helge Blischke h.blischke at srz.de
Fri Mar 9 10:32:27 PST 2007


Franz Pfoertsch wrote:
> Helge Blischke wrote:
> 
> 
>>Franz Pfoertsch wrote:
>>
>>>Thanks for help Helge,
>>>
>>>I took your pdftops.conf and but it into /etc/cups/.
>>>restarted the cupsd and send a A5 PDF-printjob to the
>>>printer.
>>>at the cups error log
>>>---8<----
>>>I [08/Mar/2007:19:08:10 +0100] Started filter
>>>/usr/lib/cups/filter/pdftops (PID 27874) for job 135.
>>>I [08/Mar/2007:19:08:10 +0100] Started filter /usr/lib/cups/filter/pstops
>>>(PID 27875) for job 135.
>>>I [08/Mar/2007:19:08:10 +0100] Started backend
>>>/usr/lib/cups/backend/socket (PID 27876) for job 135.
>>>E [08/Mar/2007:19:08:10 +0100] [Job 135]
>>>pdftops-options: -cfg /etc/cups/pdftops.conf
>>>---8<----
>>>
>>>but the printer did not ask about a different papersize.
>>>
>>>What is wrong?
>>>
>>>regards
>>>Franz
>>
>>pdtops implicitely sets <</Policies <</PageSize 3>> >> setpagedevice
>>(though syntactically slightly different). That instructs the
>>PS interpreter to use the nearest available media size the logical page
>>will fit in and shrink the logical page if needed.
>>
>>I don't know of an option to modify this behaviour. If it is vital to you,
>>I'd suggest to file a change request to the author of xpdf.
>>
>>Helge
>>
>>
> 
> Hello 
> 
> i tried it via commandline using pdftops from xpdf and it worked.
> 
> 
>  /usr/bin/pdftops  -paper match abc.pdf abc.match.ps
>  /usr/bin/pdftops               abc.pdf abc.nomatch.ps
> 
> the difference inside of the ps files is:
> 5,6c5,6
> < %%DocumentMedia: plain 596 420 0 () ()
> < %%BoundingBox: 0 0 596 420
> ---
> 
>>%%DocumentMedia: plain 612 792 0 () ()
>>%%BoundingBox: 0 0 612 792
> 
> 2357c2357
> < 596 420 false pdfSetup
> ---
> 
>>612 792 false pdfSetup
> 
> 2362a2363
> 
>>8 186 translate
> 
> 
> when I try to do the same with pdftops from cups
> /usr/lib/cups/filter/pdftops 1 2 3 4 5 abc.pdf >abc.ps
>  modify the /etc/cups/pdftops.conf to psPaperSize match
> /usr/lib/cups/filter/pdftops 1 2 3 4 5 abc.pdf >abc_match.ps
> 
> when I do a diff abc.ps abc_match.ps there is no difference.
> 
> I am using cups 1.1.20, is there a known problem?
> 
> regards
> Franz
> 
> 

If your Linux distro uses the "alternate pdftops filter", then it should
log the used configuration file to the error_log, and the filter itself
is a Perl script. It should start like
---snip---
#!/opt/perl/bin/perl -w
# pdftops.pl - wrapper script for xpdf's pdftops utility to act as a CUPS filter
# ==============================================================================
# 1.00 - 2004-10-05/Bl
#       Initial implementation
# 1.10 - 2006-09-27/Bl
#       Alternatively, use Adobe Reader in place of Xpdf's pdftops
#
# Copyright: Helge Blischke / SRZ Berlin 2004-2006
# This program is free seoftware and governed by the GNU Public License Version 2.
#
# Description:
# ------------
#       This program wraps the pdftops utility from the xpdf 3.00 (and higher) suite
#       to behave as a CUPS filter as a replacement for the original pdftops filter.
#       As an alternative the Adobe Reader may be used.
#
---snip---

Helge

PS: without the -paper match the pdftops utility uses the default letter media size.
That is what your diff reveals.

-- 
Helge Blischke
Softwareentwicklung

H.Blischke at acm.org




More information about the cups mailing list