Tomáš Bucki schreef op 15/11/2013 15:24:
> Bookmarks probably will be in our PDF files, but annotations not.
>
> The idea to store the whole file in one place and streams in another is a 
> valid solution also. If there are some methods how to separate and again 
> recreate them to valid PDF file in iText. I suppose that streams will be 
> stored only once based on their hashes.

Yes, that would be the idea.
It's fairly easy to use iText to extract binary streams and replace them 
with a zero byte stream (resulting in a PDF that will only show blank 
pages, but keeping stuff like bookmarks intact). It's also fairly easy 
to do the reverse and replace the zero byte streams with the actual streams.
Using hashes to identify streams that are identical is exactly what 
PdfSmartCopy is doing to downsize PDF files with redundant information, 
so storing streams based on their hashes (but maybe also some other 
info, such as the original length of the stream) would work.

> About deep nested XObjects - do not know, so it is better to suppose that yes 
> - will be in PDF's.

This isn't a problem if you say it's OK to strip a PDF from all its 
streams and then reinsert the streams afterwards.

> About the fonts - fonts will be subsetted, but there will be about 100000000 
> PDF pages with the similar resources so even with subsets we should be able 
> to save some place.
OK.

------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to