We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Convert PDF to SVG and output as one SVG file without compression


How can i output a converted svg file uncompressed. I just need one large file in svg format that represents the entire PDF file exactly.

Ive tried various solutions that break the files up into smaller files. how can i merge them properly? everything is a mess right now with this converter. here is my current solution that does not work:

       using (var doc = new Aspose.Pdf.Document(inputStream))
                var svgBytes = new List<byte>();
                var saveOptions = new Aspose.Pdf.SvgSaveOptions()
                    CompressOutputToZipArchive = false

                var dirPath = Path.GetTempFileName();
                // save files
                doc.Save(dirPath, saveOptions);
                var files = Directory.GetFiles(Path.GetTempPath());
                foreach(var file in files)

                response.Content = new ByteArrayContent(svgBytes.ToArray());

We have already logged the same enhancement for another client under the ticket ID PDFNET-40158. We have linked your post to this ticket and will keep you informed regarding any available updates. We are sorry for the inconvenience caused.

As a workaround, you can convert a PDF to DOC/DOCX with Aspose.Pdf API, and then convert this Word document to a single SVG file with Aspose.Words API. Please try the following source code:


 // Load PDF document
Aspose.Pdf.Document doc = new Document(@"C:\Pdf\test142\input.pdf");
// Save the output in DOCX format
MemoryStream stream = new MemoryStream();
doc.Save(stream, SaveFormat.DocX);
// Load the DOCX file
Aspose.Words.Document document = new Aspose.Words.Document(stream);
// Save in single SVG file
document.Save(@"C:\Pdf\test142\Output.svg", Aspose.Words.SaveFormat.Svg);

Please let us know in case of any confusion or questions.

Best Regards,
Imran Rafique