Welcome to NeoOffice developer notes and announcements
NeoOffice
Developer notes and announcements
 
 

This website is an archive and is no longer active
NeoOffice announcements have moved to the NeoOffice News website


Support
· Forums
· NeoOffice Support
· NeoWiki


Announcements
· Twitter @NeoOffice


Downloads
· Download NeoOffice


  
NeoOffice :: View topic - A tutorial on how to produce optimized PDFs
A tutorial on how to produce optimized PDFs
 
   NeoOffice Forum Index -> NeoOffice Releases
View previous topic :: View next topic  
Author Message
rays
The Anomaly
(earlier version)


Joined: Sep 23, 2004
Posts: 475
Location: Geneva, Switzerland

PostPosted: Fri Sep 26, 2008 4:45 am    Post subject: A tutorial on how to produce optimized PDFs

In the following step-by-step online tutorial carried out as a chat, my colleague Amos, working in Nairobi, learns how to produce optimized PDFs for different purposes, but particularly for making smaller files for use on the web and for attaching to emails.

This lesson came about because one of his colleagues had tried to upload a 14.8 MB PDF file to our web site. It is beyond possibilities for most of our members in Africa to afford to download such a monster! As it was, it had taken over three hours using Skype for Amos to transfer the 14.8 MB PDF file to our webmaster, who reduced the file size by optimizing it to just 1.2 MB before uploading it on behalf of our African colleagues. It was clear that our African colleagues needed help to avoid this kind of situation occuring again.

The document was a report and consisted of mainly text with a few pictures. Since the pictures were not sized and optimised before being imported into the NeoOffice document, each image was as large as they were when they were first downloaded to the Mac from the digital camera, adding up to a very large file.

It was a very satisfying session and Amos has kindly given his permission for the distribution of this transcript so that others might also gain from the experience. In view of the number of support questions raised about PDF file sizes, I thought it might also make a useful contribution here.

You can follow this step-by-step tutorial using any NeoOffice document of your own which contains some large images.

Ray

--------


Amos: I have the original document...its 14.8MB
Ray: open it in NeoOffice
Amos: It's open
Ray: From NeoOffice, there are two different possibilities to create the PDFs. Here we do both so we can compare the reult.
Ray: My assumption in the case of the conf report is that your colleague used the Mac's native print dialog to use the Print to PDF option.
Ray: But , even via that route, there is an important option that can already reduce the final file size and that's what I will get you to do first....
Ray: So, select File>Print and tell me when you have the standard print dialog in front of you
Amos: Ok
Ray: Click on the PDF button and select "Compress PDF" instead of the usual choice of Save as PDF, then proceed as usual
Amos: Ok
Ray: If you watch the top menu bar of the Finder, you may see the automatic script running briefly. The file is saved first then compressed by the OS X system itself. Let me know what final size this achieves.
Ray: The difference between Save as PDF and Compress PDF is related to the need to provide higher resolution images for printing, rather than lower resolution images for Internet use.
Ray: Result yet?
Amos: I was lost a little bit...i got 5.5MB
Amos: That's after compression
Ray: But already nearly one third of the size of the "original" pdf of 14.8 MB... Smile
Amos: The option he could have used is "Export Directly as *.pdf which actually gives you more or less the same size as the original *.odt or *.doc document
Ray: But that also depends on how it is used.
Amos: Ok
Ray: We agree that we are trying to produce a web version of the report document?
Amos: Sure, something smaller in size
Ray: In consumer terms, this can translate to something which is legible on the screen but not pixel perfect images when you print the file?
Ray: By the way, if you still have the original PDF produced by your colleague there, you can see from it that it was produced using Mac OS X Print to PDF, not NeoOffice. Use the 5.5 MB version you just made and open it in Preview.
Amos: It's open
Ray: In Preview, choose menu item Tools>Get info and look in the Details tab
Ray: In the PDF Producer line, you'll see what I saw in the 14.8 MB version (which is why I knew some training was required locall in Nairobi!)
Amos: The PDF Producer Mac OS X 10.4.11 Quartz PDFContext
Ray: Exactly.
Ray: Back to NeoOffice then...
Amos: Ok
Ray: This time, we are going to choose menu item File>Export to PDF (not just click on the icon!)
Amos: Ok
Ray: In the window, we can see all the settings which can be played with to achieve a better result
Ray: For this exercise, the important settings are with images.
Ray: What is the current DPI setting?
Amos: I have few settings on this one...the main option I have is the "File Format..."
Ray: Oh oh. What version of NeoOffice are you using currently?
Amos: Version 2.2.4
Ray: You chose Export as PDF, not Export, yes? You then get a window which asks you for the name and location of the document to be saved and after that the next window opens PDF Options
Amos: Sorry...now we are on the same page
Ray: good
Amos: Quality is set to 90%
Amos: That's for images
Ray: And the resolution?
Ray: (just below the compression percentage)
Amos: 300DPI
Ray: Ouch!
Amos: Initially it wasn't selected as an option...but its at 300DPI
Ray: That is the resolution needed for printing at a print house, more or less.
Ray: The default setting is 150 dpi, which is adaquate for printing to a laser printer. So change it to 150 dpi, leave the compression at 90% and Export the file.
Ray: Then repeat this with a DPI value of 96 DPI, still at 90%. Tell me the file size results. Then open these last two, side by side in Preview on your screen
Amos: I exported the document and it ended up to 1.1MB which is a whole big difference
Ray: Which DPI is that? 150 or 96?
Amos: The 1.1MB was at 150DPI...let me do the 96
Ray: ok
Amos: The 96DPI ended at 788KB
Ray: Open the 150 and 96 dpi side by side in Preview, looking at the cover page
Ray: Looking at the photo (I recall), do you see any great difference between them on the screen?
Amos: Am already there...the difference aint that much but on close scrutiny the resolution for the 96DPI is a bit low...
Ray: 96 DPI corresponds to the screen resolution used in Windows and Linux. Macs traditionally use 72 DPI, so the fuzzyness you see may be the result of the Mac dropping pixels to display only 72 out of the 96 available Dots Per Inch (DPI).
Ray: You could try looking at the two files side-by-side on your Linux laptop to see if there's a difference there.
Amos: Ok
Ray: Now, I'd like you to print the cover page only of the two documents on your Mac and compare the printed result. The difference will possibly be more dramatic.
Amos: OK
Ray: So, you have to identify the final purpose of the PDF before producing it. Then, also take into account the limitations of your potential audience in terms of their ability to download. Ideally, never go above 1MB but, in this case, 1.1MB is acceptable because you might expect this document to be printed locally by the downloader to read, rather than read it on screen.
Ray: One step further, Export as PDF with resolution 150 DPI again but this time, try JPEG Compression of 75%
Ray: File size?
Amos: File size is 880KB
Ray: Compare result on screen with the other two. Again, print out the cover only and compare also with the other two.
Amos: Smile
Ray: Visual comparison? Admitedly, this is subjective measure.
Ray: Since you probably never send PDF as the file format to an external printer, you can decide to change all the NeoOffice installations locally to these compression and DPI values. Remember that the last values entered in the PDF Options dialog become the "default" value used when you click on the Export to PDF icon in NeoOffice window.
Ray: Have you printed the covers yet?
Amos: yes i did
Ray: And, scores out of 10 for each printed version please?
Amos: the 150DPI and 96DPI with 90% JPEG compression look more or less the same
Amos: the one I reduced the JPEG compression looks fuzzy/blurred....i would give it 3 outta 10
Amos: The other 2...maybe an 8 outta 10
Ray: Good work. But on screen, the 75% compression probably stood up to the other two?
Amos: exactly
Ray: So, depending on what we expect the victim (sorry, the user) to do with the PDF, we can tailor the compression and DPI settings to achieve the result we want while greatly reducing the bandwidth cost.
Amos: True...that's a valuable lesson you taught me right there.

_________________
Ray Saunders
World Scout Bureau
Back to top
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Fri Sep 26, 2008 10:52 am    Post subject:

Thanks so much for this, Ray (and Amos)! We should get it wikified; I know some of the information is already there (as I recall you wrote part of that article) but the step-by-step style will be helpful, too.

Smokey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
Display posts from previous:   
   NeoOffice Forum Index -> NeoOffice Releases All times are GMT - 7 Hours
Page 1 of 1

 
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 cannot download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © Planamesa Inc.
NeoOffice is a registered trademark of Planamesa Inc. and may not be used without permission.
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.