Skip to content

Commit b9ccbd3

Browse files
Updated for version 19.6
1 parent 85ba975 commit b9ccbd3

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

Examples/GroupDocs.Viewer.Examples.CSharp/GroupDocs.Viewer.Examples.CSharp.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@
4343
<HintPath>..\packages\AWSSDK.S3.3.3.14\lib\net35\AWSSDK.S3.dll</HintPath>
4444
<Private>True</Private>
4545
</Reference>
46-
<Reference Include="GroupDocs.Viewer, Version=19.5.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56, processorArchitecture=MSIL">
47-
<HintPath>..\packages\GroupDocs.Viewer.19.5.0\lib\GroupDocs.Viewer.dll</HintPath>
46+
<Reference Include="GroupDocs.Viewer, Version=19.6.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56, processorArchitecture=MSIL">
47+
<SpecificVersion>False</SpecificVersion>
48+
<HintPath>..\packages\GroupDocs.Viewer.19.6.0\lib\GroupDocs.Viewer.dll</HintPath>
4849
<Private>True</Private>
4950
</Reference>
5051
<Reference Include="Microsoft.Azure.KeyVault.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">

Examples/GroupDocs.Viewer.Examples.CSharp/Renderer.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2506,11 +2506,12 @@ public static void RenderDocument(String DocumentName)
25062506
// Create/initialize image handler
25072507
ViewerImageHandler imageHandler = new ViewerImageHandler(Utilities.GetConfigurations());
25082508

2509+
PdfFileOptions options = new PdfFileOptions();
25092510
// To Apply transformations on PDF file
2510-
// options.Transformations = Transformation.Rotate | Transformation.Reorder | Transformation.AddPrintAction;
2511+
options.Transformations = Transformation.AddPrintAction;
25112512

25122513
// Call GetPdfFile to get FileContainer type object which contains the stream of pdf file.
2513-
FileContainer container = imageHandler.GetPdfFile(DocumentName);
2514+
FileContainer container = imageHandler.GetPdfFile(DocumentName,options);
25142515

25152516
//Change the extension of the file and assign to a string type variable filename
25162517
String filename = Path.GetFileNameWithoutExtension(DocumentName) + ".pdf";

Examples/GroupDocs.Viewer.Examples.CSharp/Utilties.cs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,19 +108,17 @@ public static void GetMeteredLicenseConsumption()
108108
// Set public and private keys to metered instance
109109
metered.SetMeteredKey(publicKey, privateKey);
110110

111-
// Get metered value before usage of the comparison
112-
decimal amountBefore = GroupDocs.Viewer.Metered.GetConsumptionQuantity();
113-
114-
Console.WriteLine("Amount (MB) consumed before:" + amountBefore);
115-
116111
// Get pages
117112
GroupDocs.Viewer.Handler.ViewerHtmlHandler htmlHandler = new GroupDocs.Viewer.Handler.ViewerHtmlHandler();
118113
List<GroupDocs.Viewer.Domain.Html.PageHtml> pages = htmlHandler.GetPages("input.pdf");
119114

120-
// Get metered value after usage of the comparison
115+
// Get metered consumption quantity after usage of the comparison
121116
decimal amountAfter = GroupDocs.Viewer.Metered.GetConsumptionQuantity();
122117

123-
Console.WriteLine("Amount (MB) consumed after: " + amountAfter);
118+
Console.WriteLine("Amount (MB) consumed: " + amountAfter);
119+
120+
// Get metered consumption credit (Since version 19.6)
121+
decimal creditAfter = GroupDocs.Viewer.Metered.GetConsumptionCredit();
124122
//ExEnd:GetMeteredLicenseConsumption
125123
}
126124
#endregion

Examples/GroupDocs.Viewer.Examples.CSharp/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<packages>
33
<package id="AWSSDK.Core" version="3.3.19.1" targetFramework="net40-client" />
44
<package id="AWSSDK.S3" version="3.3.14" targetFramework="net40-client" />
5-
<package id="GroupDocs.Viewer" version="19.5.0" targetFramework="net40-client" />
5+
<package id="GroupDocs.Viewer" version="19.6.0" targetFramework="net40-client" />
66
<package id="Microsoft.Azure.KeyVault.Core" version="1.0.0" targetFramework="net40" />
77
<package id="Microsoft.Data.Edm" version="5.6.4" targetFramework="net40-client" />
88
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net40" />

0 commit comments

Comments
 (0)