![]() |
|
|||||||
| SDK ( DLL or ActiveX) Integrate PDF functions into your application easily. The SDK shares the same technology that powers Foxit Reader. |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hello guys,
I need PDF ability in my application in order to display help information. As I like Foxit Reader very much for its speed I wanted to use it in my application too. I am using Borland C++ Builder 6. Using the "Import ActiveX" function from its main menu I installed the foxitreader activex control as a package. When adding the new component to a TForm object it is shown correctly, but as soon as I try to call OpenFile(...) from the source code, the operation fails with an access violation. I compared the examples for foxit's api with the imported library code. Doing so I realized the following: While strings in api examples are ANSI, Borland C++ Builder's import library uses UNICODE parameters. May this be the reason? Can anybody help me with this problem, pleeaaase? My using code is: Boolean TAlertHelp::OpenPdf(TWinControl* AOwner, const WideString& HelpFile) { ... FPdf = new TPdf(AOwner); FPdf->Align = alClient; FPdf->Parent = AOwner; FPdf->Visible = True; #ifdef ACROBAT_PDF FPdf->src = HelpFile; FPdf->setShowToolbar(False); #else FPdf->OpenFile(HelpFile, L""); // this is the crash causing line FPdf->ShowTitleBar(False); FPdf->ShowToolBar(False); #endif ... } Last edited by deathaxe; September 11th, 2007 at 04:42 AM. |
|
#2
|
||||
|
||||
|
Hi Deathaxe,
Our developer has tested the OpenFile method under Unicode and found no problem. Are you sure that you have configured your compiler to fully use Unicode? |
|
#3
|
|||
|
|||
|
Hmm,
... is there an option for the compiler in borland c++ builder 6? I am using Tnt Delphi Controls to make my whole application unicode enabled. The unicode using foxit classes were generated by borland automatically, so I was sure it handles them correctly using unicode strings for parameters. Putting the _UNICODE definition into the project's options page does not solve the problem. As I did not install any service packs for c++ builder (they are no longer available for german versions) and you proofed your library to work, I am sure the prolbem is caused by ****f...g borland itself. Which version of cüü builder did your tester use? |
|
#4
|
||||
|
||||
|
I installed it as a standard Active X control using the Import ActiveX control.
PDFView->OpenFile((WideString)s, WideString("")); All of the other functions work as expected. Trying to write to the Read only properties of the control will cause it to crash though. |
|
#5
|
||||
|
||||
|
Hi Dunno118,
Your program should not write to Read only properties. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|