What I need is a scripted method to get around a problem with Acrobat X’s pixel-based compare documents function. If I crop to trim in both documents for example, it seems to be able to pick out the areas to compare alright, but the annotations that mark any differences are located incorrectly—as if the comparison is performed under one coordinate system and the annotation is handled via another.
There are ways around this outside of scripting. For example, pdfToolBox5 has a “Set MediaBox to origin” fixup that seems to do the trick, but I’m looking for a scripted method. So far, the only way that I’ve been able to get around the misplaced annotations problem is to export a postscript file after cropping, distill that, and then compare.
Thanks for any help on this.
What is the result of running this code from the console window:
is the new Media Box the same as the Crop? It should be.
The source for PDF Scripting Info