Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
![]() |
Temporary upgrade from 9 to 11? |
Post Reply ![]() |
Author | |
Burkart ![]() Beginner ![]() Joined: 13 Nov 14 Status: Offline Points: 9 |
![]() ![]() ![]() ![]() ![]() Posted: 13 Nov 14 at 1:47PM |
Hi Quick PDF user,
I am new to Quick PDF and have some source code using Quick PDF with version 9 from a former colleague. My problem is that a special PDF file cannot be (re-)opened by the following statement: ll_rc = DPLLoadFromFileA(il_instID, as_pdfinfile, ls_password); because the return code is 0. (All other PDF files can be opened.) Unfortunately, I must not upload this PDF document anywhere (to be analyzed be experts) because of licence problems. So, I have the idea to test this PDF with the trial version 11 (which I have just downloaded and installed on another test PC to copy the DebenuPDFLibraryDLL1112.dll to my own PC) whether the same error will arrive or if not. I hoped that replacing the DebenuPDFLibraryDLL0911.dll by the new DebenuPDFLibraryDLL1112.dll and replacing the licence key in the source code could be enough but the program cannot find the new dll, it still looks for the old dll. What do I have to do (more) so that the program uses the new DebenuPDFLibraryDLL1112.dll? Any answer will be appreciated! Best regards, Burkart |
|
![]() |
|
Burkart ![]() Beginner ![]() Joined: 13 Nov 14 Status: Offline Points: 9 |
![]() ![]() ![]() ![]() ![]() |
PS:
It is DPLCreateLibrary () which tries to open the old DebenuPDFLibraryDLL0911.dll instead of the new DebenuPDFLibraryDLL1112.dll. |
|
![]() |
|
Burkart ![]() Beginner ![]() Joined: 13 Nov 14 Status: Offline Points: 9 |
![]() ![]() ![]() ![]() ![]() |
The solution to my upgrade problem:
I also had to replace all "DebenuPDFLibraryDLL0911.dll" by "DebenuPDFLibraryDLL1112.dll" in the source code, more precisely the local external function (PowerBuilder) such as FUNCTION long DPLCreateLibrary() LIBRARY "DebenuPDFLibraryDLL1112.dll" ALIAS FOR "DPLCreateLibrary;ansi" Hm, unfortunately the same (re-)open error occurs with this version 11 when I try to open the special PDF file (as mentioned in my first post)... Burkart |
|
![]() |
|
erico ![]() Senior Member ![]() ![]() Joined: 24 Sep 14 Location: Minnesota USA Status: Offline Points: 51 |
![]() ![]() ![]() ![]() ![]() |
Use the call DPLLastErrorCode to determine the problem. My initial guess would be the password is wrong for this document.
|
|
Eric O
|
|
![]() |
|
Wheeley ![]() Senior Member ![]() ![]() Joined: 30 Oct 05 Location: United States Status: Offline Points: 146 |
![]() ![]() ![]() ![]() ![]() |
Just so you know. The export file they have for Powerbuilder is not
totally correct. Depending on the version of Powerbuilder you are using you shouldn't be using the ";ansi". First off you only need to use ;ansi if you have a string argument or are getting back a string from a function. Second, you should only use ;ansi for version of Powerbulder before version 11 I believe. Every version of Powerbuilder that is later supports Unicode strings and therefor you shouldn't use ;ansi.
Wheeley |
|
![]() |
|
Wheeley ![]() Senior Member ![]() ![]() Joined: 30 Oct 05 Location: United States Status: Offline Points: 146 |
![]() ![]() ![]() ![]() ![]() |
It would also help to see your source code. Maybe the user here could see something.
Wheeley |
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
Hi, he wrote that there's only a prob with one special pdf. So posting the source won't help. ;-)I think LastErrorCode could be a good hint, too. Additionally Burkart should have a look inside the pdf (with an Editor) and compare with "good" pdf-documents. Cheers, Ingo
|
|
Cheers,
Ingo |
|
![]() |
|
Burkart ![]() Beginner ![]() Joined: 13 Nov 14 Status: Offline Points: 9 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Sorry for not having answered before, but sometimes... The DPLLastErrorCode is 401 (with the text "Could not open input file"). > you shouldn't use ;ansi. I've just tried it (with PowerBuilder 12.5.2): It doesn't work because I get the error "Die Library >DebenuPDFLibraryDLL0911.DLL< konnte nicht instanziiert oder unblocked werden." (= something like "The library >DebenuPDFLibraryDLL0911.DLL< couldn't be instantiated or unblocked." But thank you for the idea. Meanwhile, I have the "funny" situation that the entry of the old (formerly non-working) pdf in our database is working now. But when I try to store the same pdf file again in the database (clob; Oracle 10), i have the same error as before. The internal storage of both pdf files in the database differ but I don't know why. They got into the database in the same way... ...but not as original. Instead they grew as OLE objects... Therefore I have the following question (for PowerBuilder and/or OLE experts): The original pdf has a size of 606111 bytes, the pdf read afterwards into an OLE object (ole_pdf_in) is about 2.1 MB. The code here is: li_rc = fileOpen(ls_pathName, streamMode!) // ls_pathName: Original file with 606111 bytes ll_bytes = fileReadEx(li_rc, lbl_pdfFile) Messagebox ("lbl_pdfFile (blob); Length:", len(lbl_pdfFile)) // output: 606111 bytes, correct :) li_rc = fileClose(li_rc) li_rc = ole_pdf_in.insertFile(ls_pathName) lbl_pdfFile = ole_pdf_in.objectData Messagebox ("2. lbl_pdfFile (blob); Length:", len(lbl_pdfFile)) // output: >= 2.1 MB, many more bytes!? Is this normal? This ole_pdf_in.objectData is stored into the database (clob). Any ideas are much appreciated :) Burkart PS: There doesn't seem to be a relevant difference between DLL version 9 and 11. |
|
![]() |
|
Burkart ![]() Beginner ![]() Joined: 13 Nov 14 Status: Offline Points: 9 |
![]() ![]() ![]() ![]() ![]() |
PS: Little correction: We use blobs, not clobs.
|
|
![]() |
|
Wheeley ![]() Senior Member ![]() ![]() Joined: 30 Oct 05 Location: United States Status: Offline Points: 146 |
![]() ![]() ![]() ![]() ![]() |
What is the olecontrol you are using? That is most likely where you problem is. Use the Object explorer to see what it is.
Wheeley |
|
![]() |
|
Burkart ![]() Beginner ![]() Joined: 13 Nov 14 Status: Offline Points: 9 |
![]() ![]() ![]() ![]() ![]() |
Thank you for you answer, Wheeley.
What do you mean by "What is"? We are using it as a container for the pdf file which has writeable fields. Burkart |
|
![]() |
|
Wheeley ![]() Senior Member ![]() ![]() Joined: 30 Oct 05 Location: United States Status: Offline Points: 146 |
![]() ![]() ![]() ![]() ![]() |
Using the Object Browser, click on the OLE tab. Here you can find out what application is associated with the PDF file when you insert it into the control using the function InsertFile. IIRC, its the Insertable Objects group you need to expand. You may have to search a little. But the associated program is what is controlling the object, not Powerbuilder.
Wheeley |
|
![]() |
|
Burkart ![]() Beginner ![]() Joined: 13 Nov 14 Status: Offline Points: 9 |
![]() ![]() ![]() ![]() ![]() |
Thank you again, Wheeley.
The application associated (in field "LocalServer32") is Adobe Acrobat 9.0, actually not the newest version... Is the field "ProgID" also important? Its content is "AcroExch.Document.7". How can I change the entry above to a newer Acrobat version? Hm, if a customer has another (an older!?) Acrobat version, (how) does the PowerBuilder-exe know about the Acrobat version? Is it always ours (here Acrobat 9)? Or is an entry in the registry relevant? I have found a lot of them for Acrobat 9.0 im my registry... Should it be even necessary to deinstall the old Acrobat 9.0? Hm, but I have just found also an Acrobat 10 on my PC, too. Burkart |
|
![]() |
|
Wheeley ![]() Senior Member ![]() ![]() Joined: 30 Oct 05 Location: United States Status: Offline Points: 146 |
![]() ![]() ![]() ![]() ![]() |
I'm not the total OLE expert. I use OLE and Excel in my job. We used to use objectdata like you until Excel versions outpaced file type support (aka the new Excel file type wasn't supported). Now I use an oleobject and explicitly connect to the OLE server (which is Excel) and use Excel functions to open and close an Excel file. So basically what does this mean to you.
1. I have seen this objectdata file size creep before. Basically the object data now contains ore than the original file. You can see this by doing a binary compare of the blob before assignment and then after assignment. 2. Depending on what you are using the olecontrol for it might be safer to do a re-write so the application opens and closes the file on disk. 3. You may want to seek help on the Powerbuilder forum on SAP's website. They may have more incite into your problem and solution. Wheeley |
|
![]() |
|
Burkart ![]() Beginner ![]() Joined: 13 Nov 14 Status: Offline Points: 9 |
![]() ![]() ![]() ![]() ![]() |
My problem seems to be solved by using the Adobe Acrobat Reader >= version 10!
Burkart |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() 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 |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store