From b9ccbd3e7536f8475301c40614a4efde37de249c Mon Sep 17 00:00:00 2001 From: Muhammad Umar Date: Fri, 14 Jun 2019 23:12:20 +0500 Subject: [PATCH] Updated for version 19.6 --- .../GroupDocs.Viewer.Examples.CSharp.csproj | 5 +++-- .../GroupDocs.Viewer.Examples.CSharp/Renderer.cs | 5 +++-- .../GroupDocs.Viewer.Examples.CSharp/Utilties.cs | 12 +++++------- .../GroupDocs.Viewer.Examples.CSharp/packages.config | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Examples/GroupDocs.Viewer.Examples.CSharp/GroupDocs.Viewer.Examples.CSharp.csproj b/Examples/GroupDocs.Viewer.Examples.CSharp/GroupDocs.Viewer.Examples.CSharp.csproj index 13bec6e89..073d71831 100644 --- a/Examples/GroupDocs.Viewer.Examples.CSharp/GroupDocs.Viewer.Examples.CSharp.csproj +++ b/Examples/GroupDocs.Viewer.Examples.CSharp/GroupDocs.Viewer.Examples.CSharp.csproj @@ -43,8 +43,9 @@ ..\packages\AWSSDK.S3.3.3.14\lib\net35\AWSSDK.S3.dll True - - ..\packages\GroupDocs.Viewer.19.5.0\lib\GroupDocs.Viewer.dll + + False + ..\packages\GroupDocs.Viewer.19.6.0\lib\GroupDocs.Viewer.dll True diff --git a/Examples/GroupDocs.Viewer.Examples.CSharp/Renderer.cs b/Examples/GroupDocs.Viewer.Examples.CSharp/Renderer.cs index 65ea3aff3..54e02830f 100644 --- a/Examples/GroupDocs.Viewer.Examples.CSharp/Renderer.cs +++ b/Examples/GroupDocs.Viewer.Examples.CSharp/Renderer.cs @@ -2506,11 +2506,12 @@ public static void RenderDocument(String DocumentName) // Create/initialize image handler ViewerImageHandler imageHandler = new ViewerImageHandler(Utilities.GetConfigurations()); + PdfFileOptions options = new PdfFileOptions(); // To Apply transformations on PDF file - // options.Transformations = Transformation.Rotate | Transformation.Reorder | Transformation.AddPrintAction; + options.Transformations = Transformation.AddPrintAction; // Call GetPdfFile to get FileContainer type object which contains the stream of pdf file. - FileContainer container = imageHandler.GetPdfFile(DocumentName); + FileContainer container = imageHandler.GetPdfFile(DocumentName,options); //Change the extension of the file and assign to a string type variable filename String filename = Path.GetFileNameWithoutExtension(DocumentName) + ".pdf"; diff --git a/Examples/GroupDocs.Viewer.Examples.CSharp/Utilties.cs b/Examples/GroupDocs.Viewer.Examples.CSharp/Utilties.cs index 5fbef537b..7d66cd9c9 100644 --- a/Examples/GroupDocs.Viewer.Examples.CSharp/Utilties.cs +++ b/Examples/GroupDocs.Viewer.Examples.CSharp/Utilties.cs @@ -108,19 +108,17 @@ public static void GetMeteredLicenseConsumption() // Set public and private keys to metered instance metered.SetMeteredKey(publicKey, privateKey); - // Get metered value before usage of the comparison - decimal amountBefore = GroupDocs.Viewer.Metered.GetConsumptionQuantity(); - - Console.WriteLine("Amount (MB) consumed before:" + amountBefore); - // Get pages GroupDocs.Viewer.Handler.ViewerHtmlHandler htmlHandler = new GroupDocs.Viewer.Handler.ViewerHtmlHandler(); List pages = htmlHandler.GetPages("input.pdf"); - // Get metered value after usage of the comparison + // Get metered consumption quantity after usage of the comparison decimal amountAfter = GroupDocs.Viewer.Metered.GetConsumptionQuantity(); - Console.WriteLine("Amount (MB) consumed after: " + amountAfter); + Console.WriteLine("Amount (MB) consumed: " + amountAfter); + + // Get metered consumption credit (Since version 19.6) + decimal creditAfter = GroupDocs.Viewer.Metered.GetConsumptionCredit(); //ExEnd:GetMeteredLicenseConsumption } #endregion diff --git a/Examples/GroupDocs.Viewer.Examples.CSharp/packages.config b/Examples/GroupDocs.Viewer.Examples.CSharp/packages.config index 1d57f7c34..0de1b7d5f 100644 --- a/Examples/GroupDocs.Viewer.Examples.CSharp/packages.config +++ b/Examples/GroupDocs.Viewer.Examples.CSharp/packages.config @@ -2,7 +2,7 @@ - +