UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
In my previous version of Ubuntu (Gutsy Gibbon), there was no "built-in" PDF creator for the whole system, but I could get round this by doing Print-To-File, which produced a Postscript (PS) file, which I used PS2PDF to convert to a PDF.
All was well (if a bit fiddly). I notice on Ibex that its Print-to-File option has a selection for .ps or .pdf files, but when I produce one (from Firefox - it's a webpage), it is *really* big! I also cannot copy text out of the resultant PDF file, or search for words. This is because Ubuntu appears to be creating the PDF as an image file, not as a text-with-graphics file, which of course creates a smaller file size.
I can see no options for changing the way PDFs create this way. Unless, there is some other print-related option in Ubuntu that is set to send all matter to print as graphics rather than text? In OpenOffice on the same machine, printing a document to file does the same thing - a PS document consisting of images rather than text, and it cannot be searched or copied from. By contrast, the OpenOffice "export as PDF" function correctly produces a "text enabled" PDF, as you would expect.
Does anyone know if there is a setting I can tweak to get the PDF producer to create "proper" PDFs, like Gutsy used to do? Going on 1Mb files for a 2-page PDF is pushing things a bit!
I would point out that I do not have an actual printer connected to the system. I've never owned one.
Steve
PS: I don't know whether this is just a Firefox problem or not. In Quanta+, also on my system, it seems to produce an okay PDF with text and everything, at a reasonable size. Also with gEdit text editor. I have installed the "Print to PDF" Firefox Add-On, but this does the same - produces a big PDF as an image.
Last edited by Steve W; 03-04-2009 at 08:31 AM.
Reason: Added PS
Thanks for the reply, I have installed html2ps but a command line solution is kind of a backward step, plus it does not address the situation where only Firefox seems to have the problem of producing a "proper" PDF file. As I say, Quanta+ seems to have no trouble.
I have looked at cupsd.conf and it does not appear to have anything listed that could help, as far as I could see.
I know from working with PDFs in Windows at work, and printing in general, that you can choose to send a job to a printer/PDF as an image only, or with the fonts embedded so it displays & prints properly and doesn't produce a large file. You would only produce an image PDF if you could not get the fonts to embed, for some reason like copyright restrictions.
I'm running kubuntu 8.04
When I choose File -> Print in FFox (2.0.0.19) I get the option to change the printer that is going to be used.
I select CUPS/PDF instead of my usual printer, and tick the box that says "Print to file".
I click "Print" and the PDF file is created properly. It's viewable in kpdf and text is selectable, if you click on the "Select Tool" first.
This webpage (without my post)is 552KB when "Printed" as a pdf
With Ibex and Gnome when I print to PDF using the Epiphany browser I can select the text using Gnomes Document Viewer. I gave up on Firefox a while ago.
Hmm. Well, at work where we have to use Windows I have the open source "PDFCreator" program in use, where you do have lots of options to compress graphics & text in the file etc. It's quite a nice package but only available on Windows. I am at work now and this webpage (with your post) is only 282Kb when printed with this package. And all text is selectable.
It is not just about the file size - the text when printed always looks a bit fuzzy because the fonts are not rendering properly as scalable fonts but are, of course, just displaying as pixels-on-the-page bitmaps.
I have two questions here:
1. Does anyone know whether it would be possible to use my excellent Windows PDFCreator package on Linux using Wine? Because, as you know, any PDF package in Windows sets itself up as another printer and you just "print" to it from whichever application you are using. Now, is it possible under Wine to do this, where a printer could be set up under Linux to point to this PDFCreator program, which when triggered would need to operate through Wine? (Perhaps this is a question for the Wine forum). Or... can anyone suggest a good similar PDF production program for Linux? (Although if I could just get the in-situ one in Ubuntu to work properly, a separate app would not be needed).
2. Tredegar, how does the CUPS/PDF thing work then? When I go to File/Print under an application, there are no printers listed, just "Print to File". I would also reiterate that Quanta+ and gEdit seem to have no problems producing proper PDFs of smaller sizes - it is just Firefox having the problems. However, under Gutsy Gibbon it did not. All PDFs that were produced were very good, excellent quality and decent file size, under Gutsy. It's a mystery... How do I set up a special CUPS/PDF printer?
I downloaded CUPS-PDF, and attempted to "print" to this new printer. But no file was produced. I thought they got saved to a PDF directory inside /home. Where do they go? Did a file actually get produced? Is there a log file I can check?
I did have a little look for answers on the internet, but suspect things for Ubuntu are different now, as one thread from 2 years ago is clearly marked "out of date" at the top...
Hmm... Systems/Admin/Printing shows the new PDF printer. The printer status is shown as "Idle - No %%pages: comment in header!" Right clicking on the printer and selecting "View print queue" then "View/Show completed jobs" shows that the jobs sent to the "printer" show the status "cancelled". So perhaps no file is being produced.
I have reset my machine since installing cups-pdf. Is there something here I am not doing?
In Ffox, after you have selected Print and your printer as CUPS/PDF, Check the "Print to file" box, then you'll be asked where to save the file.
I just checked this and notice that the file is saved as a PostScript. It opens fine in kpdf though.
If I print a webpage from konqueror the behaviour is slightly different (and "better"):
I can choose Print - PDF which puts the PDF file in ~/PDF/
or I can choose Print - Print to file (PDF) which puts the PDF Print.pdf in ~/
No... in my "Print" dialogue I actually have two printers - the new PDF printer, and a printer called "Print to File". The PDF printer has no "print to file" option to tick.
Where is ~/ or ~/PDF going to be? Do you mean the Root directory? And does the print queue status for all the jobs as "cancelled" mean no file may have been produced?
No, there is no PDF folder there. That was the first place I checked. With regard to that SuSE article you referred to, I presume that this describes setting up the CUPS-PDF printer from scratch. Do I assume I do not need to follow all the scripting and setting up stuff indicated in that article, now that I have downloaded CUPS-PDF from Synaptic? I mean, there is definitely a PDF printer in my "list of printers"...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.