Removed temporary background-image fix

ref #36
This commit is contained in:
Nicolai Ort 2021-03-31 16:05:13 +02:00
parent b82a32ae3e
commit 5ba26c4cbf
1 changed files with 2 additions and 1 deletions

View File

@ -192,6 +192,7 @@ export class PdfCreator {
*/
public async imgToBase64(html): Promise<string> {
const $ = cheerio.load(html)
$('img').each(async (index, element) => {
let imgsrc = $(element).attr("src");
if (imgsrc.startsWith("data:image")) {
@ -217,7 +218,7 @@ export class PdfCreator {
image = `data:${img_type};base64,${image}`
$(element).attr("src", image)
})
});
return $.html();
}