Page 1 of 2

[SOLVED] Printing to PDF produces blank PDFs

Posted: Fri Apr 29, 2011 5:59 am
by xircon
Apparently solved see last posts, doesn't seem to work for me, but I have heavily modified my system, so probably my fault :)

Trying to print a webpage to PDF, but it produces blank pdf. Tried from Gedit, same problem. Libreoffice works, completely stumped! Any thoughts on how to approach this?

Re: Printing to PDF produces blank PDFs

Posted: Fri Apr 29, 2011 9:45 pm
by Lostwithaclue
I use cups-pdf for printing to pdf, it is in the repository and hasn't failed me yet.

Re: Printing to PDF produces blank PDFs

Posted: Thu Jun 09, 2011 11:32 am
by PepeCyB
I think it is a problem with cups-pdf version 2.5.1. Just uninstall version 2.5.1, then install version 2.5.0. Now it should work again. To prevent the automatic update just attach as root the lines

Code: Select all

Package: cups-pdf
Pin: version 2.5.0*
Pin-Priority: 1000
at file/etc/apt/preferences.

Daniel

Re: Printing to PDF produces blank PDFs

Posted: Tue Jul 05, 2011 11:38 pm
by bobbomo
I am also having the same issue with Print to PDF creating a blank file (GPL Ghostscript 0.01, PDF-1.4).

LibreOffice/OpenOffice use they're own PDF driver in PDF-1.4 format.

Until we figure out this issue, Print to File works creating PDF files (cairo 1.10.2, PDF-1.5).

Re: Printing to PDF produces blank PDFs

Posted: Sat Jul 30, 2011 3:37 pm
by D6MCK
Same here, primarily from Firefox, but also seen from Chrome. Completely fresh Katya64 install with all updates applied.

Thanks for the Print to File => PDF workaround. Be nice to see the Print to PDF option working though!

Re: Printing to PDF produces blank PDFs

Posted: Sat Jul 30, 2011 3:55 pm
by jeffreyC
I fixed it in my system by changing the default printer from PDF to PDF1
I had to edit /etc/cups/printers.conf as root to do it

Re: Printing to PDF produces blank PDFs

Posted: Sun Sep 04, 2011 7:02 am
by WillGolfForFood
I fixed this problem today on my system. Using Mint 11, Firefox 6.0.1, Opera and Chrome.
1. Launch your printer panel in the administration and printing.
2. Select the print to PDF "printer".
3. In Settings, select the change button on the Make and model setting.
4. First one that is highlighted is "Generic (recommended)". Choose it / Forward.
5. First one that is highlighted is "Cups-PDF (recommended)". The driver is Generic CUPS-PDF Printer (recommended). Choose it / Forward.
6. Use the new PPD. Apply.
7. Select the print test page to confirm the output lands in your home folder (or wherever you have it configured to go).

If this fixes you problem, mark it solved (so others can find it quickly).
Cheers.

Re: Printing to PDF produces blank PDFs

Posted: Mon Sep 05, 2011 11:49 am
by gosa
WillGolfForFood wrote:I fixed this problem today on my system. Using Mint 11, Firefox 6.0.1, Opera and Chrome.
1. Launch your printer panel in the administration and printing.
2. Select the print to PDF "printer".
3. In Settings, select the change button on the Make and model setting.
4. First one that is highlighted is "Generic (recommended)". Choose it / Forward.
5. First one that is highlighted is "Cups-PDF (recommended)". The driver is Generic CUPS-PDF Printer (recommended). Choose it / Forward.
6. Use the new PPD. Apply.
7. Select the print test page to confirm the output lands in your home folder (or wherever you have it configured to go).

If this fixes you problem, mark it solved (so others can find it quickly).
Cheers.
That one worked for me alright...
- Thanks!

Re: [SOLVED] Printing to PDF produces blank PDFs

Posted: Tue Sep 06, 2011 5:32 am
by xircon
I get a cups server error, press cancel, click change again, this time it runs through as described, I click apply but nothing happens, it does not go any further. But have marked as solved as the print to file work-a-round works for me.

Re: [SOLVED] Printing to PDF produces blank PDFs

Posted: Sun Sep 11, 2011 9:18 am
by downhillschrott
1. Launch your printer panel in the administration and printing.
2. Select the print to PDF "printer".
3. In Settings, select the change button on the Make and model setting.
4. First one that is highlighted is "Generic (recommended)". Choose it / Forward.
5. First one that is highlighted is "Cups-PDF (recommended)". The driver is Generic CUPS-PDF Printer (recommended). Choose it / Forward.
6. Use the new PPD. Apply.
I had the same problem: Firefox produced blank pages when I wanted tp print a pdf. It worked neither with "print to pdf" nor with "print to file" and choosing pdf. I was not able to print a "test page" too.

However the above worked for me with the following change:

In the printer panel I had to make antoher setting just to be able to choose the OK button, eg. change "printer options" - "resolution" to 150dpi.
Click Ok.
Made a print with Firefox and it was ok. Test print was now ok, too. Changed the "resolution" back to 300dpi and it worked.

Don't know why and how. Thank you for this solution.

System: Linux Mint 11 (kataya) GNOME 2.32.1 Firefox 6.0.2

Re: [SOLVED] Printing to PDF produces blank PDFs

Posted: Sun Sep 25, 2011 5:13 am
by xenopeek
This is a bug in /etc/cups/printers.conf file as configured by cups-pdf package from default install.

How found:
1. sudo apt-get purge cups-pdf
2. sudo apt-get install cups-pdf
And suddenly print to PDF works.

Doing a diff on the files, and some trial & error, these are the changes needed to your /etc/cups/printers.conf file to make print to PDF work.

1. Stop cups:

Code: Select all

sudo initctl stop cups
2. Edit the printers.conf:

Code: Select all

gksudo gedit /etc/cups/printers.conf
3. Search for the line:
<Printer Print_to_PDF>
And replace it with:

Code: Select all

<DefaultPrinter PDF>
Filter application/vnd.cups-raw 0 -
Filter application/vnd.cups-command 0 commandtops
Filter application/vnd.cups-postscript 0 -
(Yes, you add three lines below it also.)
4. Save & close the file, then restart cups:

Code: Select all

sudo initctl start cups
Done. Now instead of "Print_to_PDF" you select the "PDF" printer (no clue about this, but without this exact same name it won't print!).

Lastly, it is setup to print two pages on one sheet. Not very readable output, so if you want remove the four options at the end of that block to have just one page per sheet:
Option number-up 2
Option orientation-requested 4
Option outputorder normal
Option scaling 95

Re: [SOLVED] Printing to PDF produces blank PDFs

Posted: Sun Sep 25, 2011 5:48 am
by xircon
Vincent

sudo initctl start cups not working here:

Code: Select all

sudo initctl start cups
sudo: initctl: command not found
Can't find in Synaptic either.

Steve

:Edit:
sudo /etc/init.d/cups restart will restart cups. TBH I have had enough of this, print to file works, so I just give up :) More important fish to fry.

Re: [SOLVED] Printing to PDF produces blank PDFs

Posted: Sun Nov 06, 2011 6:31 pm
by JackWelch55
The above steps fixed the 'blank PDF' problem.

However now the file name is a random number, previously the file name was the document|webpage title.

And now images are black boxes.

Re: [SOLVED] Printing to PDF produces blank PDFs

Posted: Wed Jan 25, 2012 7:16 am
by iwbnwif
1. Launch your printer panel in the administration and printing.
2. Select the print to PDF "printer".
3. In Settings, select the change button on the Make and model setting.
4. First one that is highlighted is "Generic (recommended)". Choose it / Forward.
5. First one that is highlighted is "Cups-PDF (recommended)". The driver is Generic CUPS-PDF Printer (recommended). Choose it / Forward.
6. Use the new PPD. Apply.
7. Select the print test page to confirm the output lands in your home folder (or wherever you have it configured to go).
These steps worked for me :D , but there are a few points that are not quite clear (at least as a beginner).
1. Launch your printer panel in the administration and printing
I am not sure what is intended here, but I used CUPS web interface, i.e. http://localhost:631 so these are alternative descriptions:
  • Select "Administration" from the top menu and then the "Manage Printers" button under "Printers"
  • You may need to enter your username and password
  • In the list of "Queue Name" select Print_to_PDF
  • From the "Administration" dropdown (note: not the menu bar "Adminstration" but the drop down under Print_to_PDF) select modify printer
  • This will update the page to show a list of connections. Leave it unchanged as "cups-pdf://" - click Continue
  • The page will update again to show a description for the printer, you can leave these or change them as you like, then click Continue
  • Finally the page will update again to allow the make and model selection. This is where you can select the "Generic" make and the CUPS-PDF Printer(en) driver.
  • Press "Modify Printer" and hopefully your PDF printer will work!

Re: [SOLVED] Printing to PDF produces blank PDFs

Posted: Tue Feb 07, 2012 9:42 pm
by mordant23
I followed the previous instructions for the web interface but I had to make one modification. Instead of choosing Generic CUPS-PDF driver, I had to choose Generic Postscript driver. There were two choices but it's not listed in the driver's name. One is gray scale and the other is color. On my system, the second choice in the menu is the color. Then I restarted cups for good measure (not sure if I needed to) with:

Code: Select all

sudo stop cups
sudo start cups
I got the idea to try the Postscript driver from the README file in the latest tarball.
Now you will be able to choose "CUPS-PDF (Virtual PDF Printer)" when
setting up a new printer in CUPS (a CUPS-restart may be necessary).
To set up a queue for other UNIX clients you should select Postscript as
vendor and the Color Printer as model for your new printer;

Re: [SOLVED] Printing to PDF produces blank PDFs

Posted: Wed Mar 07, 2012 3:44 am
by pvigoureux
This worked first time. I didn't have to change anything.

Thanks WillGo.

(by WillGolfForFood on Sun Sep 04, 2011 7:02 am

I fixed this problem today on my system. Using Mint 11, Firefox 6.0.1, Opera and Chrome.
1. Launch your printer panel in the administration and printing.
2. Select the print to PDF "printer".
3. In Settings, select the change button on the Make and model setting.
4. First one that is highlighted is "Generic (recommended)". Choose it / Forward.
5. First one that is highlighted is "Cups-PDF (recommended)". The driver is Generic CUPS-PDF Printer (recommended). Choose it / Forward.
6. Use the new PPD. Apply.
7. Select the print test page to confirm the output lands in your home folder (or wherever you have it configured to go).

If this fixes you problem, mark it solved (so others can find it quickly).
Cheers.

WillGolfForFood)

Re: [SOLVED] Printing to PDF produces blank PDFs

Posted: Sun Mar 18, 2012 2:05 pm
by papaneuf
I simply added another printer and named it print to pdf2 and it works. However files that I had downloaded under the previous printer are still blank, even though they retain their file names. Anyone know the fix for this? These are important files for me. Thanks...

Re: [SOLVED] Printing to PDF produces blank PDFs

Posted: Fri Mar 30, 2012 11:08 am
by Troken
Thank you WillGolfForFood, it worked.

However, the big question is how can this problem still be around? I use LMDE and Mint 12, both still have this problem. Please Linux Mint developers, can't you try to fix this, once and for all?

Re: [SOLVED] Printing to PDF produces blank PDFs

Posted: Sat May 05, 2012 11:05 am
by krustybaguette
iwbnwif wrote:
1. Launch your printer panel in the administration and printing.
Menu/Control Center/Hardware/Printing (Mint 11 Katya)
2. Select the print to PDF "printer".
3. In Settings, select the change button on the Make and model setting.
Right click "Print-to-PDF" choose "Properties"
4. First one that is highlighted is "Generic (recommended)". Choose it / Forward.
5. First one that is highlighted is "Cups-PDF (recommended)". The driver is Generic CUPS-PDF Printer (recommended). Choose it / Forward.
6. Use the new PPD. Apply.
After step 6. there is no "Finish" button so I just closed the dialog and went back to the web page I wanted to print to PDF.
There it was in my home folder.
7. Select the print test page to confirm the output lands in your home folder (or wherever you have it configured to go).
These steps worked for me :D , but there are a few points that are not quite clear (at least as a beginner).
Worked for me as well. As a newbie I looked for exact descriptions "Properties" is not the same as "Settings". I've gotten a bit past the newbie stage so I figured it out, but I can understand why it's good to specify things like which version of Linux Mint, and exact descriptions of what the newbie will encounter.

I've learned that editing .conf files generally requires root permission so "sudo gedit .........." but then again when I came back to Linux (several years after Mandrake, Yellow Dog, and other experiences) and discovered that I didn't have to create both a "root" account and password as well as a "user" account and password I was a bit flumoxed.

Where are the settings for 'Print to File'?

Posted: Sat May 05, 2012 2:06 pm
by bpeary
I've always used the 'Print to File' option, which has given me a no-fuss pdf, and allows me to name it, which is not an option if you select the PDF printer. But I always have to select a 'Save in Folder' option (home is the default, but I use a common partition on another drive). Specifying an Out folder in cups-pdf.conf only affects PDF, not 'Print to File'. Anyone know where I can specify a default location?