Is it possible to get the pages of a chapter in ITextsharp or somehow split the file on chapters in vb.net, basically I'm concatenating multiple files into one pdf and separating them as chapters but sometimes I'll need to read these chapters out separately, is this possible?
A:
I used this example with great success
Merge PDF files with IText# And .Net
The trick is to use this keeping your pages in memory stream so you can a) write them as individual pages and b) hand them to the merger to merge together.
It is fast too. I have code that can produce 100s of documents in less than a minute, in merged and singular form.
CResults
2010-03-01 09:32:00
Thanks for the reply, I have seen that link alright, my problem is that the merged pdf could be created and a week or two later perhaps chapter 3 would be required by a person which I was hoping to read out as a stream. I need to be able to find the chapter page to do a split or find some way to read that chapter from the pdf in a self contained way
Israfel
2010-03-01 09:38:35
How is the original PDF created? It may be less work to store the paragraphs elsewhere, eg. a DB, and then create them on the fly as you need them rather than try to extract them back out of a already created PDF.I have looked at pulling stuff back out of a PDF before using ITextSharp and although it is possible it's not pretty because of the way PDF files are formatted.
CResults
2010-03-01 10:33:33
Using ITextSharp, I dont think you can split a file after its been generated. Thanks for your help anyway.
Israfel
2010-03-11 09:15:30