Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Output positioning options used by Gimp when printing to CUPS
#1
I am trying to figure out what CUPS (or would it be lpd/lpr?) printing options Gimp uses to set the output position when you print an image.
When you set the Left/Top fields in the "Position" print dialog tab, I guess Gimp uses some job printing options through CUPS/lpd/lpr to adjust the output image on the media. 
I need this information so that I can try to print images (outside Gimp) in the same position regardless of the printer being used.

Does anyone have this information?

Thanks.
Reply
#2
I can not really comment on Windows printing, the Gimp print.exe plugin that links to the Windows printer driver is old and not that good.

Linux using CUPS (providing your printer is supported) should be better.Choose the paper size, set the left / top margins. If measuring from the edge of the paper, enable that marginless option. https://i.imgur.com/PKQANQ0.jpg

Again using CUPS (Providing your printer is supported and the Gimp Gutenprint plugin is in the repo) The Print with Gutenprint gives a few more options. Still uses Top and Left margins from the edge of the paper. https://i.imgur.com/D27hs5s.jpg

You can check basic printer settings from your browser
Code:
http://localhost:631/admin
https://i.imgur.com/h9oZJTE.jpg

Using Windows or linux often better to use LibreOffice to set up a page + image for printing.
Reply
#3
(01-18-2022, 01:40 PM)rich2005 Wrote: I can not really comment on Windows printing, the Gimp print.exe plugin that links to the Windows printer driver is old and not that good.

Linux using CUPS (providing your printer is supported) should be better.Choose the paper size, set the left / top margins. If measuring from the edge of the paper, enable that marginless option. https://i.imgur.com/PKQANQ0.jpg

Again using CUPS (Providing your printer is supported and the Gimp Gutenprint plugin is in the repo) The Print with Gutenprint gives a few more options. Still uses Top and Left margins from the edge of the paper. https://i.imgur.com/D27hs5s.jpg

You can check basic printer settings from your browser http://localhost:631/admin  https://i.imgur.com/h9oZJTE.jpg

Using Windows or linux often better to use LibreOffice to set up a page + image for printing.

Thanks for your reply, Rich. 
You gave me good advice on how to do what I want from within Gimp but I am trying to do that from an application I am creating. 
So, I went through your directions to generate a print job on Cups and then I opened the job file (they are saved to var/spool/cups) and inspected the printing options that Gimp used but could not find any that seems to control the image positioning on the media.
This is what I am investigating: what options Gimp uses on the command line it sends to Cups in order to obtain the precise positioning of the image on paper.
Reply
#4
Dont know for your exact requirements but the gutenprint setup uses a straight
Code:
lp -s -d "printername
-s page size and -d the destination printer.
So I assume that gimp formats the image and exports the whole page as a postscript file to /var/spool/cups/
No need to go there, Gimp will print straight to a postscript file, https://i.imgur.com/pHMjihL.jpg and that can be printed.
Code:
lpr -P "printername" -l output.ps
where -l is for a preformatted page. Best check the parameters with 'man lpr;

No idea if that works, never tried it
Reply


Forum Jump: