Parsing PDF after opening the PDF file

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v7)  /  Parsing PDF after opening the PDF file

DynamicPDF CoreSuite for .NET (v7) Forum

Hi

Process is Extracting the Contents of the PDF file.
Steps
1.Reading the file and saving it in Memory Stream.
2.Creating an object of  PdfDocument and Passing the file from the memory stream as shown below (f.Value is the file from the memory stream)
 PdfDocument pdfA = new PdfDocument(f.Value);
Due to some reason I am getting

Exception:ceTe.DynamicPDF.Merger.PdfParsingException: Invalid PDF File. Cross-reference table not found.
   at ceTe.DynamicPDF.Merger.PdfDocument.e()
   at FileExtractor.PDFExtractor.ProcessParticipants(Dictionary`2 filesStream, String emailID)

But when I save the PDF file and again run the process then I was able to parse the PDf content.

So is there any way in which we can save it first and then do the parsing.

Please let me know on this as soon as possible.We have urgent deliverables
Posted by a ceTe Software moderator
Hello,

The error you are seeing could be caused if the PDF you are trying to open is corrupt or not encoded correctly. Sometimes such PDFs (even though they are corrupt) can be opened and viewed in Adobe Reader or Acrobat Pro as the Adobe products have the capability to fix the PDF encoding issues.

You will need to make sure that you are passing a valid PDF byte array ,stream to merge the PDF using our DynamicPDF products. Our product is capable of reading only the valid PDF documents and cannot fix the corrupt ones. Sometimes saving corrupt PDF in Adobe Reader or Acrobat Pro tends to fix any issues with the PDF and saves it as valid PDF document.

Thanks,
ceTe Software Support Team.
Hi

i have exact kind of issue.

what is the solution?

thanks
Posted by a ceTe Software moderator
Hello,

It looks like the PDF is corrupted or not complainant with the PDF specifications and hence you are getting error while merging using DynamicPDF Merger.

Please make sure to use a valid PDF document for merging. The DynamicPDF Merger product will read many invalid or corrupt PDFs, but not all of them. Try resaving the PDF by opening it with Acrobat Professional, doing a file save as… and see if that PDF will work for you.

Thanks,
ceTe Software Support Team

All times are US Eastern Standard time. The time now is 6:18 AM.