Open eoli3n opened 1 year ago
Nothing planned ?
@eoli3n Not right now, there's been no other demand for this, so not really something I'd look to add an option for.
I could probably provide logical theme system hack to alter this globally if desired, Just need to know if you're using the default PDF renderer or if you've set settings to use WKHTMLTOPDF.
A hack would be perfect if possible, with dompdf
Here's an unofficial hack, can't assure it'll be issue free. It's fairly simple though so should rarely cause issues with future changes (not impossible though). Add this to your functions.php
after going the "Getting Started" part of the logical theme system docs/video.
<?php
use BookStack\Facades\Theme;
use BookStack\Theming\ThemeEvents;
Theme::listen(ThemeEvents::APP_BOOT, function () {
config()->set('dompdf.options.dpi', 144);
});
Adjust the 144
as needed (default is 96).
If things look a little "contained" (with large side margins), you can add the below to the "Custom HTML Head Content" customization setting within the BookStack UI:
<style>
.export-format-pdf .page-content { max-width: 100%; }
</style>
Does this still work with recent pdf export changes ? IMO the default export size is WAY to big.
@eoli3n I have not tested this, but the setting has moved for the current version of BookStack, and the functions.php
should probably now be:
<?php
use BookStack\Facades\Theme;
use BookStack\Theming\ThemeEvents;
Theme::listen(ThemeEvents::APP_BOOT, function () {
config()->set('exports.dompdf.dpi', 144);
});
Describe the feature you'd like
I want more information per pages when exporting as pdf/html, the default zoom is huge.
Describe the benefits this would bring to existing BookStack users
Less pages to print, less paper, less cutted tree, amazonia saved, more oxygen on the planet = more happiness :)
Can the goal of this request already be achieved via other means?
Kind of, yes : export as html, print a pdf with 70% zoom. But it change how it looks.
Have you searched for an existing open/closed issue?
How long have you been using BookStack?
0 to 6 months
Additional context
No response