Hi All,
We are converting PDF to SVG images using Aspose.PDF to show in slide show using crorcodoc viewer. But due to some internal issue of SVG images Zoom functionality is not working properly only for those SVG images that are converted using AsposePDF , we have check with other images converted through other libraries has no issue in Zoom, so issue must be conversion using. Aspose.PDF
Below is the code of conversion of PDF to SVG using Aspose
// Conversion to SVG for Vector Graphics
PdfFileEditor pdfEditor = new PdfFileEditor();
int fileNumber = 1;
// Split to pages
MemoryStream[] outBuffer = pdfEditor.SplitToPages(sourceFile.FullName);
// Save individual files
foreach (MemoryStream aStream in outBuffer)
{
FileStream outStream = new FileStream(dir + @"\File_" + fileNumber.ToString() + “out.pdf", FileMode.Create);
aStream.WriteTo(outStream);
outStream.Close();
Aspose.Pdf.Document pdfDoc = new Aspose.Pdf.Document(dir + @"\File” + fileNumber.ToString() + “out.pdf");
SvgSaveOptions saveOptions = new SvgSaveOptions
{
// Do not compress SVG image to Zip archive
CompressOutputToZipArchive = false,
TreatTargetFileNameAsDirectory = false,
};
pdfDoc.Save(dir + @"\page-" + fileNumber.ToString() + “.svg”, saveOptions);
if (System.IO.File.Exists(dir + @"\File” + fileNumber.ToString() + “out.pdf"))
{
System.IO.File.Delete(dir + @"\File” + fileNumber.ToString() + “_out.pdf”);
}
fileNumber++;
}
Please help