Imagemagick Konvertierung von PDF in JPG fehlgeschlagen

2118
Scott

Ich versuche, die erste Seite einer PDF-Datei in eine JPG-Datei zu konvertieren. Ich bin mir ziemlich sicher, dass ich mit bestimmten PDF-Dateien arbeiten kann, aber ist es wirklich möglich, dass bestimmte PDFs falsch erstellt werden und nicht konvertiert werden können?

Ich habe versucht, dies zuerst auszuführen:

$ convert 10-03-26.pdf[1] test.jpg 

Und ich habe folgendes bekommen:

Error: /syntaxerror in readxref Operand stack:  Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1 3 %oparray_pop 1 3 %oparray_pop --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- Dictionary stack: --dict:1062/1417(ro)(G)-- --dict:0/20(G)-- --dict:73/200(L)-- --dict:73/200(L)-- --dict:97/127(ro)(G)-- --dict:229/230(ro)(G)-- --dict:14/15(L)-- Current allocation mode is local ESP Ghostscript 7.07.1: Unrecoverable error, exit code 1 convert: Postscript delegate failed `10-03-26.pdf'. 

Stattdessen das ausführen:

$ convert -verbose -colorspace rgb '10-03-26.pdf[1]' test.jpg 

Ich bekomme folgendes:

Error: /syntaxerror in readxref Operand stack:  Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1 3 %oparray_pop 1 3 %oparray_pop --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- Dictionary stack: --dict:1062/1417(ro)(G)-- --dict:0/20(G)-- --dict:73/200(L)-- --dict:73/200(L)-- --dict:97/127(ro)(G)-- --dict:229/230(ro)(G)-- --dict:14/15(L)-- Current allocation mode is local ESP Ghostscript 7.07.1: Unrecoverable error, exit code 1 "gs" -q -dBATCH -dSAFER -dMaxBitmap=500000000 -dNOPAUSE -dAlignToPixels=0 "-sDEVICE=pnmraw" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-g792x1611" "-r72x72" -dFirstPage=2 -dLastPage=2 "-sOutputFile=/tmp/magick-XXU3T44P" "-f/tmp/magick-XXoMKL8Z" "-f/tmp/magic2eec1F"Start of Image Define Huffman Table 0x00 0 1 5 1 1 1 1 1 1 0 0 0 0 0 0 0 Define Huffman Table 0x01 0 3 1 1 1 1 1 1 1 1 1 0 0 0 0 0 Define Huffman Table 0x10 0 2 1 3 3 2 4 3 5 5 4 4 0 0 1 125 Define Huffman Table 0x11 0 2 1 2 4 4 3 4 7 5 4 4 0 1 2 119 End Of Image convert: Postscript delegate failed `10-03-26.pdf'. 

Warum schlägt die Konvertierung fehl?

Nebenbei bemerkt geschieht dies auf einem (gs) Grid-Service auf (mt) Media Temple-Hosting. Ich kann keine Programme auf dem Server installieren, aber sowohl Imagemagick als auch Ghostscript sind installiert

Vielen Dank!

2

1 Antwort auf die Frage

2
Scott

Das Problem war, dass die Dateien mit Acrobat 5.0 kompatibel gemacht werden müssen, um mit einer alten Ghostscript-Version arbeiten zu können.

Heutzutage scheint eine solche Frage für stackoverflow durchaus akzeptabel zu sein. Das Problem in meinem Fall war das Gegenteil - der Versuch, eine 2018-PDF-Arbeit mit einer zu alten Version von Ghostscript (in Docker) zu verarbeiten. Vielen Dank! jtlz2 vor 5 Jahren 0