Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// For complete examples and data files, please go to https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-.NET
// get Configurations
ViewerConfig config = Utilities.GetConfigurations();
// create html handler
ViewerHtmlHandler htmlHandler = new ViewerHtmlHandler(config);
// guid implies that unique document name
string guid = DocumentName;
PdfFileOptions options = new PdfFileOptions();
// set add print action property
options.Transformations = Transformation.AddPrintAction;
// get file as pdf with print action
FileContainer container = htmlHandler.GetPdfFile(guid, options);
// save PDF file
Utilities.SaveFile(guid, container.Stream);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.