[Support Request]: Downscale PDF Output #2648

Closed
opened 2026-02-05 04:42:38 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @esmoyer on GitHub (Feb 11, 2022).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

I am curious if there is a way to "downscale" the PDF output to kind of shrink the overall output sizing. I use Obsidian and have been moving things over to Bookstack but haven't found a way to do this in Bookstack similar to Obsidian. The PDF output title and fonts are a little large and would like to figure out a way to shrink them just a bit; nothing crazy. Have been trying to search Reddit, Google and Github but haven't really turned anything up. Appreciate any insight!

Exact BookStack Version

v21.12.5

Log Content

NA

PHP Version

No response

Hosting Environment

Ubuntu 20.04

Originally created by @esmoyer on GitHub (Feb 11, 2022). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario I am curious if there is a way to "downscale" the PDF output to kind of shrink the overall output sizing. I use Obsidian and have been moving things over to Bookstack but haven't found a way to do this in Bookstack similar to Obsidian. The PDF output title and fonts are a little large and would like to figure out a way to shrink them just a bit; nothing crazy. Have been trying to search Reddit, Google and Github but haven't really turned anything up. Appreciate any insight! ### Exact BookStack Version v21.12.5 ### Log Content NA ### PHP Version _No response_ ### Hosting Environment Ubuntu 20.04
OVERLORD added the 🐕 Support label 2026-02-05 04:42:38 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Feb 11, 2022):

Hi @esmoyer,
No direct way to be able to do this. You could technically alter things via styles in the "Custom HTML Head Content" setting but I don't think we provide a way to just target PDF exports right now.

You could use the visual theme system to override the template file that contains PDF-specific CSS conditions:
2d074caf72/resources/views/common/export-styles.blade.php. That's probably the best way right now without editing core app files.

@ssddanbrown commented on GitHub (Feb 11, 2022): Hi @esmoyer, No direct way to be able to do this. You could technically alter things via styles in the "Custom HTML Head Content" setting but I don't think we provide a way to just target PDF exports right now. You could use the [visual theme system](https://github.com/BookStackApp/BookStack/blob/development/dev/docs/visual-theme-system.md) to override the template file that contains PDF-specific CSS conditions: https://github.com/BookStackApp/BookStack/blob/2d074caf72e7d1ccd9728ad944593ac09f18b7f8/resources/views/common/export-styles.blade.php. That's probably the best way right now without editing core app files.
Author
Owner

@esmoyer commented on GitHub (Feb 11, 2022):

@ssddanbrown appreciate the quick response! I'm just getting started out with it so will have to play around. So from what I'm understanding the size that's in the document is what gets output to the PDF? I wasn't sure if the output was driven by something else. Thanks for the suggestions!

@esmoyer commented on GitHub (Feb 11, 2022): @ssddanbrown appreciate the quick response! I'm just getting started out with it so will have to play around. So from what I'm understanding the size that's in the document is what gets output to the PDF? I wasn't sure if the output was driven by something else. Thanks for the suggestions!
Author
Owner

@ssddanbrown commented on GitHub (Feb 11, 2022):

@esmoyer Yeah, It's all HTML/CSS driven as per the standard web view, then this gets converted to PDF.
Lines 8 to 59 in the linked export-styles.blade.php file are styles specific to PDF export. You could override and tweak your version of that file (Using the vial theme system) to add styles just for the PDF export if desired.

@ssddanbrown commented on GitHub (Feb 11, 2022): @esmoyer Yeah, It's all HTML/CSS driven as per the standard web view, then this gets converted to PDF. Lines 8 to 59 in the linked `export-styles.blade.php` file are styles specific to PDF export. You could override and tweak your version of that file (Using the vial theme system) to add styles just for the PDF export if desired.
Author
Owner

@esmoyer commented on GitHub (Feb 11, 2022):

@ssddanbrown just wanted to say thank you. Your video and all that was super helpful. Got it all figured out and even got wkhtmltopdf up and going. Now to see what I can do with it! Thanks again!

@esmoyer commented on GitHub (Feb 11, 2022): @ssddanbrown just wanted to say thank you. Your video and all that was super helpful. Got it all figured out and even got wkhtmltopdf up and going. Now to see what I can do with it! Thanks again!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2648