PDF Export - ErrorException in ExportService.php line 56 #151

Closed
opened 2026-02-04 17:18:14 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @montharon on GitHub (Aug 22, 2016).

Exception when exporting a page as a PDF file (debuggin enabled in .env)

ErrorException in ExportService.php line 56: file_get_contents(/mnt/sda1/www/html/docs/public//docs/uploads/images/gallery/2016-08-Aug/scaled-840-0/myimage.jpg): failed to open stream: No such file or directory

I think that the path looks weird?! Look at the 2 slashed in the path....

Thanks,
montharon

Originally created by @montharon on GitHub (Aug 22, 2016). Exception when exporting a page as a PDF file (debuggin enabled in .env) `ErrorException in ExportService.php line 56: file_get_contents(/mnt/sda1/www/html/docs/public//docs/uploads/images/gallery/2016-08-Aug/scaled-840-0/myimage.jpg): failed to open stream: No such file or directory` I think that the path looks weird?! Look at the 2 slashed in the path.... Thanks, montharon
OVERLORD added the 🐛 Bug label 2026-02-04 17:18:14 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Sep 3, 2016):

Thanks @montharon for letting me know of this issue. Sorry about this, Now fixed to be in the next release.

This was due how the exporter was using the image url to find image files. This has now been changed so it's compatible with BookStack instance with 'sub-directories'.

For existing pages, during an export, you may be left with blank areas instead of images (Better than erroring out). Editing then re-saving a page should update all the links and urls to be compatible with the export component.

@ssddanbrown commented on GitHub (Sep 3, 2016): Thanks @montharon for letting me know of this issue. Sorry about this, Now fixed to be in the next release. This was due how the exporter was using the image url to find image files. This has now been changed so it's compatible with BookStack instance with 'sub-directories'. For existing pages, during an export, you may be left with blank areas instead of images (Better than erroring out). Editing then re-saving a page should update all the links and urls to be compatible with the export component.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#151