How do I comparing two PDF documents? How can I find if the page is gray or colored?

65 views
Skip to first unread message

Support

unread,
May 5, 2011, 3:25:41 PM5/5/11
to PDFTron PDFNet SDK
Q: I need to find out how to compare 2 PDFs, 1 is a colored and one is
grayshaded.
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.
For example:

a) You could use PDFDraw to render PDF images and then use image diff
(http://pdiff.sourceforge.net/) to determine visual difference and
errors.
b) You could use ElementReader to perform a vector diff between two
documents. This type of comparison is much more difficult to
implement.
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:

http://groups.google.com/group/pdfnet-sdk/t/8aebd4cd1ea1e09a
http://groups.google.com/group/pdfnet-sdk/t/2ba3d8813bbba52c
http://groups.google.com/group/pdfnet-sdk/t/be3d5159b4037916



Reply all
Reply to author
Forward
0 new messages