Hello,
I do see SaveOptions which can be used to export PDF (all pages) to HTML / SVG. However I wish to know if there is option to specify a page also?
It does create multiple files on disk. But I want to know option where to specify a Page[x] and get resulting (exported) HTML or SVG as Stream (for that pdf page only).
Thanks,
Jay
Hi Jay,
Hello,
I would avoid creating a temp PDF. Please guide what change is required to specify a page in below:
Document pdfDocument = new Document(@“test.pdf”);
Aspose.Pdf.SvgSaveOptions saveOptions = new Aspose.Pdf.SvgSaveOptions();
// do not compress SVG image to Zip archive
saveOptions.CompressOutputToZipArchive = false;
// resultant file name
string outFileName = @“TestReport.svg”;
// save the output in SVG files
pdfDocument.Save(outFileName, saveOptions);
Thanks,
Jay
Hi Jay,
The file format conversion feature is performed over document/complete file level. However, you may consider using the following code snippet to convert only the first page of the source file to SVG format.
[C#]
Document pdfDocument = new Document(@"c:/pdftest/ChartsandGraphs.pdf");
Document tempdoc = new Document();
tempdoc.Pages.Add(pdfDocument.Pages[1]);
Aspose.Pdf.SvgSaveOptions saveOptions = new Aspose.Pdf.SvgSaveOptions();
// Do not compress SVG image to Zip archive
saveOptions.CompressOutputToZipArchive = false;
// Resultant file name
string outFileName = @"c:/pdftest/ChartsandGraphs.svg";
// Save the output in SVG files
tempdoc.Save(outFileName, saveOptions);