Article 4XE95 [SOLVED] using imagemagick convert in bash

[SOLVED] using imagemagick convert in bash

by
Pedroski
from LinuxQuestions.org on (#4XE95)
Hi to all, I wish you all a happy and prosperous 2020!

From this old thread I am trying to convert .pdf to a series of .jpg

I get this:

Quote:
pedro@pedro-newssd:~/babystuff/mergedPdf$ convert -colorspace RGB -interlace none -density 300x300 -quality 100 exam1.pdf exam1.jpg
convert-im6.q16: not authorized `exam1.pdf' @ error/constitute.c/ReadImage/412.
convert-im6.q16: no images defined `exam1.jpg' @ error/convert.c/ConvertImageCommand/3258.
pedro@pedro-newssd:~/babystuff/mergedPdf$
I was sort of hoping convert would number the .jpgs automatically. Looks like that is not so.

This is from Imagemagick.org

Quote:
Filename References

Optionally, use an embedded formatting character to write a sequential image list. Suppose our output filename is image-%d.jpg and our image list includes 3 images. You can expect these images files to be written:

image-0.jpg
image-1.jpg
image-2.jpg
So I tried this, get the same error:

Quote:
pedro@pedro-newssd:~/babystuff/mergedPdf$ convert exam1.pdf exam1_%d.jpg
convert-im6.q16: not authorized `exam1.pdf' @ error/constitute.c/ReadImage/412.
convert-im6.q16: no images defined `exam1_%d.jpg' @ error/convert.c/ConvertImageCommand/3258.
pedro@pedro-newssd:~/babystuff/mergedPdf$
How do I tweak this please?

My goal is to use pytesseract to convert a lot of old Chinese exams to Chinese text. Reading about this, I got the idea that maybe .tiff was better than .jpg.

Is that true?latest?d=yIl2AUoC8zA latest?i=NjNj8iIevxw:QIvAL-GHz5M:F7zBnMy latest?i=NjNj8iIevxw:QIvAL-GHz5M:V_sGLiP latest?d=qj6IDK7rITs latest?i=NjNj8iIevxw:QIvAL-GHz5M:gIN9vFwNjNj8iIevxw
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments