PDF file size comparison

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

fistanes
User
Posts: 11
Joined: Fri Jul 29, 2011 7:12 am

PDF file size comparison

Post by fistanes »

I just did a quick test on word to pdf conversion using a sample word file located at http://www.uregina.ca/URCourses/student ... s/word.doc

The resulting sizes are (sorted from smallest to largest):

File saved as xps from Word 2010, opened through XChange Editor and saved as pdf: 561 k
File saved as pdf from Word 2010: 570 k
File printed with PDF Creator: 636 k
File saved as xps from Word 2010: 663 k
File printed through pdfxchange lite 4 665 k
File printed through default xps printer, opened through XChange Editor and saved as pdf: 708 k
File printed through pdfxchange lite 2012: 729 k
File converted to docx using Word 2010: 931 k
Original doc file: 987 k
File printed using default xps printer: 1.048 k
File saved as rtf, opened with XChange Editor and saved as pdf: 5.878 k
File saved as rtf 42.078 k

I tested other documents and I consistently got the smallest size by saving as xps and opening it through XChange Editor.

I find it strange that PdfXchange Lite 2012 generates larger files than pdfXchange lite 4 (this is also consistent in my tests).

When opening the rtf file from XChange Editor, the document did not look like the original. It seems that the rtf engine within XChange Editor needs some work...
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19885
Joined: Mon Jan 12, 2009 8:07 am

Re: PDF file size comparison

Post by Stefan - PDF-XChange »

Hello fistanes,

Thanks for your tests! I achieved a 716 KB pdf after printing it through the PDF XChange Standard 2012 with default settings.
I presume that the difference between Live V4 and Lite 2012 is due to the different image quality values being set in them (you can't control these options like in the standard drivers but they are there).

Also getting the smallest file when you go through XPS first might once again be due to Word reducing the image quality while performing the conversion from .doc to .xps

Best,
Stefan
fistanes
User
Posts: 11
Joined: Fri Jul 29, 2011 7:12 am

Re: PDF file size comparison

Post by fistanes »

The image quality reduction might have something to do, but then I also tried with the plain text file of pride an prejudice from project gutenberg (http://www.gutenberg.org/ebooks/1342.txt.utf-8)

The resulting sizes are (sorted from smallest to largest):

File converted to docx using Word 2010: 445 k
Original txt file: 700 k
File saved as xps from Word 2010, opened through XChange Editor and saved as pdf: 714 k
File printed from Word 2010 through pdfxchange lite 2012: 725 k
File printed from Word 2010 through pdfxchange lite 4: 725 k
File printed through default xps printer, opened through XChange Editor and saved as pdf: 734 k
File opened directly from XChange Editor as txt and saved as pdf: 775 k
File saved as pdf from Word 2010 (minimal size setting): 918 k
File converted to doc using Word 2010: 964 k
File printed with PDF Creator: 1.045 k
File saved as rtf: 1.202 k
File saved as rtf, opened with XChange Editor and saved as pdf: 1.316 k
File saved as pdf from Word 2010: 1.428 k
File printed through default xps printer: 1.496 k
File saved as xps from Word 2010: 1.611 k

Some interesting findings:
- Again, saving as pdf using the xps file generated by Word gives the smallest file size, even if the intermediate xps is actually the largest file of the list.
- The create pdf from rtf functionality of XChange Editor seems to be of little use in its current version, since the rendering is incorrect and the file size is too big.
- Lite V4 and Lite V2012 give similar results when no images are involved.
- The pdf generator of Word 2010 shows poor performance with txt files in regards to file size, when in the previous test it was the second best.
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19885
Joined: Mon Jan 12, 2009 8:07 am

Re: PDF file size comparison

Post by Stefan - PDF-XChange »

Hello fistanes,

Thanks for this second test. From the current conversation and both tests I am making the following conclusions.
- The different results by V4 and V5 of our Lite driver in the first test were due to the two using different image compression settings.
- The Word PDF generator performed well in test 1 because it was using too aggressive image compression options and is otherwise not optimal when handling other content.

And we will investigate the issues with rendering RTF files, and I hope I will manage to get a word or two from the devs on why going through Word's XPS produces the best (pdf) result.

Best,
Stefan

p.s. - the file my Editor generated for Pride and Prejudice directly from the original .txt file is just 702 KB (see it attached).
You do not have the required permissions to view the files attached to this post.
fistanes
User
Posts: 11
Joined: Fri Jul 29, 2011 7:12 am

Re: PDF file size comparison

Post by fistanes »

Regarding the file size of both RTF and txt files, I now see that they might be wrong in my tests, since my version renders a stamp on each corner of the page with "PDF-XChange Editor. Click to BUY NOW!", which obviously affects the file size. I am actually a registered user and I entered the registration key without problems. When converting from xps to pdf I do not get those stamps.
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19885
Joined: Mon Jan 12, 2009 8:07 am

Re: PDF file size comparison

Post by Stefan - PDF-XChange »

Hello fistanes,

If you e-mail us at support@pdf-xchange.com with your license or order number we can check why that's happening. In general if your license was purchased after 1 Jan 2012 - it should activate all the features of the Editor and none of them should create "DEMO" stamps in the files. Other than that - you are correct that the "DEMO" stamps do add to the file size!

Best,
Stefan
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19885
Joined: Mon Jan 12, 2009 8:07 am

Re: PDF file size comparison

Post by Stefan - PDF-XChange »

Hello fistanes,

And on the issue with rendering and converting RFT to PDF in the editor I've created a ticket in our system:
#1798: Editor 3.0.300: RTF-to-PDF problems
So that we can resolve this. We will post back here as soon as there are any further news on the problem.

Best,
Stefan
fistanes
User
Posts: 11
Joined: Fri Jul 29, 2011 7:12 am

Re: PDF file size comparison

Post by fistanes »

I'd just like to share another finding related to file sizes.
This one is related to 256 colour images. It seems that these type of images can be losslessly compressed in a pdf, which makes them a good test candidate.

The tests were performed using the following image as a source: https://www.pdf-xchange.com/fckfiles/im ... vation.png and colour-reducing it with RIOT (http://luci.criosweb.ro/riot/):

Original file: 42 k
Colour reduced file: 15 k

Image printed through pdf xchange lite 2012: 17 k
Image saved through pdf xchange editor (new document from image): 19 k
Image inserted in a word document and pdf generated through xchange lite 2012: 23 k
Image inserted in a word document and pdf generated from word: 94 k
Image inserted in a word document and xps generated: 100 k
Image saved through pdf xchange editor (File - Open): 376 k
Xps document generated before saved as pdf through the editor: 379 k

It seems that the Editor performs quite differently depending on how the image is loaded (File-Open or "New document"). Both seem to generate a lossless image (I did not notice jpeg artifacts), but the "File-Open" generates a much bigger file, similar to when importing an xps document with 256-color image. So in this scenario, using xps as an intermediate step only makes things worse...

I find this information useful to understand the best way to put screenshots in pdf files. To get rid of Jpeg artifacts, colour-reducing them to 256 colours is a must before performing any further action. If they need to be embedded in a Word document (e.g. to add descriptions), it seems that using pdf xchange lite is the best option. If they do not need them to be embedded in Word, printing them directly through pdf xchange lite seems also the best option, close to using the "new document" functionality in xchange editor.