21

It seems that making edits, annotations, or even just opening and saving a PDF file in Preview will cause a significant increase in file size. I've noticed that for some books I've scanned this also happens to improve page rendering time.

Can anyone shed some light as to what is going on to cause these changes? I am interested in synching annotations of PDF ebooks between Preview and the iPad (maybe GoodReader) but this may be too impractical with large PDF files.

1
  • 2
    This is likely due to how they decided to encode PDFs in preview. PDFs are now an open format but that doesn't necessarily mean everyone is encoding them the same way. Your safest bet is to get an Adobe PDF editor and use that. According to these people, discussions.apple.com/thread/3896311?start=0&tstart=0, it makes a difference. They also discuss possible reason behind your issue.
    – Tony
    Jan 7, 2013 at 20:16

4 Answers 4

13

In his little-known novel, PDF Karenina, Leo Tolstoy wrote,

Optimally encoded PDF files are all alike; every sub-optimally encoded PDF file is sub-optimally encoded in its own way.

It's hard for anyone to answer why your PDF files are larger after Preview modifies them. A PDF file consists of many different kinds of data: images, content streams, fonts, document overhead, color spaces, extended graphics states, and a cross reference table. Just like one sentence might be concise and another verbose, but both are valid English and say the same thing, so too one PDF file might have a more verbose way of representing the same content as a more concise PDF file. We'd have to look at your exact PDF files. It's likely that they were created by a variety of different pieces of software, some consise, some less so.

It also matters what version of Mac OS X and Preview you are using, because that determine the software that writes the new PDF file when you do a Save As in Preview.

I can, however, tell you what gets larger about some of my PDF files. This story applies to my computer, running Mac OS X 10.5.8 and Apple Preview 4.2 (469.5).

One file, Giulio.pdf, is a 22-page document with text as text, not scanned images. It is 461,092 bytes large. I opened it in Preview, did File... Save As..., and saved it under a new file name. The new file is 724,421 bytes, or 57% larger.

I opened each file with Adobe Acrobat Professional, version 8.3.1 for Mac OS. I did Advanced... PDF Optimizer... Audit Space Usage.... A small dialog box gave a break-down of how many bytes were due to each category of usage, plus the percent of the total file size for the category.

The original Giulio.pdf has 390,754 bytes (84.75%) devoted to content streams, and zero bytes devoted to images. It is in the PDF 1.4 format. The file saved by Preview has 675,846 bytes (93.29%) devoted to content streams, also zero bytes of images, and is in the PDF 1.3 format. Preview made the content streams 285,092 bytes larger, and that represents 73% of the file size difference between the two.

I wondered if the PDF 1.3 file format was inherently less efficient for storing this kind of file. I opened the original Giulio.pdf in Adobe Acrobat Professional 8, and did Advanced... PDF Optimizer... Make compatible with: Acrobat 3.0 and later and pressed OK. I saved the resulting file under a new name. The resulting file is in the PDF 1.3 format, and was 452,356 bytes, or smaller than the original. Its content streams are 375,171 bytes (82.94%), a similar proportion, but smaller than the content streams of original file.

Thus it seems we can conclude that the Preview app on Mac OS X 10.5.8 is not as efficient as some other PDF creators at making concise content streams in PDF files, and the difference is enough to account for three-quarters of the size difference in a PDF file without images.

I did a similar experiment on form k.pdf, a 1-page document scanned from paper. The original file is 303,730 bytes, of which 298,197 bytes (98.18%) are images. A copy of this file created by Preview using Save As... is 300,601 bytes, or 1% smaller. This file size difference is more than accounted for by a smaller "document overhead" category of bytes in the file created by Preview.

Thus it seems we also can conclude that Preview doesn't always cause a PDF file to increase in size. It depends on the nature of the original PDF file, and how concise it was to start with.

2
  • 1
    “It is hard to tell” - “it seems we can conclude” - not a lot of precise facts in this answer. A PDF’s size depends on its content. Image compression, embedded data and embedded fonts make all the difference for a similar looking result. Open two similar PDFs, extract images and fonts and compare. Jun 8, 2020 at 4:55
  • @MicroMachine thank you for your comment. The question asked to "shed some light as to what is going on" with a general phenomenon. The question didn't give a specific situation, so it's hard to give a specific answer. 12 people seem to think I "shed some light". Jun 8, 2020 at 6:21
4

I know this is quite late, but I have found something that seems to work, at least if used initially: I've tried using the Quartz filter to "Reduce File Size." It seems to work but is not on by default. I can specifically choose it via the Save As menu (hold Option), but am worried that it defaults to the usual method on the autosaves.

Here is what is happening for me and how I got to this page in the first place: The PDF starts out as a 91MB 900 page book. I add a single annotation and save it and the file jumps up to 2.29GB. To top it off, it takes forever to save, especially since I'm saving to an external drive. Thank goodness the drive is USB 3!

Is there anyway to extract these annotations? I can annotate and highlight on Goodreader and PDF Expert on my iPad. If Preview can't allow me to do this on my computer, is there any other app that will? Why can't it just save the annotations/highlights but not try to recompress all the pictures like I'm resaving a JPEG each time. Thanks for the help!

1
  • This works: 400 KiB > 1.3 MiB > 540 KiB. My original PDF was under 400 KiB and become a monstrous 1.3 MiB after adding a couple highlights/underlines. I did as suggested and the file went down to 540 KiB: Save As... with Quartz Filter set to Reduce File Size. I can still edit the previous highlights (which becomes impossible with Export as PDF...) and the size is more in line with what I get by editing it on a different device.
    – Daniel
    Sep 11, 2018 at 17:46
1

The problem remains a serious one. In Preview 7.0 (Mac Os 10.9.5.) I generated a pdf using Acrobat 9.5.5. that resulted in a 5 MB file. In Preview I added exactly 12 characters (using the edit tools). After saving this file it balooned to 14 MB.

You can fix it by opening and saving again in Acrobat (may have to use the "reduce file size" option).

1
  • 2
    This doesn't explain why it happens which is what the question is asking.
    – Ian C.
    Feb 8, 2015 at 17:22
0

Can't add clues to the solution. I can add a similar scenario (OS X 10.11.3): a scanned pdf weighing in at ~800kb is opened in preview, a couple of empty scanned paged are deleted, the resulting, two-page shorter pdf is ~2,2Mb. "Option-Save as" and selecting the "reduce file size" quartz filter compresses the file down to... 1,9Mb.

The original file has been generated by a Xerox WC 7830 copier, which in my experience (compared to previous multi-function printer/copier machines we had) produces quite well-optimized scanned pdf's.

Cannot see any difference in the file, visually; I'd guess the page images are being recompressed in 24bpp, whereas the original file is cleary using much less colour-depth, likely 6-bit (it's a printed and signed document, text only, the scanner makes a good job of keeping the white background pure white). Sadly, Preview is not clever enough to detect and maintain this, and seems to need to recompress the whole file although no changes are made in the remaining pages (again, only a couple of pages have been deleted.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .