Quantcast
Channel: Adobe Community: Message List - PDF Size will increase in size dramatically with every submit.
Viewing all articles
Browse latest Browse all 58

Re: PDF Size will increase in size dramatically with every submit.

$
0
0

I've been in touch with the support person in Edinburgh and looked at your files and your various attempts to make the size smaller. 

Simply stated, it really is working as designed, but it is difficult to appreciate that unless you go a bit deeper into the file. 

 

Or, to say this another way, it grows dramatically in size because you have added dramatic amounts of data.

 

So, using your example of this form with a 1.9MB TIF image embedded as a inch-square thumnail five times,  I picked up most of this information using publicly available tools, such as the document font list (document properties/ fonts), text editors, and Windjack's Canopener.

 

I'll give you a few metrics and comments which may help:

 

  1. The Base PDF file size is about 1.4MB.  Much of this is because of your embedded fonts which take over 1.1MB
  2. Your form is a reader-extended dynamic XFA form.  That means that the PDF itself does not contain the real pages as PDF marking operators...  It's generated each time you open it in Reader from the XFA form definition and your data.
  3. The image itself is 1.9MB.  But remember that this image is Base64-encoded, so it takes four bytes of XML for every three of image.  That makes the XML data 2.6MB/image.  And I'll note again that that's an incredibly large image to use in a square inch image.
  4. The file you've given us has the image repeated 5 times.  That explains the 14MB file size (2.6*5+1=14).  You can see a snapshot of the XML data and its size in the canopener view for "big".
  5. I presume that you know that PDF files have a versioned structure, where changes to the file add on in incremental change areas.  The file you sent has two areas...  One about 1MB and one 13MB.  You can see these if you open the file in a good text editor and search for %%EOF.  That happens at the end of each incrememental change.  In other words, the incremental change is all the XML data and there is only one incremental update area.  See section 7.5.6 of the PDF reference manual if you'd like to know more about the incremental update.
  6. You also observed that if you open this file in Acrobat 9.1 and save it, the file shrinks from 14MB to 4MB.  This is due to a feature that Acrobat added where it will compress parts of the XFA data stream.  You can see this in the canopener view for small: it is the exact same uncompressed size, but is reduced 10MB by the flate_compression. So you can thank Acrobat engineering, but it won't help your form submission issue much
  7. I'll also note that a basic check that I did on your file was to export the form data (tools/ forms/ more form options/ manage form data/ export in Acrobat 10) and saw the same size XML data stream for both of these.

 

You're basically running up against basic laws of space conservation: put a number of big things in a flexible sack, and the sack grows. I'd suggest that you give strong guidance to folks on the size of the image that they use.

 

PDF can be a bit mysterious if you can't see what's happening.  That's why tools like Canopener are key to shedding daylight on the dark insides.

 

Finally, I will note that your filesize WILL increase when you add digital signatures.  The size comes when you sign, not when you add the field.  Simply stated, Acrobat (or Reader) will make a pdf marking set of the pages each time that the form is signed... that's the record part of it and it is a new level of incremental change.  So you can expect it to grow as signatures are added.  Again, this is even more reason to use appropriately sized images.


Viewing all articles
Browse latest Browse all 58

Latest Images

Trending Articles





Latest Images