-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide alternative option for PDF rendering #4732
Comments
Yes I think that is would be a nice feature! |
Could you please clarify if you mean that in the current version, wkhtmltopdf is no longer available? I am in the process of preparing to install wkhtmltopdf in Docker for exporting PDFs in Chinese. |
@roceil The ability to use WKHTMLtoPDF is still currently available in BookStack, but may likely be removed in the future. |
There is a nice GIST to replace WKHTMLtoPDF within a docker container. This is working very good for us: If the new function made it possible to specify an "export template" at book, chapter or page level, that would be a great thing. |
- Updated DOMPDF to direcly use library instead of depending on barry wrapper. - Merged existing export options file into single exports file. - Defined option for new command option. Related to #4732
With the merge of #4969 there's now a generic command-based PDF option, which will be part of the next feature release. In the future we can put together specific engine/generator guidance (and help build generation implementations maybe). |
At this point WKHTMLtoPDF is deprecated, with the source repos archived and it drifting out of OS repos (Alpine as an example).
Would be good to allow an alternative to fill the non-dompdf gap, and then deprecate and remove WKHTMLtoPDF specific support in the future.
Instead of supporting specific export options, we could maybe support a generic interface to allow adapting to different options where desired. Something like a configurable command path with a placeholder parameter to take a location of where BookStack writes out HTML to for conversion.
Research
--no-remote
option which may disable networking?For browsers, there's a WebDriver standard in progress which may open up possibilities in this area via a standard API.
There's also commercial offerings, which may or may not be better (PDFreactor, PrinceXML).
Still makes sense to me to create a generic command line rather than supporting specific libraries in this case, as it's a moving area, and by allowing a user to call their own wrapper script it can be built upon like for customizing generation options, and allow flexibility in solution used without over complicating our support. There could be other options to think about too (for example, running chrome in a network-limited container).
Implementation
EXPORT_PDF_COMMAND
env option.{input_html_path}
- Path to input HTML file to convert.{output_pdf_path}
- Path that the output PDF file should be written to.Notes: Should update existing
LDAP_USER_FILTER
env option to support this format.The text was updated successfully, but these errors were encountered: