How do I comparing two PDF documents? How can I find if the page is gray or colored?
Skip to first unread message
May 5, 2011, 3:25:41 PM5/5/11
Reply to author
Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Report message as abuse
Sign in to report message as abuse
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to PDFTron PDFNet SDK
Q: I need to find out how to compare 2 PDFs, 1 is a colored and one is
Is there a way to find out if the PDF is colored or grayshaded.
A: PDFNet does not come with a built-in function to compare two PDFs,
however you can use the existing APIs to implement such functionality.
What type of PDF diff would you need? With PDFNet there are multiple
ways this functionality could be implemented.
a) You could use PDFDraw to render PDF images and then use image diff
(http://pdiff.sourceforge.net/) to determine visual difference and
b) You could use ElementReader to perform a vector diff between two
documents. This type of comparison is much more difficult to
c) You can use pdftron.PDF.TextExtractor (as shown in TextExtract
sample - http://www.pdftron.com/pdfnet/samplecode.html#TextExtract) to
extract the text, font, color, and positioning information.
> Is there a way to find out if the PDF is colored or grayshaded.
The following PDFNet Forum articles seem to be relevant: