Export to PDF broken #1530

Closed
opened 2026-02-05 01:09:17 +03:00 by OVERLORD · 14 comments
Owner

Originally created by @mattstanyon-tall on GitHub (Feb 10, 2020).

Originally assigned to: @ssddanbrown on GitHub.

After upgrading to 0.28 we are no longer able to export to PDF - trace attached.

pdferror.txt

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): 0.28
  • PHP Version: 7.2.24
  • Hosting Method (Nginx/Apache/Docker): Apache
Originally created by @mattstanyon-tall on GitHub (Feb 10, 2020). Originally assigned to: @ssddanbrown on GitHub. After upgrading to 0.28 we are no longer able to export to PDF - trace attached. [pdferror.txt](https://github.com/BookStackApp/BookStack/files/4180256/pdferror.txt) **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings): 0.28 - PHP Version: 7.2.24 - Hosting Method (Nginx/Apache/Docker): Apache
OVERLORD added the 🔍 Pending Validation label 2026-02-05 01:09:17 +03:00
Author
Owner

@jnikoletich commented on GitHub (Feb 11, 2020):

I was having the same error as well. Installing wkhtmltopdf and adding it to my .env file solved the issue for me.

@jnikoletich commented on GitHub (Feb 11, 2020): I was having the same error as well. Installing wkhtmltopdf and adding it to my .env file solved the issue for me.
Author
Owner

@hansluebken commented on GitHub (Feb 11, 2020):

Same error as well.
Same Error occured on the Demo when you try to export to PDF.

@hansluebken commented on GitHub (Feb 11, 2020): Same error as well. Same Error occured on the Demo when you try to export to PDF.
Author
Owner

@MCStreetguy commented on GitHub (Feb 11, 2020):

I experienced the same error message as well, but this seems to be related to DomPDF in some way. I switched to the alternate wkhtmltopdf export option and now the PDF export is working again just as expected. See the docs for infos on how to set this up.

@MCStreetguy commented on GitHub (Feb 11, 2020): I experienced the same error message as well, but this seems to be related to DomPDF in some way. I switched to the alternate wkhtmltopdf export option and now the PDF export is working again just as expected. See [the docs](https://www.bookstackapp.com/docs/admin/pdf-rendering/) for infos on how to set this up.
Author
Owner

@hansluebken commented on GitHub (Feb 11, 2020):

Hello MCStreetguy, i installed wkhtmltopdf and did the setup in .env for wkhtmltopdf, but i still have the same error.
:-(

@hansluebken commented on GitHub (Feb 11, 2020): Hello MCStreetguy, i installed wkhtmltopdf and did the setup in .env for wkhtmltopdf, but i still have the same error. :-(
Author
Owner

@MCStreetguy commented on GitHub (Feb 11, 2020):

@hansluebken For me it started working after executing php artisan clear and php artisan optimize. Seems as the used export library is cached in some way. If after that it still doesn't work, maybe it's not the library itself, but then I don't really know what to do. I just discovered this as a solution for me and hoped that it might help you too.

@MCStreetguy commented on GitHub (Feb 11, 2020): @hansluebken For me it started working after executing `php artisan clear` and `php artisan optimize`. Seems as the used export library is cached in some way. If after that it still doesn't work, maybe it's not the library itself, but then I don't really know what to do. I just discovered this as a solution for me and hoped that it might help you too.
Author
Owner

@hansluebken commented on GitHub (Feb 11, 2020):

uuupppssss...
php artisan clear and php artisan optimize break my Bookstack Instance. I installed a new instance and set the wkhtmltopdf settings in the .env before i migrate. That works for me now!
Thx a lot for your help.

@hansluebken commented on GitHub (Feb 11, 2020): uuupppssss... php artisan clear and php artisan optimize break my Bookstack Instance. I installed a new instance and set the wkhtmltopdf settings in the .env before i migrate. That works for me now! Thx a lot for your help.
Author
Owner

@gren236 commented on GitHub (Feb 12, 2020):

Same error with clean installation on FreeBSD/Nginx/MariaDB stack.

@gren236 commented on GitHub (Feb 12, 2020): Same error with clean installation on FreeBSD/Nginx/MariaDB stack.
Author
Owner

@eferreira2 commented on GitHub (Feb 13, 2020):

Same error for me as well. I migrated a customer from v0.25 to v0.28. As mentioned above, I worked around the problem by using wkhtmltopdf.

@eferreira2 commented on GitHub (Feb 13, 2020): Same error for me as well. I migrated a customer from v0.25 to v0.28. As mentioned above, I worked around the problem by using wkhtmltopdf.
Author
Owner

@p1xelshader commented on GitHub (Feb 14, 2020):

Same error here v0.275 to v0.28 on Ubuntu 18.04.4 LTS

@p1xelshader commented on GitHub (Feb 14, 2020): Same error here v0.275 to v0.28 on Ubuntu 18.04.4 LTS
Author
Owner

@ssddanbrown commented on GitHub (Feb 15, 2020):

Can confirm, Have assigned to next patch release.

@ssddanbrown commented on GitHub (Feb 15, 2020): Can confirm, Have assigned to next patch release.
Author
Owner

@ssddanbrown commented on GitHub (Feb 16, 2020):

I've just deployed v0.28.1 in which I have made some updates to exports which fixed DomPDF exports on my development system.

Would be good to get some feedback though to confirm this is fixed for others before I close this off.

@ssddanbrown commented on GitHub (Feb 16, 2020): I've just deployed [v0.28.1](https://github.com/BookStackApp/BookStack/releases/tag/v0.28.1) in which I have made some updates to exports which fixed DomPDF exports on my development system. Would be good to get some feedback though to confirm this is fixed for others before I close this off.
Author
Owner

@bdillahu commented on GitHub (Feb 16, 2020):

I'm running the docker image (on unRaid) and this update does seem to have fixed PDF export.

I do notice that tables aren't quite right - the columns are all about 1" wide, instead of filling the entire page width. I'm new to bookstack, so I'm not sure if this is expected or not (I just loaded it the other day and this is the first time PDF exports have worked.

Looks like this is already known #1296

@bdillahu commented on GitHub (Feb 16, 2020): I'm running the docker image (on unRaid) and this update does seem to have fixed PDF export. I do notice that tables aren't quite right - the columns are all about 1" wide, instead of filling the entire page width. I'm new to bookstack, so I'm not sure if this is expected or not (I just loaded it the other day and this is the first time PDF exports have worked. Looks like this is already known #1296
Author
Owner

@gren236 commented on GitHub (Feb 16, 2020):

Tried on FreeBSD clean install - it works!

@gren236 commented on GitHub (Feb 16, 2020): Tried on FreeBSD clean install - it works!
Author
Owner

@ssddanbrown commented on GitHub (Feb 18, 2020):

Thanks for confirming on this, Will therefore close this off.


@bdillahu Yeah, You'll find that the default PDF output can be rocky due to the general complexities in rendering to PDF. As mentioned above, switching to WKHTML would generally provide a better output closer to the view in BookStack.

@ssddanbrown commented on GitHub (Feb 18, 2020): Thanks for confirming on this, Will therefore close this off. --- @bdillahu Yeah, You'll find that the default PDF output can be rocky due to the general complexities in rendering to PDF. As mentioned above, [switching to WKHTML](https://www.bookstackapp.com/docs/admin/pdf-rendering/) would generally provide a better output closer to the view in BookStack.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1530