Hello,
I need to find a particular image in PDF (i.e X Mark). If that image is found then my PDF page count should end and split the file.
Eg:- I have a PDF file that has 10 pages. The 6th page of PDF contains image (X), so it has to split pages 1 to 5 and save as the file Page 1 to 5.pdf. Remaining 7 to 10 pages should again split and save as Page 7 to 10.pdf
Below is the image (X) for your reference.
Regards,
Vinod
Hi Vinod,
It sounds more of the application logic. During preparation of the page split the content into two different DOM elements, based on the subjected image. Just before processing of the pdf file, you may would like to implement the logic to send the contents (InnerHTML) of these two DOM elements separately for two different PDF files.
Swatantra
Swatantra Kumar wrote:
Hello Swatantra,
I'm not sure how this helps Vinod's problem. It sounds like he has a PDF file and needs to try to split the file into multiple files, which has nothing to do with DOM parsing. Can you elaborate?
Vinod Kumar wrote:
Hello Vinod,
This would probably need to be done using PDF libraries in C# in an extension. It looks like it can be done with E-IceBlue, but that is a proprietary product (https://www.e-iceblue.com/Tutorials/Spire.PDF/Spire.PDF-Program-Guide/NET-Split-PDF-Simply-Split-PDF-Document-to-Multiple-Files-with-C-VB.NET.html )
You might be able to use PDFSharp or iTextSharp (again noting iTextSharp has license restrictions)
Craig St.Jean wrote:
Hi Craig,
I have gone through the above link, but this PDF split is based on the page count of the current file.
My problem statement is something different:- The X mark which I mentioned is in image format, so it has to identify the image in the whole PDF. If the image exists then the pages have to be split between those images.