mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-02-15 20:33:26 +00:00
Fix html conversion for text files
It must honor the configuration when doing html->pdf.
This commit is contained in:
parent
1d39b5c74e
commit
85094cc1f6
@ -82,13 +82,26 @@ object Conversion {
|
||||
Chunk.byteVector(ByteVector.view(html.getBytes(StandardCharsets.UTF_8)))
|
||||
)
|
||||
.covary[F]
|
||||
WkHtmlPdf.toPDF(
|
||||
cfg.wkhtmlpdf,
|
||||
cfg.chunkSize,
|
||||
StandardCharsets.UTF_8,
|
||||
sanitizeHtml,
|
||||
logger
|
||||
)(bytes, handler)
|
||||
cfg.htmlConverter match {
|
||||
case HtmlConverter.Wkhtmltopdf =>
|
||||
WkHtmlPdf.toPDF(
|
||||
cfg.wkhtmlpdf,
|
||||
cfg.chunkSize,
|
||||
StandardCharsets.UTF_8,
|
||||
sanitizeHtml,
|
||||
logger
|
||||
)(bytes, handler)
|
||||
|
||||
case HtmlConverter.Weasyprint =>
|
||||
Weasyprint.toPDF(
|
||||
cfg.weasyprint,
|
||||
cfg.chunkSize,
|
||||
StandardCharsets.UTF_8,
|
||||
sanitizeHtml,
|
||||
logger
|
||||
)(bytes, handler)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
case MimeType.ImageMatch(mt) =>
|
||||
|
Loading…
Reference in New Issue
Block a user