Page 1 of 1

CUPS-PDF and paper size

Posted: Tue Nov 24, 2009 6:21 am
by di98jgu
Hey

Have problems with CUPS-PDF.

Would like to create PDF using CUPS-PDF. "Print_to_PDF" works but gives a Letter sized document. I want A4 but can't change the paper size anywhere. Have tried to create a new PDF printer using the driver "Generic CUPS-PDF Printer" instead of "Local Raw Printer". But this does not work, gives a blank page. Also I notice that the standard size is Letter everywhere in Mint while I use A4.

Thus I have two questions:
- How to set the default paper-size for the entire system, A4 in my case?
- How to generate PDF documents using CUPS-PDF in A4 size?

The later is the most important one.

Greatfull for any ideas to solve this issue.

Re: CUPS-PDF and paper size

Posted: Tue Nov 24, 2009 10:11 am
by DrHu
Whichever application created the source document that you want to print pdf mode, set the size in that application, it should come out A4 (when set there)
http://omgili.com/jmp/.0rSU5LtMgyWCDEGm ... AxM5xREmY-
  • Re: changing paper type when printing to file
    by Soul Singin' ยป 2009-04-30 17:50
    Two solutions. One, you can change your system's default paper size. For example, I live in the US, so the contents of my /etc/papersize file is: "letter". You can change that value to "a4" or "legal" or whatever you like.

    Second solution: Print it to PDF as you normally do, then resize it with PDFedit. A convenient way to do that is to use the Perl script below. (Save it to /usr/local/bin/pdfrsrs and make it executable).
https://bugs.launchpad.net/ubuntu/+sour ... bug/346781

pdfedit is in the Mint repository
in terminal, check
  • apt search pdf
    p pdfedit - Editor for manipulating PDF documents
    p pdfjam - collection of PDF document handling utilit
    p pdfposter - scale and tile PDF images/pages to print o
    p pdfsam - PDF Split and Merge
    p pdftk - useful tool for manipulating PDF documents

Re: CUPS-PDF and paper size

Posted: Tue Nov 24, 2009 6:41 pm
by di98jgu
Hey

Thanks DrHu, got a step forward today in getting Mint behaving to my will. :wink:

The first link was part of the solution. The /etc/papersize file is one of this small hard to find configuration files that make things happen. The driver "Local Raw Printer" generate A4 now.

Should add here that it might be needed to set the SUID permission for /usr/lib/cups/backend/cups-pdf file. I had to do so. Why CUPS-PDF need this is a interesting question.

The second solution pointed out above, resize the document, is to cumbersome for me. But I have used the pdftk tool earlier and can recommend it. Just the the possibility to manipulate the metadata is very neat.