Render Notes in Presentation Document using GroupDocs.Viewer for .NET 18.1

GroupDocs Viewer for .NET

We are delighted to announce the release of version 18.1 of GroupDocs.Viewer for .NET. The latest version includes the support of rendering Jpeg2000, PostScript, POTM and PPSM file formats. Furthermore, we have added the option to show or hide the notes when rendering Presentation documents. This version also allows you to work with the layers in CAD documents. Let’s have a quick overview of GroupDocs.Viewer for .NET 18.1.

.NET Document Rendering API – New Features

Supported File Formats

We have added the support of following file formats in version 18.1 of GroupDocs.Viewer for .NET.

  • POTM (Microsoft PowerPoint Macro-Enabled Template)
  • PPSM (Microsoft PowerPoint Macro-Enabled Show)
  • JPEG2000 (JP2, J2C, J2K, JPF, JPX, JPM)
  • PS (PostScript)

Showing/Hiding Notes in Presentation Document

The Presentation document may also contain the notes. By default, the notes are not included in the rendering results. However, using version 18.1, you can choose between to show or hide the notes in the output. If you want to show notes in your rendering result, use SlidesOptions.RenderNotes property of RenderOptions (ImageOptions or HtmlOptions) as shown in sample code.

// Setup GroupDocs.Viewer config
ViewerConfig config = new ViewerConfig();
config.StoragePath = @"C:\storage";
   
// Create image handler
ViewerImageHandler imageHandler = new ViewerImageHandler(config);
string guid = "document.pptx";
   
// Set slides options to render notes
ImageOptions options = new ImageOptions();
options.SlidesOptions.RenderNotes = true; // Default value is false
  
// Get pages 
List pages = imageHandler.GetPages(guid, options);
   
foreach (PageImage page in pages)
{
   //...
}

For more details on this feature, please visit this documentation article.

Getting List of Layers in CAD Document

Using layers in CAD documents is a way of organizing objects in the drawing by associating them with a specific function or a purpose. GroupDocs.Viewer for .NET 18.1 allows you to get the list of layers’ names from the drawing. Just cast the DocumentInfoContainer object returned by GetDocumentInfo method of the ViewerHandler and use Layers property, as shown in the example below.

// Setup GroupDocs.Viewer config
ViewerConfig config = new ViewerConfig();
config.StoragePath = @"C:\storage";
config.UseCache = true;
   
// Create image handler
ViewerImageHandler imageHandler = new ViewerImageHandler(config);
string guid = "withLayers.dwg";
   
CadDocumentInfoContainer documentInfo = (CadDocumentInfoContainer) imageHandler.GetDocumentInfo(guid);
  
// Loop through all layers contained in the drawing 
foreach (string layer in documentInfo.Layers)
    Console.WriteLine("Layer name: {0}", layer);

For more details on this feature, please visit this documentation article.

Rendering Specific Layers of CAD Document

Using version 18.1, you can specify the layers that you want to render by adding layer names into the CadOptions.Layers property of corresponding RenderOptions (ImageOptions or HtmlOptions) as shown in the example below.

// Setup GroupDocs.Viewer config
ViewerConfig config = new ViewerConfig();
config.StoragePath = @"C:\storage";
   
// Create image handler
ViewerImageHandler imageHandler = new ViewerImageHandler(config);
string guid = "document.dwg";
   
// Set CAD options to render two Layers
ImageOptions options = new ImageOptions();
options.CadOptions.Layers.Add("electrical");
options.CadOptions.Layers.Add("walls");
  
// Get pages 
List pages = imageHandler.GetPages(guid, options);
   
foreach (PageImage page in pages)
{
     Console.WriteLine("Page number: {0}", page.PageNumber); 
     Stream imageStream = page.Stream;
}

For more details on this feature, please visit this documentation article.

Document Viewer API for .NET – Fixes

Following issues are fixed in version 18.1 of GroupDocs.Viewer for .NET.

  • Header contains error message when rendering Word document as PDF
  • API is not creating cache files in CachePath when rendering document from network path

GroupDocs.Viewer for .NET 18.1 – Improvements

Following are the improvements that we have made in version 18.1.

  • Set output page height and width (for image and HTML) depending on the rendered DWF document’s page size
  • Create single styles resource when rendering Text documents as HTML
  • Improve exporting and embedding HTML resources when rendering SVG and Presentation documents

Related Links and Resources

We have a few channels and resources for you to download, learn, try and get technical support on document viewer API.

Feedback

As always, if you have any questions or suggestions, feel free to write on our forum.

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

To keep up with our news, you can follow us on Twitter or follow our Facebook page.

Comments are closed.