120114 Florian Philipp wrote:
> Am 14.01.2012 04:21, schrieb Philip Webb:
>> 120113 Florian Philipp wrote:
>>> Try the pdfdebugger provided by dev-java/pdfbox to inspect both files.
>> That needs Java, which I am definitely not going to re-install (smile).
> Well, I'll resist the temptation to start a flamewar over this ;)

Yes, definitely (grin).

>> I've now uploaded the files above & everyone can inspect their structure:
>>   http://www.chass.utoronto.ca/~purslow/test/
>> I've renamed the PDFs to show their origin, ie LibreOffice + Ghostscript.
> I can reproduce the behavior with my LO.
> I've inspected the files with pdfdebugger. The LO-version really
> contains more, but nothing which seems to justify the difference.
> the content streams of each page seem to be better compressed by LO.
> Cups-PDF creates a smaller PDF than ps2pdf, probably because it outputs
> PDF-1.5. Otherwise it is identical to the other ghostscript outputs.
> Out of curiosity, I removed all pictures from an old report (25 pages)
> and tested that. There, Cups-PDF creates larger files than LO
> although the internal structure is similar to what you've provided.
> So I guess, all we can say is that their performance is inconsistent.

I suspect the difference in font resources (see other msg)
causes the difference in file sizes.

I discovered Pdf2ps among the Ghostscript binaries.
It allows a very simply means of reducing PDF size :

  570: lit> pdf2ps boox.pdf boox-test.ps
  572: lit> ps2pdf boox-test.ps boox-test.pdf
  573: lit> ls -l
    -rw-r--r-- 1 purslow purslow  67184 Jan 13 04:07 boox-gs.pdf
    -rw-r--r-- 1 purslow users   366711 Jan 13 04:05 boox.pdf
    -rw-r--r-- 1 purslow purslow  65695 Jan 14 06:52 boox-test.pdf
    -rw-r--r-- 1 purslow purslow 407541 Jan 14 06:52 boox-test.ps

Ie take the LO PDF, convert it to PS with Pdf2ps,
then again to PDF with Ps2pdf & you get a file similar to the version
produced by creating a PS in LO & then converting that to PDF.
Perhaps this is not surprising, but it may help with PDFs from elsewhere.
This doesn't work if the PDF contains images, but for purely text files
it makes sense when using LO to create a PDF via PS, not directly.

PS I'm also heartened to discover that Pdftk still works without Java.

-- 
========================,,============================================
SUPPORT     ___________//___,   Philip Webb
ELECTRIC   /] [] [] [] [] []|   Cities Centre, University of Toronto
TRANSIT    `-O----------O---'   purslowatchassdotutorontodotca


Reply via email to