I have a multi-page PDF with photographed book pages. I want to remove gradients from every page to prepare for optical character recognition.
This command works fine on a PNG of a single page:
convert page.png \( +clone -blur 0x64 \) -compose minus -composite -channel RGB -negate page_deblurred.png
However, as soon as I try this on a multi-page PDF by using this command...
convert full.pdf \( +clone -blur 0x64 \) -compose minus -composite -channel RGB -negate full_deblurred.pdf
...I get a single-page PDF with inversed colors overlaid with text from several pages.
How do I tell imagemagick to process every page like it does with the PNG and return a multi-page PDF to me?