Created
October 19, 2017 11:14
-
-
Save GroupDocsGists/08d76444ef53e5e946845e8e85c18a12 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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