Search code examples
pdfimagemagickimagemagick-convert

"Insufficient data for image" when pdf file opened with Acrobat Reader DC


I am trying to make cursor-selectable text in a lot of pdf files unselectable. I use ImageMagick v6.9.10-23 in a script on Ubuntu to convert pdf to jpg and back to pdf as given below.

convert -density 300 -quality 100 selectable.pdf temp.jpg
convert temp.jpg unselectable.pdf

unselectable.pdf is displayed on Ubuntu machine using Evince no problem. It is displayed without problems using Chrome or Firefox on Ubuntu or Windows. However, when it is opened with Acrobat Reader DC on Windows, Acrobat shows error dialogue box "Insufficient data for image" and behind the box document is visible collaged three times side by side and page background is red instead of white.

How can this be fixed?


Solution

  • Printing unselectable.pdf to file printed.pdf fixes the problem. printed.pdf is displayed no problem using Acrobat Reader DC on Windows. This is my fix so far.