Hello,
I have some PDG with ~100 pages to convert on 3 differents size JPG, my server take 1h30-2h to create the picture.
I have three command to done this :
C:\ImageMagick\convert.exe -limit memory 12GiB -limit map 12GiB -density 300 c:\1.pdf -resize 200x266 -interlace none -density 72 -quality 80 c:\jpg\200_266_page.jpg"
C:\ImageMagick\convert.exe -limit memory 12GiB -limit map 12GiB -density 300 c:\1.pdf -resize 1536x2048 -interlace none -density 72 -quality 80 c:\jpg\1536_2048_page.jpg"
C:\ImageMagick\convert.exe -limit memory 12GiB -limit map 12GiB -density 300 c:\1.pdf -resize 2048x2730 -interlace none -density 72 -quality 80 c:\jpg\2048_2730_page.jpg"
This commands are called by a script php with the command exec.
The limit memory and map seems don't work
Do you an idea to help me to optimize my job
Thanks a lot
[CLOSE]Optimise Convert
[CLOSE]Optimise Convert
Last edited by mvs on 2014-11-07T08:51:28-07:00, edited 1 time in total.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Optimise Convert
You are rasterizing the same PDF three times. This can be done just once. Windows BAT syntax:
Code: Select all
C:\ImageMagick\convert.exe ^
-limit memory 12GiB -limit map 12GiB -density 300 ^
c:\1.pdf ^
-interlace none -density 72 -quality 80 ^
( -clone 0--1 -resize 200x266 -write c:\jpg\200_266_page.jpg" -delete 0--1 ) ^
( -clone 0--1 -resize 1536x2048 -write c:\jpg\1536_2048_page.jpg" -delete 0--1 ) ^
-resize 2048x2730 c:\jpg\2048_2730_page.jpg"
snibgo's IM pages: im.snibgo.com
Re: Optimise Convert
thanks for your replay
It seems faster with a 10 page PDf but I have an error message with the last line :
Error Message :
Do you have an idea ?
Thanks a lot
Edit :
Ok i erase the end of the line clone...
It's ok now
Thanks you for your help I'll try on my server
It seems faster with a 10 page PDf but I have an error message with the last line :
Code: Select all
C:\ImageMagick\convert.exe -limit memory 12GiB -limit map 12GiB -density 300 "E:/www/test_img/4/1_pdfsam_B175_fusion-tablette-150dpi.pdf" -interlace none -density 72 -quality 80 ^ ( -clone 0--1 -resize 200x266 -write E:/www/test_img/4/jpg/200_266_page.jpg ^
( -clone 0--1 -resize 1536x2048 -write E:/www/test_img/4/jpg/1536_2048_page.jpg ^
-resize 2048x2730 E:/www/test_img/4/jpg/2048_2730_page.jpg
Code: Select all
convert.exe: unbalanced parenthesis 'E:/www/test_img/4/jpg/2048_2730_page.jpg'
@ error/convert.c/ConvertImageCommande/3039
Thanks a lot
Edit :
Ok i erase the end of the line clone...
It's ok now
Code: Select all
C:\ImageMagick\convert.exe -limit memory 12GiB -limit map 12GiB -density 300 "E:/www/test_img/4/1_pdfsam_B175_fusion-tablette-150dpi.pdf" -interlace none -density 72 -quality 80 ^ ( -clone 0--1 -resize 200x266 -write E:/www/test_img/4/jpg/200_266_page.jpg -delete 0--1 ) ^
( -clone 0--1 -resize 1536x2048 -write E:/www/test_img/4/jpg/1536_2048_page.jpg -delete 0--1 ) ^
-resize 2048x2730 E:/www/test_img/4/jpg/2048_2730_page.jpg
Re: Optimise Convert
Il very slow so i'll try another way and it's succed. I make 5 jpg by page in 10min
For that i make my treatment page by page with a while in php and it will be very faster!!
If that post can help someone !!
For that i make my treatment page by page with a while in php and it will be very faster!!
If that post can help someone !!
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: [CLOSE]Optimise Convert
On a 94-page A4 PDF, my command on my laptop (Windows 8.1) takes 1m54s, roughly 1 page per second. I don't know why yours is much slower.
snibgo's IM pages: im.snibgo.com