Free Support Forum - aspose.com

Pdf to svg

Hello:


We converted pdf file to SVG, after converting svg showing smaller than pdf page width and height,

below code we used :
Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(@“C:\Users\Desktop\g-28.pdf”);
Aspose.Pdf.SvgSaveOptions saveOptions = new Aspose.Pdf.SvgSaveOptions();
// Do not compress SVG image to Zip archive
saveOptions.CompressOutputToZipArchive = false;


string fileName = Guid.NewGuid().ToString();
string outFileName = $@“D:\Samples\ConsoleApp\ConsoleApp{fileName}.svg”;
pdfDocument.Save(outFileName, saveOptions);

Can you let us know what changes we need to make to export with proper page width and height.

Thanks

Hi Dennis,


Thanks for contacting support.

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Arial; -webkit-text-stroke: #000000} span.s1 {font-kerning: none}

I have tested the scenario and have managed to reproduce the problem that while converting PDF to SVG, the size of the SVG is different to the PDF and it shrinks the content. For the sake of correction, I have logged it as PDFNET-42433 in our issue tracking system. We will further look into the details of this problem and will keep you posted on the status of correction. Please be patient and spare us little time.


We are sorry for this inconvenience.


Best Regards,



Can you please let me know status of issue.

Thanks

Hi Dennis,


Thanks for your inquiry. We are sorry that your issue is still pending for resolution. Please note that issues are being resolved on first come first serve basis. There are other reported issues in the queue as well. We will update you on status through this thread once your issue is resolved. Please have patience and spare us a little time. We are sorry for the inconvenience.

Best Regards,
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Arial; -webkit-text-stroke: #000000} span.s1 {font-kerning: none}

Any update on this issue.Is it resolved??Or is there any other solution.

Thanks

@arunasrathore

Thanks for contacting support.

The earlier logged issue (PDFNET-42433) was resolved for provided input/output documents. Would you please make sure to use latest version of the API i.e. Aspose.PDF for .NET 18.10 and in case you face any issue, please share your sample input/output documents with details of the issue. We will test the scenario in our environment and address it accordingly.

Thank you .I will test on your suggested version.

yes it works fine now.But when i try to render the svg on browser the image is half and takes a lot of time.Any update on this would be helpful.

Thanks

@findaruna

Thanks for writing back.

Would you please share sample PDF document with us. We will test the scenario in our environment and address it accordingly. Furthermore, please also make sure to use a valid license before conversion.