Standardise PDF export size and allow configuration between a4/US-letter #803

Closed
opened 2026-02-04 22:19:49 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @nvnvnvnvn on GitHub (Aug 31, 2018).

Originally assigned to: @ssddanbrown on GitHub.

Describe the bug
I'm using wkhtmltopdf and the output PDF is not 8.5x11. Any ideas how to change that now, or can it be something in the user-edited styles to be added? Before we switched to wkhtmltopdf the document size was 8.5x11.

Steps To Reproduce
Steps to reproduce the behavior:

  1. Export document with wkhtmltopdf

Expected behavior
document size 8.5x11

Screenshots
pdf-size

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): v0.22.0
  • PHP Version: 7
  • Hosting Method (Nginx/Apache/Docker): Nginx
Originally created by @nvnvnvnvn on GitHub (Aug 31, 2018). Originally assigned to: @ssddanbrown on GitHub. **Describe the bug** I'm using wkhtmltopdf and the output PDF is not 8.5x11. Any ideas how to change that now, or can it be something in the user-edited styles to be added? Before we switched to wkhtmltopdf the document size was 8.5x11. **Steps To Reproduce** Steps to reproduce the behavior: 1. Export document with wkhtmltopdf **Expected behavior** document size 8.5x11 **Screenshots** ![pdf-size](https://user-images.githubusercontent.com/29762011/44933691-a2ba8100-ad2f-11e8-9154-6a5ea508de39.jpg) **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings): v0.22.0 - PHP Version: 7 - Hosting Method (Nginx/Apache/Docker): Nginx
OVERLORD added the 🐛 Bug📖 Docs Update🏭 Back-End🚚 Export System labels 2026-02-04 22:19:49 +03:00
Author
Owner

@nvnvnvnvn commented on GitHub (Sep 12, 2018):

Thanks to SwiftOtter we got it solved VIA the following:

  • "...we found that we can pass the page-size parameter to wkhtmltopdf through the config/snappy.php settings file"

Hope that helps others!

--
Dan Hill
MachMotion

@nvnvnvnvn commented on GitHub (Sep 12, 2018): Thanks to [SwiftOtter ](https://github.com/SwiftOtter) we got it solved VIA the following: - "...we found that we can pass the page-size parameter to wkhtmltopdf through the config/snappy.php settings file" Hope that helps others! -- Dan Hill MachMotion
Author
Owner

@ssddanbrown commented on GitHub (Jan 30, 2022):

Hi @nvnvnvnvn,
I realise this is 3+ years late any may not even be relevant for you anymore, but I've wrapped this up into an .env option:

EXPORT_PAGE_SIZE=a4
# or
EXPORT_PAGE_SIZE=letter

Will be part of the next patch release.

@ssddanbrown commented on GitHub (Jan 30, 2022): Hi @nvnvnvnvn, I realise this is 3+ years late any may not even be relevant for you anymore, but I've wrapped this up into an .env option: ```bash EXPORT_PAGE_SIZE=a4 # or EXPORT_PAGE_SIZE=letter ``` Will be part of the next patch release.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#803