Foxit Corporation Forums  

Go Back   Foxit Corporation Forums > Portable Document Format (PDF) Tools > SDK ( DLL or ActiveX)

SDK ( DLL or ActiveX) Integrate PDF functions into your application easily. The SDK shares the same technology that powers Foxit Reader.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old September 9th, 2007, 03:41 AM
deathaxe deathaxe is offline
Junior Member
 
Join Date: Jul 2007
Posts: 2
deathaxe is an unknown quantity at this point
Default Using foxitreader_ax.ocx with BCB6 crashes.

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
...
}
Attached Files
File Type: rar FoxitPDF.rar (15.3 KB, 0 views)

Last edited by deathaxe; September 11th, 2007 at 04:42 AM.
Reply With Quote
  #2  
Old September 23rd, 2007, 07:32 PM
william's Avatar
william william is offline
Foxit Developer
 
Join Date: Dec 2005
Posts: 192
william is a glorious beacon of lightwilliam is a glorious beacon of lightwilliam is a glorious beacon of lightwilliam is a glorious beacon of lightwilliam is a glorious beacon of lightwilliam is a glorious beacon of light
Default

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?
Reply With Quote
  #3  
Old September 26th, 2007, 05:31 AM
deathaxe deathaxe is offline
Junior Member
 
Join Date: Jul 2007
Posts: 2
deathaxe is an unknown quantity at this point
Default

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?
Reply With Quote
  #4  
Old November 27th, 2007, 05:14 AM
Dunno118's Avatar
Dunno118 Dunno118 is offline
Junior Member
 
Join Date: Nov 2007
Posts: 1
Dunno118 is an unknown quantity at this point
Thumbs up BCB 6 works for me.

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.
Reply With Quote
  #5  
Old January 15th, 2008, 06:10 PM
william's Avatar
william william is offline
Foxit Developer
 
Join Date: Dec 2005
Posts: 192
william is a glorious beacon of lightwilliam is a glorious beacon of lightwilliam is a glorious beacon of lightwilliam is a glorious beacon of lightwilliam is a glorious beacon of lightwilliam is a glorious beacon of light
Default

Hi Dunno118,

Your program should not write to Read only properties.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 04:00 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2005-2008 Foxit Corporation. All rights reserved.