Print Page | Close Window

Temporary upgrade from 9 to 11?

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3009
Printed Date: 29 Apr 24 at 4:15AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Temporary upgrade from 9 to 11?
Posted By: Burkart
Subject: Temporary upgrade from 9 to 11?
Date 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





Replies:
Posted By: Burkart
Date Posted: 13 Nov 14 at 2:02PM
PS:
It is
  DPLCreateLibrary ()
which tries to open the old DebenuPDFLibraryDLL0911.dll instead of the new DebenuPDFLibraryDLL1112.dll.


Posted By: Burkart
Date Posted: 13 Nov 14 at 2:46PM
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


Posted By: erico
Date Posted: 13 Nov 14 at 8:19PM
Use the call DPLLastErrorCode to determine the problem. My initial guess would be the password is wrong for this document.


-------------
Eric O


Posted By: Wheeley
Date Posted: 13 Nov 14 at 10:36PM
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



Posted By: Wheeley
Date Posted: 13 Nov 14 at 10:40PM
It would also help to see your source code. Maybe the user here could see something.

Wheeley


Posted By: Ingo
Date Posted: 18 Nov 14 at 10:39AM
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



Posted By: Burkart
Date Posted: 04 Dec 14 at 3:36PM
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.



Posted By: Burkart
Date Posted: 05 Dec 14 at 8:33AM
PS: Little correction: We use blobs, not clobs.


Posted By: Wheeley
Date Posted: 05 Dec 14 at 7:15PM
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


Posted By: Burkart
Date Posted: 06 Dec 14 at 8:02AM
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


Posted By: Wheeley
Date Posted: 06 Dec 14 at 11:40PM
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


Posted By: Burkart
Date Posted: 08 Dec 14 at 12:49PM
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


Posted By: Wheeley
Date Posted: 08 Dec 14 at 11:10PM
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


Posted By: Burkart
Date Posted: 19 Dec 14 at 2:08PM
My problem seems to be solved by using the Adobe Acrobat Reader >= version 10!

Burkart



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk