sanPerl has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,
I need to compare two PDF documents and get the report. Is there any Perl module which is already doing it? I haven't found any module in CPAN which can compare PDFs and provide me difference.
As an alternative I have can create a Batch process in Acrobat which can compare multiple files. However I do not want to purchase Acrobat license for this reason.

Replies are listed 'Best First'.
Re: Comparing PDF files
by shmem (Chancellor) on Jun 23, 2006 at 07:39 UTC
    It may be obvious to you which aspects of the PDFs you want to compare, but not for me.

    Text, layout, colors? What kind of report do you need?

    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
      I need to compare text & layout. The report should provide the information just like Acrobat distiller provides, while executing option 'compare documents'-> 'page by page visual compare'.
      I am Not sure if this can be done in Perl. I am just checking if I can save some money or Not :-)
        sanPerl,

        Since you have not given us the details of what "'compare documents'-> 'page by page visual compare'" actually returns I would suggest either looking a the Document Traversing functions of CAM::PDF or reading How do I post a question effectively?, and giving us as much information as you can regarding what you are trying to achieve.

        Martin
Re: Comparing PDF files
by dragonchild (Archbishop) on Jun 23, 2006 at 14:19 UTC
    Take a look at what Test::PDF does to see how to drive CAM::PDF to do the comparison.

    My criteria for good software:
    1. Does it work?
    2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
Re: Comparing PDF files
by Praveen (Friar) on Jun 23, 2006 at 09:07 UTC
    Hi,
    Only Adobe Acrobat 7.0 Professional is the best way to compare PDF document for both text & layout. Write a plug-in through Acrobat SDK for batch process.
A reply falls below the community's threshold of quality. You may see it by logging in.