Nayyer Shahbaz February 16, 20140 Comments

Save Images in Raster Format, Access Custom File Properties, & Better PDF to Image Conversion in Aspose.Pdf for .NET 8.9.1

Save Images in Raster Format, Access Custom File Properties, & Better PDF to Image Conversion in Aspose.Pdf for .NET 8.9.1

February 16, 2014
Share on FacebookTweet about this on TwitterShare on LinkedIn

Aspose.Pdf for .NET logo PDF to HTML conversion is one of the prominent features Aspose.Pdf for .NET offers. By default, the images inside the document are saved in SVG format when converting PDF files to HTML format. However, it is possible to save images in non-SVG format, as raster images. Please have a look at the following code snippet to see how this can be done.

// Source PDF file
Document doc = new Document("c:/pdftest/page_6.pdf");
// Create HtmlSaveOption with tested feature
HtmlSaveOptions saveOptions = new HtmlSaveOptions();
saveOptions.FixedLayout = true;
saveOptions.SplitIntoPages = false;
saveOptions.RasterImagesSavingMode = HtmlSaveOptions.RasterImagesSavingModes.AsExternalPngFilesReferencedViaSvg;

string outFile = "c:/pdftest/Sample_ResultantFile.html";
// Save the output in HTML format
doc.Save(outFile, saveOptions);

For further details, please visit PDF to HTML – Save Images in Raster Format.

Get/Set PDF Information

This API provides the capability to get and set PDF file information. It also provides the feature to get and set custom properties associated with the PDF document. In this release, we have provided the feature to access custom property values, such as Trapped, from PDF files. Please note that the Trapped property is a part of the DocumentInfo structure, so in order to get or set its value, please try using the following code snippet.

using (Document pdfDocument = new Document(@"c:\test.pdf"))
{
    if (pfDocument.Info.Trapped == "True")
    {
        // Do something
    }
}

For more information, please visit Get PDF File Information.

This hotfix also contains fixes for some other high priority issues. Please visit the download section to get details on what’s new and what’s fixed in Aspose.Pdf for .NET 8.9.1.

Leave a comment

Posted inAspose.PDF Product Family, Nayyer Shahbaz
 

Related Articles