Support » Plugin: WordPress PDF Light Viewer Plugin » PDF Import Failure

  • Resolved Aniket

    (@aniash_29)


    Hi,

    We have been using “WordPress PDF Light Viewer” for more than a year now and it is a great plugin. Cheers!

    However the PDF import functionality stopped working recently. It was all working fine until 22nd October, 2018. We did some troubleshooting and here are our findings:

    1. This is not a file/directory permissions error as we tried resetting file/directory permission on our server but all in vain.
    2. We currently run PHP 7.0 and also tried downgrading and upgrading to PHP 5.6 and PHP 7.2 respectively. Even this did not help.
    3. The current PHP configuration of server in question is:
      PHP version: 7.0
      ImageMagick version: 6.8.9-9 Q16 x86_64 2018-09-28
      Imagick version: 3.4.3
      We installed and tested the PDF Light Viewer plugin on another server, with the following:
      PHP configuration: 7.0
      ImageMagick version: 6.7.2-7 2017-03-22 Q16
      Imagick version: 3.1.2
      And it works flawlessly on the other server with an older version of Imagick and ImageMagick.
    4. When we tried to dig deep into this, we found out that things go bad with getPDFPagesNumber method in PdfLightViewer_PdfController class.

    We are not sure about the reason why would this happen, but hope this information helps you in troubleshooting issue. Let us know if you need any further debugging information.

    Looking forward to hearing from you on this. Thanks in advance.

    • This topic was modified 1 year, 1 month ago by Aniket.
    • This topic was modified 1 year, 1 month ago by Aniket.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi,

    Update: This is now resolved for me.

    If you are facing the same issue, make sure you read this: https://www.imagemagick.org/script/security-policy.php. ImageMagick requires that you configure an apt security policy on your server/environment. The import process issue should resolve once you have it in place.

    Plugin Author antongorodezkiy

    (@antongorodezkiy)

    Hello @aniash_29,

    Thank you for using our plugin.

    And great thanks for sharing your solution with us and with other users, we appreciate that.

    I’m getting this error on upload. Not sure if it’s related to this upload issue, but posting here to let you know that WP Engine cannot amend/update the image majick policy on a shared server, so it is rendering the plugin obsolete on WP Engine. I can’t use it anymore if I can’t upload PDFs on my host.

    Import process failed due to the error: FailedToExecuteCommand‘gs’ -sstdout=%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 ‘-sDEVICE=pngalpha’ -dTextAlphaBits=4 -dGraphicsAlphaBits=4 ‘-r300x300’ -dFirstPage=1 -dLastPage=1 ‘-sOutputFile=/tmp/magick-23487EEPEDzqOBeQR%d’ ‘-f/tmp/magick-23487rdInUyGxUeMu’ ‘-f/tmp/magick-23487Rozj53EJ0fI7” (-1) @ error/delegate.c/ExternalDelegateCommand/462`

    Plugin Author antongorodezkiy

    (@antongorodezkiy)

    Hello @tonyzeoli,
    Main plugin version has strict requirements about ImageMagick/GhostScript, so it won’t work without them.
    Alternatively, we developed PDF Light Viewer Serverless addon (will be releases next few weeks on https://codecanyon.net/user/teamlead-power/portfolio ) which will give an ability to import PDFs without ImageMagick/GhostScript requirements.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘PDF Import Failure’ is closed to new replies.