apple / cups

Apple CUPS Sources
https://www.cups.org
Apache License 2.0
1.85k stars 452 forks source link

Margin issue from postscript file - cups filters v1.28+ #6197

Open ditikos opened 3 weeks ago

ditikos commented 3 weeks ago

I am using a proprietary application that generates a postscript file for a receipt printer (compatible to star TSP 700II) since ubuntu 16.04 (using cups-filters v: 1.8.3-2ubuntu3.5 ). The paper size for the receipt is 80mm x 210mm (minimum height)

The receipt was printing fine etc, but for support reasons we had to bump up the operating system to ubuntu 22.04 LTS (using cups filters v: 1.28.15-0ubuntu1.2)

Now the problem that occurs is that the receipt is always being printed in a set width/height instead of continuous variable height, always being shrink to fit, having large margin and this is a major defect for our upcoming release. I did saw the comment on the github page (https://github.com/OpenPrinting/cups-filters?tab=readme-ov-file#image-printing-default-changed-to-scale-to-fit) but I don't know how to apply this to the postscript filters being used in order to fix the printing issues we are having.

I have run this for the cups filters to be listed in the process:

cupsfilter -d RP-700-U-1 -c /etc/cups/cupsd.conf -p /usr/share/cups/model/rp700.ppd -m printer/foo -e --list-filters /etc/nsswitch.conf
cupsfilter: File "/usr/lib/cups/filter/rastertorp700" permissions OK (0100755/uid=0/gid=0).
texttopdf
pdftopdf
gstoraster
rastertorp700

having rp700.ppd the printer ppd and the rastertorp700 the application that is used to print the raster data. The bottom line is, how do I remove the shrink-to-fit from the postscript file and set this to the functionality that pre exists v1.28 of cups filters (also tested in with 1.27.4-1ubuntu0.2/Ubuntu 20.04 and works as the one in 16.04).

I am also attaching two printer ppd that exhibit the same issue.

tsp700II.ppd.txt rp700.ppd.txt

jschwender commented 3 weeks ago

You might set options on lpr command line, or making them default for specific printers by using lpoptions command: https://www.cups.org/doc/options.html#OPTIONS

To get back to the old behavior, supply one of the options "print-scaling=none", "nofitplot", "filplot=Off", "nofit-to-page", or "fit-to-page=Off".

ditikos commented 2 weeks ago

I did that but I still get the margins, especially on the top side while in pdf this is not happening. I was able to control the scaling that was limiting the print to be on one specific paper size though via the print-scaling=none / print-scaling=fit option. But I still have the top margin issue which is my initial one.

Any other suggestions? I am using thermal printers for that in case this has to do anything and I don't think there is any support in the IPP ones.

On Sun, 28 Apr 2024 at 15:47, jschwender @.***> wrote:

You might set options on lpr command line, or making them default for specific printers by using lpoptions command: https://www.cups.org/doc/options.html#OPTIONS

To get back to the old behavior, supply one of the options "print-scaling=none", "nofitplot", "filplot=Off", "nofit-to-page", or "fit-to-page=Off".

— Reply to this email directly, view it on GitHub https://github.com/apple/cups/issues/6197#issuecomment-2081474372, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADVKUS2A7M6MTZH7SVMOT3Y7TVXVAVCNFSM6AAAAABG2L3L36VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBRGQ3TIMZXGI . You are receiving this because you authored the thread.Message ID: @.***>