Reusing the same SVG in PDF using wkhtmltopdf

I have the following HTML to convert to PDF using wkhtmltopdf:

<html>
<head>
</head>
<body>
<object data="first.svg" width="100" height="100" type="image/svg+xml"></object>
<object data="second.svg" width="100" height="100" type="image/svg+xml"></object> 
<object data="third.svg" width="100" height="100" type="image/svg+xml"></object>
</body>
</html>

I will use these SVG files more than once, in several places, for example, one will be at the top of each page.

How can I get the resulting PDF file to reuse existing SVG files where in the document without creating a new one in the PDF file, thereby increasing the file size.

+3
source share
2 answers

wkhtmltopdf, PDF , "" ( , , ..), .

, SVG , , , .

0

, whntmltopdf , , svg: img / css, / . ...

SVG - , . , , . , , , Pdftk :

http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/

0

Source: https://habr.com/ru/post/1756912/


All Articles