BookStack icon indicating copy to clipboard operation
BookStack copied to clipboard

Provide alternative option for PDF rendering

Open ssddanbrown opened this issue 1 year ago • 1 comments

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 alterantive 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.

ssddanbrown avatar Dec 18 '23 11:12 ssddanbrown

Yes I think that is would be a nice feature!

chris-devel0per avatar Jan 03 '24 20:01 chris-devel0per

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 avatar Feb 22 '24 09:02 roceil

Could you please clarify if you mean that in the current version, wkhtmltopdf is no longer available?

@roceil The ability to use WKHTMLtoPDF is still currently available in BookStack, but may likely be removed in the future.

ssddanbrown avatar Feb 22 '24 10:02 ssddanbrown

There is a nice GIST to replace WKHTMLtoPDF within a docker container. This is working very good for us: https://gist.github.com/kmpm/c254558fcb0608346f49946a53cd8c09

If the new function made it possible to specify an "export template" at book, chapter or page level, that would be a great thing.

Froggy422811 avatar Apr 15 '24 13:04 Froggy422811

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).

ssddanbrown avatar Apr 26 '24 16:04 ssddanbrown