Replies: 7 comments
|
In the old iText version you could use PDF files in the src Attribute of img Tags - if done so it does include the vector graphics inside this other PDF - that's what I've used in the past to workaround adding SVGs |
|
You can try to use Apache Batik library for that. It’s need to make the following steps:
Notice, that you can use the same instance of the image object as you need to use the same image in pdf file. It helps to reduce the size of the generated pdf file. |
|
This solution is partially works for me. Is i made something wrong? |
|
@RangerMak I have notice, that From my tests, you can use a transparent rectangle, and the size will be obtained correctly, without adding any undesired background color to the image. |
|
Are there any news if support for SVGs will be implemented in OpenPDF natively? |
|
The PDF standard does not natively support SVG (Scalable Vector Graphics) files. |
|
Here's another example, using jsvg instead of batik #777 (comment) . Note that I do not use the Document API, but rather the raw <svg
width="595"
height="842"
viewBox="0 0 595 842"
... |
Uh oh!
There was an error while loading. Please reload this page.
Hi,
We want to use SVG files to add icons in PDF. Is there any standard way to do that using OpenPDF?
All reactions