Hi all,

Thanks for the answers, it seems usable and in the fact similar what we want to 
do. Is it possible to show me or direct me to some API which will allow me to 
extract binary streams, replace it with zero byte stream and also direct me to 
some API which will do the opposite ?

Is it possible to send me some snippet  or direction to the iText in action 2nd 
edition chapters to study (we already have the book but it has more than 500 
pages) ?

Best regards,

Tomas Bucki


-----Original Message-----
From: iText Info [mailto:i...@1t3xt.info] 
Sent: Friday, November 15, 2013 4:11 PM
To: itext-questions@lists.sourceforge.net
Subject: Re: [iText-questions] PDF decompostion & composition (page, resources)

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

------------------------------------------------------------------------------
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