Failed to load PDF document
-
Hello,
Here is a resolved bug in case it can be useful to anynody.
The bug:
I installed the plugin and all works except for the following:
First I set “caching” in the admin and clear all cache. Then I click on the PDF button of my post to request the building and opening of the PDF in the Chrome browser, but the following error message shows up:
Error Failed to load PDF document.
I hit “Reload” and then all is fine. I can download the PDF and open it on my computer.
If I do the same using Firefox, I don’t get any error message, but when I download the file on my computer, Acrobat says that the PDF is not supported or damaged.
The solution:
in file /wp/wp-content/plugins/wp-mpdf/mpdf/mpdf.php, lines 20873 and 20880:
$this->blk[$this->blklvl][‘padding_left’] = ‘auto’;
$this->blk[$this->blklvl][‘padding_right’] = ‘auto’;
These lead to warning messages of the type “non-numerical value in numerical expressions”. I simply replaced the two ‘auto’ by ‘0’, which solved the problem.The rest works perfectly. Thanks for the great work on this plugin!
- The topic ‘Failed to load PDF document’ is closed to new replies.