• Resolved Dennis Bareis

    (@dbareis)


    See your PDF icon under the “perform search” button (‘[bws_pdfprint display=”pdf”]‘). If I use CTRL+P, I can create a good PDF by printing to a PDF printer, if I use the plugin’s button I get a blank page.

    I have tried with and without using a shortcode and one generates a PDF with a title and no other contents and the other generates a completely blank page.

    The non-shortcode test was for “Plants” custom page type which is ticked in settings. The button shows up on the bottom right (it is configured for top right).

    I’m on PHP 7.4, WP 6.2, all plugins updated. With the only other active plugin being PODS the page is still blank.

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support andrewsupport

    (@andrewsupport)

    Hi,

    We visited your site page and did not find our PDF & Print buttons on your page. We found only our shortcode. Please specify if the PDF & Print plugin by BestWebSoft is activated on your site.
    Also, we kindly ask you to try to upgrade the MPDF library for the PDF&Print plugin if you have not updated it yet:
    1) Go to PDF & Print settings page;
    2) Open the “Misc” tab;
    3) Click the “Upgrade” button;
    4) Test the PDF doc creation and let us know about the result.

    Thread Starter Dennis Bareis

    (@dbareis)

    Hi,

    The upgrade seemed to have hung, left 10-15 minutes, found this in the log:

    [17-Apr-2023 23:22:40 UTC] PHP Notice: Trying to get property ‘post_title’ of non-object in /home/wcipporg/public_html/wp-content/plugins/pdf-print/pdf-print.php on line 1220
    [17-Apr-2023 23:22:40 UTC] PHP Notice: Trying to get property ‘ID’ of non-object in /home/wcipporg/public_html/wp-content/plugins/pdf-print/pdf-print.php on line 1220
    [17-Apr-2023 23:22:40 UTC] PHP Notice: Trying to get property ‘post_author’ of non-object in /home/wcipporg/public_html/wp-content/plugins/pdf-print/pdf-print.php on line 1222
    [17-Apr-2023 23:22:40 UTC] PHP Notice: Trying to get property ‘display_name’ of non-object in /home/wcipporg/public_html/wp-content/plugins/pdf-print/pdf-print.php on line 1223
    [17-Apr-2023 23:22:40 UTC] PHP Notice: Trying to get property ‘post_content’ of non-object in /home/wcipporg/public_html/wp-content/plugins/pdf-print/pdf-print.php on line 1242
    [17-Apr-2023 23:22:40 UTC] PHP Warning: include(/home/wcipporg/public_html/wp-content/uploads/vendor/autoload.php): failed to open stream: No such file or directory in /home/wcipporg/public_html/wp-content/plugins/pdf-print/pdf-print.php on line 1283
    [17-Apr-2023 23:22:40 UTC] PHP Warning: include(): Failed opening ‘/home/wcipporg/public_html/wp-content/uploads/vendor/autoload.php’ for inclusion (include_path=’.:/opt/alt/php74/usr/share/pear’) in /home/wcipporg/public_html/wp-content/plugins/pdf-print/pdf-print.php on line 1283
    [17-Apr-2023 23:22:40 UTC] PHP Fatal error: Uncaught Error: Class ‘Mpdf\Mpdf’ not found in /home/wcipporg/public_html/wp-content/plugins/pdf-print/pdf-print.php:1294
    Stack trace:

    0 /home/wcipporg/public_html/wp-includes/class-wp-hook.php(308): pdfprnt_print(Object(WP))

    1 /home/wcipporg/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)

    2 /home/wcipporg/public_html/wp-includes/plugin.php(565): WP_Hook->do_action(Array)

    3 /home/wcipporg/public_html/wp-includes/class-wp.php(797): do_action_ref_array(‘wp’, Array)

    4 /home/wcipporg/public_html/wp-includes/functions.php(1334): WP->main(”)

    5 /home/wcipporg/public_html/wp-blog-header.php(16): wp()

    6 /home/wcipporg/public_html/index.php(17): require(‘/home/wcipporg/…’)

    7 {main}

    thrown in /home/wcipporg/public_html/wp-content/plugins/pdf-print/pdf-print.php on line 1294

    I re-activated the plugin.

    Plugin Support andrewsupport

    (@andrewsupport)

    Hi,

    Could you please try to update the MPDF library manually? Follow the next steps in order to upgrade the MPDF library manually via FTP:

    1) Download and install the FTP client (for example, Filezilla).
    2) Open the FTP client and enter your FTP access credentials (host, username, and password) to access files on your server.
    3) Navigate to ‘yourwordpresswebsite/wp-content/plugins/pdf-print/vendor directory
    4) Delete (remove) ‘mpdf’ folder.
    5) Please use this link and download the archive. https://bestwebsoft.com/wp-content/plugins/paid-products/plugins/pdf-print-mpdf/?action=loading_library
    6) Unpack the archive and paste the “vendor” folder to ‘wp-content/uploads’ directory.
    7) Contact us back with information about the results.

    Thread Starter Dennis Bareis

    (@dbareis)

    The vendor directory was not where you said it was, but I assume the one I found (wp-content/plugins/pdf-print/mpdf/vendor) is what you meant… I have deleted “wp-content/plugins/pdf-print/mpdf” as requested (which also deletes the vendor directory…).

    The “vendor” directory tree from the zip is now at “wp-content/uploads/vendor” (deleted existing dir first).

    Plugin Support andrewsupport

    (@andrewsupport)

    Hi,

    We are sorry for the misunderstanding. You have found the right directory. Could you please specify if you tried to generate the PDF document after you unpack the archive and paste the “vendor” folder to ‘wp-content/uploads’ directory?

    Thread Starter Dennis Bareis

    (@dbareis)

    It is now working for “static” pages such as “https://www.wcipp.org.au/full-plant-list/?print=pdf”.

    It is not working for the dynamically PODS generated pages.

    Just the title generated for: https://www.wcipp.org.au/plant/z-test-adiantum-aethiopicum?print=pdf

    Nothing generated at “https://www.wcipp.org.au/search-plants?SearchText=&CatAndOr=OR&category%5B%5D=Fern#ShowMatchingPlants”, but also the URL gets corrupted: https://www.wcipp.org.au/search-plants?SearchText&print=pdf#038;CatAndOr=OR&category%5B%5D=Fern

    After fixing the corrupted url blank page for “https://www.wcipp.org.au/search-plants?SearchText=&CatAndOr=OR&category%5B%5D=Fern&print=pdf#ShowMatchingPlants”

    Note when it works there always seems to be an extra blank page at the end.

    Plugin Support andrewsupport

    (@andrewsupport)

    Hi,

    We don’t claim that the PDF & Print plugin works with the dynamic content. We recommend you try using the “Full Page Capture to PDF” option. In this case, the plugin will mirror what is shown on the screen. If the “Full Page Capture to PDF” option is disabled in order to generate a pdf/print version of the page, the PDF & Print plugin uses the content that is featured in the body of the post/page before it is displayed by the browser (i.e. the data featured in the main block on this post/page in the edit mode).
    Please let us know if you have any additional questions.

    Thread Starter Dennis Bareis

    (@dbareis)

    Do you say that you don’t work with dynamic content? What was the original install and then upgrade issue. Is that a bug you will fix?

    Plugin Support andrewsupport

    (@andrewsupport)

    Hi,

    The PDF & Print plugin works with dynamic content if the Capture entire page to PDF option is enabled. Updating the MPDF library was necessary for the plugin to work correctly.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Blank PDFs is all I get…’ is closed to new replies.