How can i Detect Corrupt PDF in PdfTron Windows 8.1 RT APP.?

133 views
Skip to first unread message

charw...@spurtreetech.in

unread,
Jun 6, 2016, 12:43:46 PM6/6/16
to PDFTron PDFNet SDK
i, want to know how can i detect corrupt document in Pdftron for Windows 8.1 RT App.is there any method in Pdftron .NET API.?

Ryan

unread,
Jun 6, 2016, 8:32:51 PM6/6/16
to PDFTron PDFNet SDK
You can detect if a PDF had a corrupt cross reference table, and was reported, see this post shows when and how.

Beyond that it is not generally possible to detect if a PDF is corrupt. To do so would require using every part of the file (rendering, text extraction, bookmarks, marked content, all layers, etc). For instance, the PDF might be correct, but a particular embedded font is malformed in some way, which isn't apparent until some part of the font is accessed (rendering or text selection).

If this doesn't help please let us know why detecting corrupt documents is important for you.

charw...@spurtreetech.in

unread,
Jun 7, 2016, 12:56:15 PM6/7/16
to PDFTron PDFNet SDK
i am unable to get whats exactly going on there.?  please let me know clearly how to detect a Corrupt Document From File path
 
For Example this my 

doc = new pdftron.PDF.PDFDoc(filename); // Where File Name Will Have Document local Storage path . so from here how can i detect ?

Ryan

unread,
Jun 7, 2016, 1:50:16 PM6/7/16
to PDFTron PDFNet SDK
This is the code

PDFDoc doc = new pdftron.PDF.PDFDoc(filename);
m_corruption_detected_and_repaired
= doc.IsModified();
doc
.InitSecurityHandler();



Reply all
Reply to author
Forward
0 new messages