Support » Plugin: WordPress PDF Light Viewer Plugin » Fatale Error on import

  • Resolved Sébastien SERRE

    (@sebastienserre)


    Hello,
    When importing a pdf I have this error msg:

    [03-Aug-2019 08:37:42 UTC] PHP Fatal error:  Uncaught ImagickException: Failed to read the file in /var/www/eglises/prod/wp-content/plugins/pdf-light-viewer/src/controllers/PdfController.php:823
    Stack trace:
    #0 /var/www/eglises/prod/wp-content/plugins/pdf-light-viewer/src/controllers/PdfController.php(823): Imagick->readimage('/var/www/eglise...')
    #1 /var/www/eglises/prod/wp-content/plugins/pdf-light-viewer/src/controllers/PdfController.php(699): PdfLightViewer_PdfController::getPDFPagesNumber('/var/www/eglise...')
    #2 /var/www/eglises/prod/wp-includes/class-wp-hook.php(288): PdfLightViewer_PdfController::save_post(308872, Object(WP_Post))
    #3 /var/www/eglises/prod/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array)
    #4 /var/www/eglises/prod/wp-includes/plugin.php(465): WP_Hook->do_action(Array)
    #5 /var/www/eglises/prod/wp-includes/post.php(3940): do_action('save_post_pdf_l...', 308872, Object(WP_Post), true)
    #6 /var/www/eglises/prod/wp-includes/post.php(4028): wp_insert_post(Array, false)
    #7 /var/www/eglises/prod/wp-admin/includes/post.p in /var/www/eglises/prod/wp-content/plugins/pdf-light-viewer/src/controllers/PdfController.php on line 823

    do you have any idea why it’s impossible for the plugin to read the pdf ?

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

    (@antongorodezkiy)

    Hello @sebastienserre

    The first idea is filename. Does it have some special symbols, diactrics, etc.? What if try to rename it to something like ‘test_pdf1.pdf’?

    In more rare cases the issue could be in file access permissions. But if you’ve just uploaded that file via WordPress uploader, then that should not be a problem.

    Sébastien SERRE

    (@sebastienserre)

    Hello,

    I tested with a simple test.pdf file and got the same error.
    Files are 644 and folders 755
    Pdf uploaded by WP file manager

    Plugin Author antongorodezkiy

    (@antongorodezkiy)

    Could you please share example PDF so I could test it on our side? You can send it to support@teamlead.pw

    Also please let me know what versions of ImageMagick and GhostScript are you using?

    Sébastien SERRE

    (@sebastienserre)

    Tested with
    https://cloud.thivinfo.com/index.php/s/nzLxFnEEPsSzjQQ
    and
    https://cloud.thivinfo.com/index.php/s/35mkbLz83o7c4dP
    Imagick or Gmagick PHP Wrapper is supported. v.ImageMagick 6.9.7-4 Q16 x86_64 20170114 http://www.imagemagick.org

    Plugin Author antongorodezkiy

    (@antongorodezkiy)

    I could successfully import the first file – https://nimb.ws/xJb5XQ

    In our testing environment we have
    – ImageMagick – 6.9.7-4 Q16 x86_64 20170114
    – GhostScript – v.9.26

    Sébastien SERRE

    (@sebastienserre)

    so with the same config, you succesfully import ?

    Plugin Author antongorodezkiy

    (@antongorodezkiy)

    @sebastienserre Yes, that’s correct.

    Do you have GhostScript 9.26 as well?

    What hosting provider do you use?

    Could you please try to import this PDF for test – https://pdf-light-viewer.wp.teamlead.pw/wp-content/uploads/sites/5/2015/12/2015Q2_google_earnings_slides.pdf ?

    Sébastien SERRE

    (@sebastienserre)

    Ghoscript was not installed despite your plugins said it was in plugins requirement…
    Do you store plugins requirement somewhere?
    I moved from a an old to a new server and I think your plugin didn’t redo the tests… so It show in green that requirement are ok but not…

    Plugin Author antongorodezkiy

    (@antongorodezkiy)

    > Do you store plugins requirement somewhere?

    We didn’t cache requirements, they are always showing in real-time – https://github.com/antongorodezkiy/pdf-light-viewer/blob/master/src/Plugin.php#L121

    But if you had “Do not check GhostScript” checkbox checked, real check was bypassed.

    Sébastien SERRE

    (@sebastienserre)

    oh…
    ok, many thanks

    Plugin Author antongorodezkiy

    (@antongorodezkiy)

    @sebastienserre You’re welcome!

    Fatal error: Uncaught exception 'ImagickException' with message 'unable to open image/home/*****/staging/1/wp-content/uploads/pdf-light-viewer/3107/page-00001.jpg’: No such file or directory @ error/blob.c/OpenBlob/2705′ in /home/*****/staging/1/wp-content/plugins/pdf-light-viewer/src/controllers/PdfController.php:872 `

    Stack trace: #0 /home/******/staging/1/wp-content/plugins/pdf-light-viewer/src/controllers/PdfController.php(872): Imagick->readimage(‘/home/*****/st…’) #1 /home/*****/staging/1/wp-content/plugins/pdf-light-viewer/src/controllers/PdfController.php(700): PdfLightViewer_PdfController::getFirstPageGeometry('300', '60', '/home/*****/st...', '/home/*****/st...')
    #2 [internal function]: PdfLightViewer_PdfController::save_post(3107, Object(WP_Post))
    #3 /home/*****/staging/1/wp-includes/class-wp-hook.php(288): call_user_func_array(Array, Array)
    #4 /home/*****/staging/1/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array)
    #5 /home/*****/staging/1/wp-includes/plugin.php(465): WP_Hook->do_ in /home/*****/staging/1/wp-content/plugins/pdf-light-viewer/src/controllers/PdfController.php on line 872

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Fatale Error on import’ is closed to new replies.