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.

Thu Oct 05, 2017 1:33 pm

Hi Team,

I am trying to convert PDF to SVG, and am unable to set custom height and width. Can you please help?

Below is my code:

Dim testDoc As PdfDocument = New PdfDocument()
testDoc.LoadFromFile("abc.pdf")
testDoc.SaveToFile("abc.svg", FileFormat.SVG)

For ex: I want to set the SVG height and width to 540px*278px. I have seen references for changing the values for PNG/BMP, but i want to change for SVG.

Thanks & Regards,
Srikanth

srikanth.pathaneni
 
Posts: 1
Joined: Thu Oct 05, 2017 1:18 pm

Fri Oct 06, 2017 3:46 am

Hello,

Thanks for your inquiry. Sorry that cuurently it doesn't support the feature to change the size for SVG, and I have added it to our enhancement list, once it is done, we will update the thread.

Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Tue Feb 06, 2018 1:44 am

Hello,

Now our Spire.Pdf product supports setting custom height and width when converting to SVG, please add the following option before saving.
Code: Select all
PdfDocument.ConvertOptions.SetPdfToSvgOptions(540f,278f);

Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Return to Spire.PDF