MainWP Community

Pro Reports Extension - Images are not appearing in PDF

Hi

I have installed MainWP including the extension Pro Reports on a clean WordPress install on my local server. The local server is Local “Lightning” running on MacOS.

All software is at the latest version and the issue occurs on all built in templates from the Pro Reports extension.

In MainWP, the only warning in the Server Information is that ‘cURL Timeout’ should be 300 seconds or more. It is set to 60 seconds.

I can preview the reports ok, but when I download the PDF, the images are missing. The reports state "Image not found or type unknown.

I performed some investigation and found the following error in the DOMPDF log file: -

file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed

See screenshot of the DOMPDF log file: -

I suspect it’s failing to verify the SSL certificate because it is self-signed. I did not want to start editing the code in the extension, but I think an option to disable verifying the SSL certificate for the Pro reports when running on local servers would be the solution.

Many thanks

Paul

Hi Paul, thanks for reporting this. Have you had a chance to test this on web-hosted environment? If yes, do you get the same error?

Hi Bogdan

I have just installed MainWP Dashboard on a web-hosted environment (SiteGround Hosting) and created a PDF in Pro Reports. It worked perfect. I researched this issue and many people who have had this issue with DOMPDF were using self signed SSL certificates. They resolved it by disabling the SSL certificate check and/or allowing self signed certificates. This is just my best guess of what the issue may be :thinking:.

This may be helpful: -

DOMPDF: Image not found or type unknown

Many thanks

Paul

1 Like

Hi Paul, thanks for letting us know. I am very happy that the problem is solved.

I will also make sure our dev team checks the problem with SSL verification and see if there is anything that can be done on our side.

Hi Bogdan

The problem is not solved for me as I want to use the Dashboard on my local server. I would appreciate if your dev team could look at this. I have just started using MainWP including several extensions and have got everything working except this. It’s a great product and I love that I can host this myself.

I offer clients ‘WordPress Care Plans’ and would like to send reports to them so they know I am doing something every month for what they pay me :wink:.

Many thanks

Paul

Hi Bogdan

I resolved this issue by removing the self signed SSL certificate on the local server that the MainWP Dashboard is running on. After I performed this step and tried to create the PDF, WordPress displayed “There has been a critical error on your website”. I checked the WordPress debug.log file and DOMPDF support and it was related to Imagick/ImageMagick which is a PHP component. If I use JPG and not PNG image files I did not get this error. I wanted to use PNG files as the images and resolved this by changing the PHP version from 7.4.1 to 7.3.5 on the local server.

The above may be useful to anyone using the local server Local “Lightning” which used to be called Local by Flywheel or any local server environment to run the MainWP Dashboard and the Pro Reports Extension.

:+1:

1 Like

Thanks so much for sharing the solution. I am sure it will help other users.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.