Embedding flash into pdf files have many uses: enriching PDF’s with animation, playing movies, handling forms or creating games. However, there is a huge problem with some flash files embedded: pdf file size.
If one embed a (lets say) 200kb flash file into same-sized pdf file, you can get 4-6mb pdf file. This is way too much: it is like 10 times more than it should be there. And this is quite typical result for more complex flashes, like ones with animation or requesting something from remote servers.
The problem might be related to custom flash player used to play flash files from within PDF. The PDFs with Embedded flash work even if there is no Flash player preinstalled on PC. It might be that these flashes are pre-compiled in PDF. So, heavily animated multi-page flashes could reach sizes of 50-60m, which are not appealing to download.
However, there is an approach to reduce the size of the PDF, and it is not that hard. Adobe Acrobat pre-compiles the embedded into page flash only, and not ones that are loaded, no matter if they are embedded in PDF itself or stored on the web. The loader flash does not takes too much space, also it can be the same for many pages (if flashes are similar in size).
There are 2 drawblacks of this approach:
You cannot pass custom parameters for the loaded flashes, or at least we could not find a way. So each loaded flash has to be compiled separately even if the difference between them is small.
You will have to add screenshots/thumbnails of initial flash sequence to each loader insertion, as starting frame for loader is blank.
And thanks for Aidas for finding this solution.
0 Comments