Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moved info from release notes to documentation #76

Merged
merged 1 commit into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions net/rendering-basics/render-pdf-documents.md
Original file line number Diff line number Diff line change
Expand Up @@ -452,3 +452,46 @@ using (var viewer = new Viewer("resume.pdf"))
{{< /tabs >}}

![Extract and display PDF text](/viewer/net/images/rendering-basics/render-pdf-documents/extract-pdf-text.png)

## 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](https://reference.groupdocs.com/viewer/net/groupdocs.viewer.options/pdfoptions/disablefontlicenseverifications) option to skip font license verification.

{{< tabs "example15">}}
{{< tab "C#" >}}
```csharp
using (Viewer viewer = new Viewer("resume.oxps"))
{
HtmlViewOptions viewOptions = HtmlViewOptions.ForEmbeddedResources();
options.PdfOptions.DisableFontLicenseVerifications = true;
viewer.View(viewOptions);
}
```
{{< /tab >}}
{{< /tabs >}}

## 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](https://reference.groupdocs.com/viewer/net/groupdocs.viewer.options/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.

{{< tabs "example16">}}
{{< tab "C#" >}}
```csharp
using (Viewer viewer = new Viewer("resume.pdf"))
{
HtmlViewOptions viewOptions = HtmlViewOptions.ForEmbeddedResources();
viewOptions.PdfOptions.WrapImagesInSvg = true;

viewer.View(viewOptions);
}
```
{{< /tab >}}
{{< /tabs >}}

The following image shows the rendering [resume.pdf](/viewer/net/images/rendering-basics/render-pdf-documents/resume.pdf) with the disabled (left) and enabled (right) `WrapImagesInSvg` option:

![Images as background vs embedded in SVG](/viewer/net/images/rendering-basics/render-pdf-documents/wrap-images-in-svg.png)
Loading