NeoSmartpen / Ncode-SDK2.0

Ncode™ Generation SDK 2.0
17 stars 5 forks source link

cs_adobe_pdf_sample upgrade to Ncode-SDK2.0 #4

Closed JayBaddam closed 5 years ago

JayBaddam commented 5 years ago

Hi I'm trying to use the project cs_adobe_pdf_sample from NeoSmartpen/Ncode-SDK at https://github.com/NeoSmartpen/Ncode-SDK/tree/master/cs_adobe_pdf_sample

I have downloaded DataLogics.DLL, version 2.2.1592.15045, which is different from the DataLogics.DLL version 2.2.1584.15044 the runtime is expecting.

  1. How can I download DataLogics.DLL version 2.2.1584.15044?
  2. Are there plans to upgrade cs_adobe_pdf_sample project to use the later version of DataLogics.DLL?
  3. My understanding is that the DataLogics.DLL is being referenced from PDFLibAgent.DLL, so I have no control over enforcing/changing the version it's calling. Is there a way I can reference the version I have from the code?
  4. Are there alternatives to DataLogics for the PDF functionality? DataLogics is expensive.

Error message below: System.IO.FileNotFoundException HResult=0x80070002 Message=Could not load file or assembly 'Datalogics.PDFL, Version=2.2.1584.15044, Culture=neutral, PublicKeyToken=ec84850197728341' or one of its dependencies. The system cannot find the file specified. Source=PDFLibAgent StackTrace: at PDFLibAgent.PDFControl.init() at sampleApp_Ncode_csadobe.Program..ctor() in C:...\Visual Studio 2019\Projects\Ncode-SDK\cs_adobe_pdf_sample\sampleApp(NCode)\Program.cs:line 73 at sampleApp_Ncode_csadobe.Program.Main(String[] args) in C:...\Visual Studio 2019\Projects\Ncode-SDK\cs_adobe_pdf_sample\sampleApp(NCode)\Program.cs:line 88

Thank you!

hrhwang commented 5 years ago

You can find PdfLibAgent.dll files on "\NcodeSDK2.0beta\cs\sampleApp(Ncode_cs_adobe)\dll" Use the one that corresponds to the version of the Datalogics library you are using. Both of "2.2.1584.15044" and "2.2.1592.15045" are exist.

JayBaddam commented 5 years ago

Thank you! I found the file.

Now I'm getting an error with the License Key even though everything seems correct.

Error with initializing Adobe PDF lib coming up at lib.init(workingDir, libKey) I don't see anywhere key string similar to "Gqmeu6ollrqna8Pub5..." as mentioned in the program.cs file

        string libPath = Directory.GetCurrentDirectory();
        **string libKey = "xxxx-yyyy-zzzz-aaaa";       // key string is similar to "Gqmeu6ollrqna8Pub5..."**
        if (!lib.init(libPath, libKey))
        {
            Console.WriteLine("Initializing Adobe PDF lib failed.");
            return;
        }

I followed the instructions related to License key correctly. 1. The file apdfl15.lic is generated using Activate.exe & the 16 digit xxxx-yyyy-zzzz-aaaa key provided.

  1. The .lic file does show exp. date as 30 April; placed the .lic file in the working directory
  2. Also created the user variable as well as system variable for datalogics_LICENSE

apdfl15.lic

This license created by RLM Internet Activation

Created on 04/15/2019 at 03:51

LICENSE datalogics apdfl 9.0 30-apr-2019 uncounted hostid=disksn=00##########X_#X.X platforms="x86_w x64_w x86_l x64_l" issued=15-apr-2019 akey=xxxx-yyyy-zzzz-aaaa _ck=##xxxx#x#x sig="##X#####XXX####X##X#X#XXX#XXXXX##XXXX####XXXX#X#XXXX#XX#XX#XXX

X#XXX##XX#"

hrhwang commented 5 years ago

The libKey you need to enter is used to gain access to secured resources inside the PDF file. In the past, Datalogics' sample code had provided the key, but I did not see it now. I will update to use the sample of the Ncode SDK without the key value, and will update it as soon as possible.

JayBaddam commented 5 years ago

Thank you! Can you share the ETA for the completed changes, please?

hrhwang commented 5 years ago

What is ETA? Actually I already updated new dll file and sample code. You can try it now.

JayBaddam commented 5 years ago

Thank you for the quick response!

ETA = Estimated Date

Now I am getting the error "IPDFControl does not contain a definition for IsLibKeyOk" at the line # 332 if (newDoc.controller().IsLibKeyOk() == true)

JayBaddam commented 5 years ago

I have commented the line if (newDoc.controller().IsLibKeyOk() == true)

and it's back to the original error with LibKey -

Error with initializing Adobe PDF lib coming up at lib.init(workingDir, libKey)

JayBaddam commented 5 years ago

FYI - the DataLogics.PDFL I have is Datalogics.PDFL.2.2.1592.15045

JayBaddam commented 5 years ago

Datalogics.PDFL.2.2.1592.15045 is no longer at - https://github.com/NeoSmartpen/Ncode-SDK2.0/tree/master/cs/**sampleApp(Ncode_cs_adobe)/dll**

hrhwang commented 5 years ago

I'm sorry. I have lost my signed dll files as sources. (Datalogics.PDFL.2.2.1592.15045) Can I have only two files you have? You can find it in the folder where the library is installed. The folder names are as follows. \ Datalogics \ APDFL15.0.4 \ DotNET \ Binaries \ Signed_DLLs

The following two files are required. Datalogics.PDFL.dll DL150PDFLPINVOKE.dll

I will build a new version of PdfLibAgent.dll. My email address is hrhwang@neolab.net

JayBaddam commented 5 years ago

I have sent the files from my email. Thank you!