Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Tue Mar 29, 2022 5:49 pm

Hello
I'm using spire.pdf 5.1.0 library.
I'm trying to add SVG to a PDF as a new layer.
First, I'm converting SVG to PDF. At this time, styles in SVG seem to be ignored.
Is there a way to apply SVG styles? Or can I add SVG as a new layer to a PDF in another way?

OS: Windows 10 Pro 21H2
JDK: OpenJDK 1.8.0

SVG and PDF:
I attached SVG and PDF files.

pom.xml:
Code: Select all
        <dependency>
            <groupId>e-iceblue</groupId>
            <artifactId>spire.pdf</artifactId>
            <version>5.1.0</version>
        </dependency>


code:
Code: Select all
            PdfDocument svg = new PdfDocument();
            svg.loadFromSvg(srcSvgPath);
            svg.saveToFile(dstPath, FileFormat.PDF);


Thank you

team_ssb
 
Posts: 14
Joined: Fri Nov 26, 2021 1:30 pm

Wed Mar 30, 2022 2:43 am

Hello,

Thanks for your inquiry.
I tested your PDF file and did reproduce the issue you mentioned. I have logged the issue into our bug tracking system with the ticket number SPIREPDF-5023. Our development team will investigate and fix it.
In addition, I tested drawing the SVG as a layer to the PDF, and the style of the SVG was still changed. I also posted this situation to our development team.
Once there is any update, I will inform you in time. Sorry for the inconvenience caused.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1647
Joined: Wed Apr 07, 2021 2:50 am

Mon Apr 04, 2022 11:34 am

Hello,
Thank you for your reply.
We need to add SVG to PDF.
So, if you know, please let me know when to solve it.
Thank you

team_ssb
 
Posts: 14
Joined: Fri Nov 26, 2021 1:30 pm

Tue Apr 05, 2022 3:46 am

Hello,

Thank you for your reply.

While our Dev team has made some fixes for this issue, at this time I can't tell you when it will be fully resolved. We will keep you informed if there is any good news.
Sincerely,
Andy
E-iceblue support team
User avatar

Andy.Zhou
 
Posts: 483
Joined: Mon Mar 29, 2021 3:03 am

Sat May 07, 2022 10:05 am

Hello,

Thanks for your patience!
Glad to inform you that we just released Spire.PDF for Java Version:5.5.0 which fixes the issue of SPIREPDF-5023.
Welcome to test it.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1647
Joined: Wed Apr 07, 2021 2:50 am

Tue Nov 15, 2022 12:53 pm

Hello,
Thank you for your reply.

We tried version 5.5.0. and confirmed that the problem was fixed.

Thank you

team_ssb
 
Posts: 14
Joined: Fri Nov 26, 2021 1:30 pm

Wed Nov 16, 2022 1:04 am

Hello,

Glad to hear that.

If you encounter other issues related to our products in the future, please feel free to contact us.

Have a nice day!

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1647
Joined: Wed Apr 07, 2021 2:50 am

Return to Spire.PDF