Support » Plugin: WordPress PDF Light Viewer Plugin » Problem in import pdf

  • Dear.

    In my sever is installed ImageMagick (ver 6.7), GhostScript, and order. But when i import file pdf is error:

    Fatal error: Uncaught exception ‘ImagickException’ with message ‘PDFDelegateFailed `[ghostscript library] -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 “-sDEVICE=pngalpha” -dTextAlphaBits=4 -dGraphicsAlphaBits=4 “-r72x72” “-sOutputFile=/tmp/magick-1034067fk1zKXe3EqIu%d” “-f/tmp/magick-1034067Yjn0_bmmzXhK” “-f/tmp/magick-1034067QZVPDRQeKFRZ”‘: -dname= must be followed by a valid token @ error/pdf.c/InvokePDFDelegate/263’ in /home/ourshaa124/public_html/test/wp-content/plugins/pdf-light-viewer/controllers/PdfController.php:580 Stack trace: #0 /home/ourshaa124/public_html/test/wp-content/plugins/pdf-light-viewer/controllers/PdfController.php(580): Imagick->readimage(‘/home/ourshaa124/…’) #1 [internal function]: PdfLightViewer_PdfController::save_post(4) #2 /home/ourshaa124/public_html/test/wp-includes/plugin.php(524): call_user_func_array(Array, Array) #3 /home/ourshaa124/public_html/test/wp-includes/post.php(3398): do_action(‘save_post_pdf_l…’, 4, Object(WP_Post), true) #4 in /home/ourshaa124/public_html/test/wp-content/plugins/pdf-light-viewer/controllers/PdfController.php on line 580

    Could you tell me what problems from? Is ImageMagick 6.7 working with your plugin? Thanks for your help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author antongorodezkiy

    (@antongorodezkiy)

    Hello @quangtri,

    Yes and no, in some cases ImageMagick 6.7 will work, this depends on PDF document. But the main work is left for GhostScript. We’ve described similar issue on our support forum https://support.wp.teamlead.pw/q/exception-imagickexception-with-message-pdfdelegatefailed/ but I’ll add it here for reference:

    This issue could appear in situation, when you are trying to import newly created PDFs with old versions of Ghostscript, for example Ghostscript 8.70 which was released about 7 years ago! – in 2009-07-31 ( http://ghostscript.com/doc/current/History8.htm )

    If you import PDF and see the described error, probably (but not definitely) your PDF contains some parts, formatting or content which were added to the format/specification after 2009.

    And that’s probably the reason why you cannot convert this PDF. Though for more simple and/or old PDF Ghostscript 8.70 could work perfectly and because of that we do not limit Ghostscript requirements.

    We could successfully import most test PDFs from our users with Ghostscript 9.18 (released in 2015).

    Besides that’s the good practice to update software often for security reasons.

    Please let me know your GhostScript version. Also you can send us example PDF so we could test it on our side ( support@teamlead.pw )

    Plugin Author antongorodezkiy

    (@antongorodezkiy)

    Hello @quangtri,

    I’m contacting you to add some new information about the issue.

    Today (thanks to Michael, one of our patient users) we’ve found that in some cases the issue is not in the old GhostScript installation and probably could be solved by using GraphicsMagick instead of ImageMagick wrapper.

    More info is on support forum: https://support.wp.teamlead.pw/q/exception-imagickexception-with-message-pdfdelegatefailed/

    Hi,
    i am facing same issue anybody help me, i got this error:
    “Fatal error: Uncaught exception ‘ImagickException’ with message ‘PDFDelegateFailed `[ghostscript library 8.70] -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 “-sDEVICE=pngalpha” -dTextAlphaBits=4 -dGraphicsAlphaBits=4 “-r72x72” “-sOutputFile=/tmp/magick-304250pBcGYnfJZES%d” “-f/tmp/magick-30425_Y5lP8L57PBv” “-f/tmp/magick-30425Tcwkxl4TTIE8″‘: Error: /invalidfont in /findfont Operand stack: –dict:8/17(L)– TT2 1 FontObject –dict:8/8(L)– –dict:8/8(L)– Arial-BoldMT –dict:9/9(L)– Helvetica-Bold Helvetica-Bold Execution stack: %interp_exit .runexec2 –nostringval– –nostringval– –nostringval– 2 %stopped_push –nostringval– –nostringval– –nostringval– false 1 %stopped_push 1846 1 3 %oparray_pop 1845 1 3 %oparray_pop 1829 1 3 %oparray_pop –nostringval– –nostringval– 2 1 1 –nostringval– %for_pos_int_continue –nostringval– –nostringval– –nostringval– –nos in”
    Thank in advance

    Plugin Author antongorodezkiy

    (@antongorodezkiy)

    Hello @mukeshkalra,

    I believe you’ve read the posts in this thread above, but just in case I’ll add info again.

    I can see you use Ghostscript 8.70, so the issue could be in it:

    This issue could appear in situation, when you are trying to import newly created PDFs with old versions of Ghostscript, for example Ghostscript 8.70 which was released about 7 years ago! – in 2009-07-31 ( http://ghostscript.com/doc/current/History8.htm ) If you import PDF and see the described error, probably (but not definitely) your PDF contains some parts, formatting or content which were added to the format/specification after 2009. And that’s probably the reason why you cannot convert this PDF. Though for more simple and/or old PDF Ghostscript 8.70 could work perfectly and because of that we do not limit Ghostscript requirements. We could successfully import most test PDFs from our users with Ghostscript 9.18 (released in 2015). Besides that’s the good practice to update software often for security reasons.

    Also in some cases the issue could be solved by using GraphicsMagick instead of ImageMagick wrapper. In this case and if you use cPanel for example, you could switch them like this cpanel

    More info is on support forum: https://support.wp.teamlead.pw/q/exception-imagickexception-with-message-pdfdelegatefailed/

    Also you can send us example PDF so we could test it on our side ( support@teamlead.pw )

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Problem in import pdf’ is closed to new replies.