LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 03-04-2009, 08:02 AM   #1
Steve W
Member
 
Registered: Mar 2007
Distribution: Ubuntu 11.04
Posts: 275

Rep: Reputation: 30
PDF production in Intrepid Ibex


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
 
Old 03-04-2009, 08:47 AM   #2
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,440

Rep: Reputation: Disabled
Try html2ps with -o option

you may be missing some filters.

The config file is /etc/cups/cupsd.conf
 
Old 03-04-2009, 10:04 AM   #3
Steve W
Member
 
Registered: Mar 2007
Distribution: Ubuntu 11.04
Posts: 275

Original Poster
Rep: Reputation: 30
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.

Anything else I could try?

Steve

Last edited by Steve W; 03-04-2009 at 10:17 AM.
 
Old 03-04-2009, 11:51 AM   #4
tredegar
Guru
 
Registered: May 2003
Location: London, UK
Distribution: Ubuntu 10.04, mostly
Posts: 5,995

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
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

Last edited by tredegar; 03-04-2009 at 11:53 AM.
 
Old 03-04-2009, 03:58 PM   #5
fragos
Senior Member
 
Registered: May 2004
Location: Fresno CA USA
Distribution: Ubuntu 10.10
Posts: 1,466

Rep: Reputation: 49
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.
 
Old 03-05-2009, 03:00 AM   #6
Steve W
Member
 
Registered: Mar 2007
Distribution: Ubuntu 11.04
Posts: 275

Original Poster
Rep: Reputation: 30
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?

Steve

Last edited by Steve W; 03-05-2009 at 03:04 AM.
 
Old 03-05-2009, 09:27 AM   #7
tredegar
Guru
 
Registered: May 2003
Location: London, UK
Distribution: Ubuntu 10.04, mostly
Posts: 5,995

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
To get a cups pdf "printer" you need to install the package cups-pdf
Then restart cups I expect.

Edit: I also found this:
http://www.novell.com/communities/no...rprise-desktop

Last edited by tredegar; 03-05-2009 at 12:19 PM.
 
Old 03-07-2009, 04:41 AM   #8
Steve W
Member
 
Registered: Mar 2007
Distribution: Ubuntu 11.04
Posts: 275

Original Poster
Rep: Reputation: 30
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...

Steve
 
Old 03-07-2009, 04:54 AM   #9
Steve W
Member
 
Registered: Mar 2007
Distribution: Ubuntu 11.04
Posts: 275

Original Poster
Rep: Reputation: 30
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?

Steve
 
Old 03-07-2009, 04:56 AM   #10
tredegar
Guru
 
Registered: May 2003
Location: London, UK
Distribution: Ubuntu 10.04, mostly
Posts: 5,995

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
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 ~/
 
Old 03-07-2009, 05:00 AM   #11
Steve W
Member
 
Registered: Mar 2007
Distribution: Ubuntu 11.04
Posts: 275

Original Poster
Rep: Reputation: 30
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.

Steve
 
Old 03-07-2009, 05:09 AM   #12
tredegar
Guru
 
Registered: May 2003
Location: London, UK
Distribution: Ubuntu 10.04, mostly
Posts: 5,995

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Well, it's probably putting it either in ~/ or ~/PDF take a look there.
Maybe this is why I didn't like 8.10, and reverted to 8.04

You could try the other option I linked to in post #7 ?
It's for Suse, but should work fine for the 'buntus as well
 
Old 03-07-2009, 05:11 AM   #13
Steve W
Member
 
Registered: Mar 2007
Distribution: Ubuntu 11.04
Posts: 275

Original Poster
Rep: Reputation: 30
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?
 
Old 03-07-2009, 05:17 AM   #14
tredegar
Guru
 
Registered: May 2003
Location: London, UK
Distribution: Ubuntu 10.04, mostly
Posts: 5,995

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
~/ is an abbreviation for your home directory. bash will substitute the path to your home eg /home/steveW/

So look in /home/steveW/ or /home/steveW/PDF/
 
Old 03-07-2009, 05:24 AM   #15
Steve W
Member
 
Registered: Mar 2007
Distribution: Ubuntu 11.04
Posts: 275

Original Poster
Rep: Reputation: 30
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"...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Shutdown problem with Ubuntu 8.10 Intrepid Ibex greengrocer Linux - Newbie 3 05-31-2009 12:21 AM
Sound Problems in Xubuntu Intrepid Ibex Junko77 Linux - Hardware 16 02-13-2009 11:47 PM
Ubuntu Intrepid Ibex sponzyparadox Linux - Newbie 6 02-09-2009 09:09 PM
okular in Ubuntu Intrepid Ibex Peter Shepard Ubuntu 1 01-06-2009 10:34 AM
Splashscreen on Ubuntu Intrepid Ibex tm2383 Ubuntu 3 12-10-2008 04:49 PM


All times are GMT -5. The time now is 01:18 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration