Skip to content

Commit

Permalink
Updated for version 19.6
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammadumargroupdocs committed Jun 14, 2019
1 parent 85ba975 commit b9ccbd3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@
<HintPath>..\packages\AWSSDK.S3.3.3.14\lib\net35\AWSSDK.S3.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="GroupDocs.Viewer, Version=19.5.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56, processorArchitecture=MSIL">
<HintPath>..\packages\GroupDocs.Viewer.19.5.0\lib\GroupDocs.Viewer.dll</HintPath>
<Reference Include="GroupDocs.Viewer, Version=19.6.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\GroupDocs.Viewer.19.6.0\lib\GroupDocs.Viewer.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.KeyVault.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
Expand Down
5 changes: 3 additions & 2 deletions Examples/GroupDocs.Viewer.Examples.CSharp/Renderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
12 changes: 5 additions & 7 deletions Examples/GroupDocs.Viewer.Examples.CSharp/Utilties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<GroupDocs.Viewer.Domain.Html.PageHtml> 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
Expand Down
2 changes: 1 addition & 1 deletion Examples/GroupDocs.Viewer.Examples.CSharp/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<packages>
<package id="AWSSDK.Core" version="3.3.19.1" targetFramework="net40-client" />
<package id="AWSSDK.S3" version="3.3.14" targetFramework="net40-client" />
<package id="GroupDocs.Viewer" version="19.5.0" targetFramework="net40-client" />
<package id="GroupDocs.Viewer" version="19.6.0" targetFramework="net40-client" />
<package id="Microsoft.Azure.KeyVault.Core" version="1.0.0" targetFramework="net40" />
<package id="Microsoft.Data.Edm" version="5.6.4" targetFramework="net40-client" />
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net40" />
Expand Down

0 comments on commit b9ccbd3

Please sign in to comment.