Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 15 Nov 2019, 04:27
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Bad PDF-File-Compression with Default PDF-Print-Utilities
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [7 Posts]  
Author Message
Wosh


Joined: 09 Jul 2007
Posts: 60
Location: Nuremberg Germany

PostPosted: Mon 17 Dec 2007, 12:56    Post subject:  Bad PDF-File-Compression with Default PDF-Print-Utilities
Subject description: Custom settings reduce Abiword/Gnumeric-PDF-filesize up to 1/30
 

Printing in Puppy Linux is a mess!
As soon as I have more background information I will write a "Printing Howto".

But Windows-XP PDFCreator beaten by more than factor 3!

If I print an Abiword/Gnumeric file to one of the PDF-print utilities the generated PDF-file becomes 5 to 9 times bigger than the PDF-file generated with PDFCreator 0.9.3 in Windows-XP.

These utilities don't use CUPS-PDF!!!
Maybe someone can post me what they call and whether they are compiled to Abiword or are part of Gtk or whatever.


So if you want to get a real amazing compression for a PDF-file you have to choose:

"Generic Postscript" "Custom"

and then you must add the following line:

lpr -P CUPS-PDF

Test-Results
Example:
Abiword's test document /usr/share/examples/text/testdoc.doc: .............23552 Bytes

Puppy-Linux "Generic Postscript" Custom/lpr -P CUPS-PDF: testdoc.pdf 15974 Bytes
Windows-XP "PDF-Creator": ............................................................testdoc.pdf.....53851 Bytes
Puppy-Linux "Create a PDF document":.......................................testdoc.pdf 278002 Bytes
Puppy-Linux "Generic Postscript" File/Save As/PDF Files: ...testdoc.pdf 481361 Bytes

The last two PDF-sizes are not acceptable because they blow up the size of a tiny document like testdoc.doc up to 20 times.
Puppy-Linux CUPS and PDFCreator both depend on Ghostscript to create PDF-files so the CUPS-developers did a fairly good job..
I have not thrashed out all the CUPS-PDF printer options, so my result maybe still can be topped. After some more playing around I will report soon.

Last edited by Wosh on Fri 21 Dec 2007, 21:47; edited 4 times in total
Back to top
View user's profile Send private message 
jcoder24


Joined: 06 May 2005
Posts: 601
Location: Barbados

PostPosted: Mon 17 Dec 2007, 19:42    Post subject:  

Did you print via "Generic Postscript" or "Create a PDF document"?

I created a sample abiword document in puppy (don't have access to windows) containing only text which was 6.4k in size. Printing via "Generic Postscript" gave a 7k pdf file. Printing via abiword's "Create a PDF document" generated a 118k pdf file.

The CUPS-PDF printer uses the defaults provided by the ghostscript driver. However, you can manipulate its options via the CUPS web interface by clicking the "Configure Printer" associated with CUPS-PDF printer.
Back to top
View user's profile Send private message 
Wosh


Joined: 09 Jul 2007
Posts: 60
Location: Nuremberg Germany

PostPosted: Tue 18 Dec 2007, 06:52    Post subject:  Generic Postscript even worse
Subject description: Has someone already succeeded to decrease the PDF-file size?
 

Hi jcoder24

I didn't know that it is possible to generate PDF-files via "Generic Postscript". So I have made the test with it too and the result is even worse. See the reedited topic. So how can I tune this output?

Thanks for your tip with the CUPS-PDF Printer Options. I will test to optimize the output size by varying them and post my results here.

If someone already has succeeded to decrease the PDF-file size please post your settings within this thread.
Back to top
View user's profile Send private message 
jcoder24


Joined: 06 May 2005
Posts: 601
Location: Barbados

PostPosted: Wed 19 Dec 2007, 10:22    Post subject:  

Can you create and attach a sample abiword file that produces the type of results you are seeing?
Back to top
View user's profile Send private message 
Wosh


Joined: 09 Jul 2007
Posts: 60
Location: Nuremberg Germany

PostPosted: Wed 19 Dec 2007, 18:52    Post subject:  CUPS-PDF Printer Options only Decoration
Subject description: All trials failed
 

Hi jcoder24

You already have /usr/share/examples/text/testdoc.doc. It is the test document of Abiword and good for PDF-conversion because it contains text and graphics.

I have played with the following options in CUPS-PDF:
PDF Colour Model:
PDF Settings:
PDF Colour Image Compression:
PDF Grey Image Compression:
PDF Monochrome Image Compression:
PDF Compatibility:
PDF Compress Pages:

But they only seem to be decoration the filesize of testdoc.pdf always becomes 278002 Bytes.
But as the PDF-file size generated by "Create a PDF document" is better than the size generated by "Generic Postscript" CUPS must call gs with different parameters. Can anybody tell me were the scripts for the gs-calls reside. I hadn't success searching them in /etc.

I have taken a look at the Ghostscript homepage, but all I have found is that Ghostscript is a book with seven seals. There are to many options for an unexperienced user. The most informative page is:

http://ghostscript.com/doc/8.54/Ps2pdf.htm

At least I have checked PDFCreator 0.9.3 a little bit more. It is based on GPL Ghostscript 8.54. It is Open Source and it's home page is:

http://www.pdfforge.org/

These guys seem to be cracks dealing with Ghostscript because they offer more compression options than CUPS-PDF and all files created by PDFCreator are at least 1/4 size of CUPS-PDF:



They have an own forum over there. So maybe I will have to post my problem there, if I won't find a Ghostscript pro who is able to enable the same performance for the Linux user as they have in Windows (Grrr!).

In my naive hope that some Ghostscript guru can derive the parameters used I have attached testdoc.pdf created by PDFCreator.
testdoc.pdf.zip
Description  Zipped testdoc.pdf because pdf alone is not allowed. Why???
zip

 Download 
Filename  testdoc.pdf.zip 
Filesize  49.96 KB 
Downloaded  231 Time(s) 

_________________
Wosh
Back to top
View user's profile Send private message 
Wosh


Joined: 09 Jul 2007
Posts: 60
Location: Nuremberg Germany

PostPosted: Fri 21 Dec 2007, 21:23    Post subject: PDF-Compression Problem partially Solved
Subject description: Why do the PDF-print utilities behave so bad?
 

Hi all

I have managed to solve the biggest part of the PDF-compression problem (see revised topic).

But there are still some questions open:

1. Hi jcoder24:
I have seen that you have reworked the pdf-writer script. Is there a possibility to pass the PDF-filename within the Custom command line of Abiword Print (e.g.: lpr -P CUPS-PDF -o PCFileName=testdoc.pdf)?

2. The default PDF-print utilities perform to bad. Is it possible to improve them (e. g. use CUPS-PDF for them also or use the gs parameters of CUPS for them)? Maybe someone can inform me how these PDF-printers in Abiword/Gnumeric work.
Back to top
View user's profile Send private message 
jcoder24


Joined: 06 May 2005
Posts: 601
Location: Barbados

PostPosted: Sat 22 Dec 2007, 17:05    Post subject:  

Glad you got the pdf compression sorted out. I assumed that you had CUPS-PDF as default which you don't so it is useful for others to know about lpr -P CUPS-PDF. I'm not sure how possible your first request is but I'll look into it.

I plan to re-code some of the internals of cups-pdf and finish the options gui. Also planned is to back-port all of the changes over to pdfprinter-pdq so it may be a while in coming.

As for question two you may have to ask a question the respective forums.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [7 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0434s ][ Queries: 13 (0.0104s) ][ GZIP on ]