0
votes
  1. I am using PHP and Imagick to generate a thumbnail from a PDF. This worked on a previous server, but we have been switched to another server, and it has stopped working. I installed ImageMagick and Ghostscript, but it is still not working and gives an error. Any help with this would be helpful.

  2. The error is displaying on the website and I'm sure there is some configuration in ImageMagick or Ghostscript that will stop this, but I don't know how to do it.

You can see the page with the error here, and I will copy the error here so it is still available after we fix the error displaying on the page: http://www.mashburnfaireshomes.com/elevation.php?planid=42

Error: /invalidaccess in --run-- Operand stack: --dict:7/16(L)-- F4 108 --dict:5/5(L)-- --dict:5/5(L)-- AvantGarde-Demi --dict:11/12(ro)(G)-- --nostringval-- CIDFontObject --dict:6/6(L)-- --dict:6/6(L)-- 4936 --dict:6/6(L)-- --nostringval-- PDFCIDFontName AvantGarde-Demi Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1862 1 3 %oparray_pop 1861 1 3 %oparray_pop 1845 1 3 %oparray_pop --nostringval-- --nostringval-- 2 1 1 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- %array_continue --nostringval-- false 1 %stopped_push --nostringval-- %loop_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- %array_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- Dictionary stack: --dict:1157/1684(ro)(G)-- --dict:1/20(G)-- --dict:75/200(L)-- --dict:75/200(L)-- --dict:106/127(ro)(G)-- --dict:286/300(ro)(G)-- --dict:22/25(L)-- --dict:4/6(L)-- --dict:21/40(L)-- --dict:1/1(ro)(G)-- Current allocation mode is local

1

1 Answers

1
votes

That is an actual error from Ghostscript suggesting that your PDF 'may' be broken. However, without seeing the PDF file, knowing what version of Ghostscript you are running, and ideally the command line being used its not possible to say more.

If you are using an old version of GS its entirely possible this has been fixed, since its related to reading a CIDFont from the PDF file.

Assuming that the PDF accessed via the button 'Elevation B' is the PDF causing a problem I can say that current code, as well as the latest released Ghostscript version (9.15) can read the file and happily render it using a default configuration. If you had quoted the full stdout I would at least know which version of Ghostscript you are using.....