GroupDocs.Viewer for .NET 23.11 Release Notes

Full list of changes in this release

KeyCategorySummary
VIEWERNET‑4538FeatureAdd support for reading license from embedded resources
VIEWERNET‑4474FixA generic error occurred in GDI+
VIEWERNET‑4237FixColour gradients lost in Vectors
VIEWERNET‑4209FixPdfOptions.RenderTextAsImage = false causes slow loading
VIEWERNET‑2277FixResource loading timeout is not working
VIEWERNET‑3430Fix“Font embedding is prohibited because of font license restrictions” exception when rendering OXPS file
VIEWERNET‑2700FixNull reference exception when Load and Save Epub/PDF document to PDF without license in Linux

Major features

This release includes the following features:

Add support for reading license from embedded resources

When utilizing an embedded license, you can specify the license name. It’s essential to include the license file as an embedded resource within your project. Subsequently, you can exclusively reference the license by its name, ensuring that the string passed to the SetLicense method perfectly matches the file name included in the embedded resource.

//set license from embedded resource
License license = new License();
license.SetLicense("GroupDocs.Viewer.lic");

Skip font license verification when rendering XPS and OXPS files

If an XPS or OXPS file contains a font that cannot be embedded due to licensing restrictions, GroupDocs.Viewer throws an exception at runtime. If you have a license for this font, enable the PdfOptions.DisableFontLicenseVerifications option to skip font license verification.

For details, see documentation.

using (Viewer viewer = new Viewer("resume.oxps"))
{
    HtmlViewOptions viewOptions = HtmlViewOptions.ForEmbeddedResources();
    options.PdfOptions.DisableFontLicenseVerifications = true;
    viewer.View(viewOptions);
}

Enclose images in SVG when rendering PDF and Page Layout files

By default, when rendering to the PDF and Page Layout file formats, all images are combined into a single PNG file, which serves as the background for the output HTML document.

The PdfOptions.WrapImagesInSvg option allows you to wrap each image in the output HTML document with an SVG tag to improve output quality.

This option is available when rendering PDF and Page Layout file formats to HTML with embedded or external resources.

For details, see documentation.

using (Viewer viewer = new Viewer("resume.pdf"))
{
    HtmlViewOptions viewOptions = HtmlViewOptions.ForEmbeddedResources();
    viewOptions.PdfOptions.WrapImagesInSvg = true;

    viewer.View(viewOptions);
}

The following image shows the rendering resume.pdf with the disabled (left) and enabled (right) WrapImagesInSvg option. The image on the right has better quality compared to the image on the left:

Images as background vs embedded in SVG