A
A
alekssamos2020-04-06 13:54:20
ImageMagick
alekssamos, 2020-04-06 13:54:20

Can memory consumption be reduced or optimized?

convert -density 690  KP_History_1999.pdf KP_History_1999.png

Works on small files.
If more than 12 mb - after 30 minutes of work writes:
convert-im6.q16: DistributedPixelCache '127.0.0.1' @ error/distribute-cache.c/ConnectPixelCacheServer/244. convert-im6.q16: cache resources exhausted `/tmp/magick-11061MEzPYSEDxjud3' @ error/cache.c/OpenPixelCache/3945.

Changed the file /etc/ImageMagick-6/policy.xml
And it helps, but again for small files.
For large memory, the server simply does not have enough.
And how to be?
And if not 12 mb, but 20? This is how much, 8 gb for one request and an hour of work?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alekssamos, 2020-08-08
@alekssamos

pip3 install pdf2image

PDF page 1 -> page_1.jpg
PDF page 2 -> page_2.jpg
PDF page 3 -> page_3.jpg
….
PDF page n -> page_n.jpg

Source

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question