This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Set default paper size for "print to file (PDF)"

Tags: None
(comma "," separated)
geewilliam
Registered Member
Posts
26
Karma
0
OS
I have not found a way to do this ... Every time I use the "Print to file (PDF)" feature, I have to change the paper size from A4 to letter. Where is this default configured?

Thanks - Bill Gee

Operating System: Fedora Linux 35
KDE Plasma Version: 5.23.4
KDE Frameworks Version: 5.89.0
Qt Version: 5.15.2
Kernel Version: 5.15.14-200.fc35.x86_64 (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i5 CPU 760 @ 2.80GHz
Memory: 15.6 GiB of RAM
Graphics Processor: NVIDIA GeForce GT 710/PCIe/SSE2
User avatar
Mamarok
Manager
Posts
6071
Karma
16
OS
Try the Configuration settings in System Settings - Hardware -> Printers


Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ...
geewilliam
Registered Member
Posts
26
Karma
0
OS
No help there. The Printers page in System settings does not have an entry for "Print to file (PDF)". it has only the two physical printers.

I tried to create a new "print to file" printer device. No luck, the very first question is the network address or physical port of the printer device.

Bill Gee
dzon
Registered Member
Posts
493
Karma
3
In which application do you have to change it? Nearly all applications are set to A4 by default. O, sorry, reread the post. So no, I believe there's no default letter option. At least, not in system settings.


This realm's name is Maya. And she speaks Hertz. But Ahamkara makes a fuzz about it.
geewilliam
Registered Member
Posts
26
Karma
0
OS
I have to change it in EVERY application where it appears. A few examples - Kate, KMail, KOrganizer, Tellico, Okular, Gwenview, LabPlot, Marble, KStars.

The option "Print to file (PDF)" does not appear in every application. Firefox and LibreOffice, for example, do not show it. Both of those applications have their own method of printing to a PDF file.

Bill Gee
User avatar
Mamarok
Manager
Posts
6071
Karma
16
OS
geewilliam wrote:No help there. The Printers page in System settings does not have an entry for "Print to file (PDF)". it has only the two physical printers.

I tried to create a new "print to file" printer device. No luck, the very first question is the network address or physical port of the printer device.

Bill Gee

You do not have to look for an entry for "print to file", that is just an option in the browser, but set the existing printers to the correct paper size there.


Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ...
User avatar
Section_8
Registered Member
Posts
61
Karma
0
OS
As a possible alternative, install cups-pdf (https://www.cups-pdf.de/). This creates a virtual printer in CUPS that prints to a PDF. This printer DOES have a configurable entry in the System settings printers tab.
geewilliam
Registered Member
Posts
26
Karma
0
OS
Maybe Nate Graham needs to see this - It is one of his "15 minute problems" in KDE.

For Mamarok - The existing laser printer is already set to letter as the default paper size. It was a problem some years ago, until a bug in QT got fixed. The second printer is a label printer, so paper size default is a non-issue.

For Section_8 - I will give that a try. It would be nice to have a print-to-pdf driver that works in all applications. I recently had a need for a print-to-text driver, too. For that I found a work-around. Maybe there is a cups driver for it.

Bill Gee
geewilliam
Registered Member
Posts
26
Karma
0
OS
Update - I installed the cups-pdf package from the Fedora repository. It does indeed allow setting a default paper size. However, the driver does not work.

Bring up an application - get a document for printing. From the print dialog select Cups-PDF printer. Click the 3 dots next to the file name, then enter the file to print to. As soon as I click OK on that dialog, it switches to the "Print to file (PDF)" driver.

When I did the installation of the package, it produced a warning that cups printer drivers are deprecated.

Code: Select all
Downloading Packages:
cups-pdf-3.0.1-14.fc35.x86_64.rpm                                                       228 kB/s |  42 kB     00:00   
------------------------------------------------------------------------------------------------------------------------
Total                                                                                    23 kB/s |  42 kB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                1/1
  Installing       : cups-pdf-3.0.1-14.fc35.x86_64                                                                  1/1
  Running scriptlet: cups-pdf-3.0.1-14.fc35.x86_64                                                                  1/1
lpadmin: Printer drivers are deprecated and will stop working in a future version of CUPS.

  Verifying        : cups-pdf-3.0.1-14.fc35.x86_64                                                                  1/1

Installed:
  cups-pdf-3.0.1-14.fc35.x86_64                                                                                         

Complete!
User avatar
Section_8
Registered Member
Posts
61
Karma
0
OS
geewilliam wrote:Bring up an application - get a document for printing. From the print dialog select Cups-PDF printer. Click the 3 dots next to the file name, then enter the file to print to. As soon as I click OK on that dialog, it switches to the "Print to file (PDF)" driver.


Interesting - I see that also, but only in the KDE print dialog. In non-KDE applications (Firefox, for example), the print dialog for PDFprinter does not let you choose the output PDF file name, it is generated. In the KDE print dialog, if I select ANY printer (physical or virtual), and then select a file name, the printer is automatically switched to "print to file".

In my installation of cups-pdf (gentoo), you can set the cups-pdf output directory in /etc/cups/cups-pdf.conf (as the OUT setting). The pdf is a generated file name in that directory.
geewilliam
Registered Member
Posts
26
Karma
0
OS
I think I figured out how to print through the cups-pdf driver. This is a case where the cure might be worse than the disease. Even when printing at 150 dpi, the files produced are over 4 times larger than those made by the KDE "Print to file (PDF)" driver. Dang ... And I was going to gripe about how big they were!

Bill Gee


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], Google [Bot], Sogou [Bot]