PDF not generated with any PDF generation tool

Created on 2 May 2022, over 3 years ago
Updated 17 July 2025, 27 days ago

When I try to generate PDF, I just get the following (example with version 2.1.3 and mPDF):

Warning: fopen(my_site/test.pdf): failed to open stream: No such file or directory in Mpdf\Mpdf->Output() (line 9625 of vendor/mpdf/mpdf/src/Mpdf.php).

More or less the same error is reported with any other PDF generator.

When I've downgraded printable to 2.0.3, I've got a more useful error report, pointing me to the conclusion that "my_site" folder is used twice in the generated PDF file path.

The simple solution is to create a symlink in "my_site" folder (my website root):
ln -s . "my_site" (a symlink actually pointing to the same folder)

After that, PDFs are nicely generated with printable 2.0.3 as well as 2.1.3 with mPDF.

With wkhtmltopdf, there is a logo image in PDF, but the text "{PAGENO} / {nb}" appears at the right upper corner.

With dompdf, there is no image and teh same text appears at the top of the generated PDF page.

With tcpdf, the same error still apperas, and no file is generated.

🐛 Bug report
Status

Needs review

Version

2.1

Component

Code

Created by

🇸🇮Slovenia LUTi

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024