[Scribus] Producing per-page diffs of PDFs?
Craig Bradney
cbradney
Tue Mar 20 15:46:57 CET 2007
> ----- Original Message -----
> Subject: Re: [Scribus] Producing per-page diffs of PDFs?
> From: avox <avox at arcor.de>
> To: scribus at nashi.altmuehlnet.de
> Date: 20-03-2007 15:38
>
>
>
>
>
> Brian Burger wrote:
> >
> > This is more a PDF question and less a Scribus one, but this is still
the
> > best group I can think of to ask...
> >
> > Is it possible to produce per-page diffs of two PDFs?
> >
>
> Here's my idea:
>
> use ghostscript to produce a png for each page:
>
> gs -sDEVICE=pngalpha -r 150x150 -sOutputFile=oldaim-%.png oldaim.pdf
> gs -sDEVICE=pngalpha -r 150x150 -sOutputFile=newaim-%.png newaim.pdf
>
> then use Imagemagick's "composite" to calc the image-diffs:
>
> for i in oldaim-?.png ; do
> composite -compose difference $i new${i#old} diff${i#old}
> done
>
> then check the files diffaim-%.png visually for differences.
> Identical pages should produce a white diff, otherwise the pixels where
they
> differ are nonwhite.
>
> If for some reason the pages show an irrelevant systematic difference (off
> by a pixel, new footer, ...)
> you can try to design an ImageMagick filter which covers that.
The problem is that text flow over page boundaries will change both text and
image based page-by-page comparisons. One new paragraph on page 1 can
affect the next 250 pages.. if you are unlucky.
Craig
More information about the scribus
mailing list