Rank: Administration
Groups: Administrators
Joined: 1/5/2016(UTC) Posts: 1,115
Thanks: 8 times Was thanked: 130 time(s) in 127 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 ActivationAn alternative activation method is using the activation utility - Open the Activation Tool, paste the key into the appropriate field and click the Activate button
 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.
- Make sure that your project includes the Pdfium.Net.SDK.licx file and that the file has the following contents

- Make sure the licx file's Build Action property is set to Embedded Resources

- Clean and rebuild your solution.
That's all. Troubleshootingif you activate the key using Legacy Activation - 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.
- 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.
- 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 - Make sure the licx file is added to your project and that this file contains the following line
Patagames.Activation.Activation, Patagames.Pdf
- Make sure that the Build Action property of the licx file is set to Embedded Resource.
- Remove the registry key HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Patagames Software\Pdf.Net SDK
- Activate the key using Activation tool
- 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
|
 1 user thanked Paul Rayman for this useful post.
|
|
|
Rank: Newbie
Groups: Registered
Joined: 6/2/2020(UTC) Posts: 1 
|
I use winforms. So PdfCommon.Initialize("XX") must be entered in every winform? Is there a way to do this globally?
|
|
|
|
Rank: Administration
Groups: Administrators
Joined: 1/5/2016(UTC) Posts: 1,115
Thanks: 8 times Was thanked: 130 time(s) in 127 post(s)
|
No. PdfCommon.Initialize should be called once in the process.
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 7/15/2022(UTC) Posts: 2 
|
Originally Posted by: Paul Rayman  No. PdfCommon.Initialize should be called once in the process.
where should I enter the license key in pdfviewer?
|
|
|
|
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.
Important Information:
The Patagames Software Support Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close