mirror of
				https://github.com/TheAnachronism/docspell.git
				synced 2025-10-31 17:50:11 +00:00 
			
		
		
		
	Merge pull request #1915 from eikek/fix-weasyprint-text-files
Fix html conversion for text files
This commit is contained in:
		| @@ -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) => | ||||
|   | ||||
		Reference in New Issue
	
	Block a user