BookStack icon indicating copy to clipboard operation
BookStack copied to clipboard

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

Open nvnvnvnvn opened this issue 8 years ago • 2 comments

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

nvnvnvnvn avatar Aug 31 '18 20:08 nvnvnvnvn

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 avatar Sep 12 '18 20:09 nvnvnvnvn

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 avatar Jan 30 '22 17:01 ssddanbrown