logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Paul Rayman  
#1 Posted : Tuesday, January 5, 2016 5:59:12 AM(UTC)
Paul Rayman

Rank: Administration

Groups: Administrators
Joined: 1/5/2016(UTC)
Posts: 1,094

Thanks: 7 times
Was thanked: 128 time(s) in 125 post(s)
Question:
We have purchased a license but cannot find a link to the download the full version. Please instruct on where to get the download/enter the key into the trial version.

Answer:

Legacy activation.
To use the Pdfium.Net SDK you need to provide a valid license key to the Initialize method of the PdfCommon class. This can either be done directly by providing the key as a string and the call the Initialize(String key) method.
Please see the example below:
Code:

//Initialize the SDK library with license key
//You have to call this function before you can call any PDF processing functions.
PdfCommon.Initialize("42433553494d500328bd021c3fd13c295f0f22d28e311f9cfb5937fbbb94fda3eb077f57b681c1c01742a0e23ccb0e7c52ccd8ea1674baf7473992f5043a4c77d2dc5ba756cd558d2555tdc333e90a2a036xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxd092574ec50a75aaae3b461c62b70");

//Open and load a PDF document from a file.
var doc = PdfDocument.Load(@"c:\test001.pdf");

...


Alternate Activation
An alternative activation method is using the activation utility
  1. Open the Activation Tool, paste the key into the appropriate field and click the Activate button
    Activation Tool
    the Activation Tool is located in the 'Pdf.Net SDK Activation' folder where the Zip/Msi package was installed, or in the Tools directory of the downloaded NuGet package.
    internet access is required for the activation utility to work.
    if the key is successfully activated, a corresponding message will be displayed.

  2. Make sure that your project includes the Pdfium.Net.SDK.licx file and that the file has the following contents
    LICX content

  3. Make sure the licx file's Build Action property is set to Embedded Resources
    LICX properties

  4. Clean and rebuild your solution.
That's all.

Troubleshooting
if you activate the key using Legacy Activation
  1. Remove the registry key HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Patagames Software\Pdf.Net SDK
    If this registry key exists, it means that an activation tool is being used to activate the key. Just delete the entire section. If this registry section is missing, it's okay.
  2. In your solution, run the Find in Files command and look for each call to the PdfCommon.Initialize method to ensure that no other key, NULL value, or empty string is passed to that method. Additionally, this should be the only call to this method in the entire application. Make sure it is called before any other SDK calls.
    Very important, this method must be called before any other SDK methods or properties are called. This is important because some methods perform an implicit trial activation if the SDK has not previously been activated with an activation key.
  3. Clean up and rebuild your solution. Make sure all your assemblies using the Patagames SDK are rebuilt with the new key. If it is not possible to rebuild such assemblies, then it is necessary to ensure that the SDK is initialized with a new key before this happens in these assemblies. To do this, call PdfCommon.Initialize with the new key passed to it before executing any code in these assemblies.


if you activate the key using Alternate Activation
  1. Make sure the licx file is added to your project and that this file contains the following line
    Patagames.Activation.Activation, Patagames.Pdf
  2. Make sure that the Build Action property of the licx file is set to Embedded Resource.
  3. Remove the registry key HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Patagames Software\Pdf.Net SDK
  4. Activate the key using Activation tool
  5. Clean and rebuild your solution. It is important to rebuild all assemblies as the activation information is embedded in the binaries.


Note:

Please note that activation through the activation tool takes precedence over PdfCommon.Initialize.
Therefore, if you call PdfCommon.Initialize with a new key, make sure the activation tool has not been used before.
To remove an activation made with the activation tool, follow these steps:
  • Delete the registry key Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Patagames Software\Pdf.Net SDK
  • Remove licx file from your project in Visual Studio
  • Clean and rebuild solution.

Edited by user Tuesday, February 20, 2024 5:46:26 AM(UTC)  | Reason: Not specified

thanks 1 user thanked Paul Rayman for this useful post.
nuander on 3/22/2016(UTC)
profnach0s  
#2 Posted : Tuesday, June 2, 2020 5:03:17 PM(UTC)
profnach0s

Rank: Newbie

Groups: Registered
Joined: 6/2/2020(UTC)
Posts: 1
United States

I use winforms. So PdfCommon.Initialize("XX") must be entered in every winform? Is there a way to do this globally?
Paul Rayman  
#3 Posted : Tuesday, June 2, 2020 6:53:18 PM(UTC)
Paul Rayman

Rank: Administration

Groups: Administrators
Joined: 1/5/2016(UTC)
Posts: 1,094

Thanks: 7 times
Was thanked: 128 time(s) in 125 post(s)
No. PdfCommon.Initialize should be called once in the process.
huang  
#4 Posted : Saturday, July 16, 2022 9:14:56 AM(UTC)
huang

Rank: Newbie

Groups: Registered
Joined: 7/15/2022(UTC)
Posts: 2
China

Originally Posted by: Paul Rayman Go to Quoted Post
No. PdfCommon.Initialize should be called once in the process.

where should I enter the license key in pdfviewer?

Users browsing this topic
Similar Topics
Where should I enter the license key (F.A.Q.)
by Paul Rayman 1/5/2016 6:57:55 AM(UTC)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.