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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > General Discussion
  New Posts New Posts RSS Feed - C++Builder 2009 with ActiveX not working?
  FAQ FAQ  Forum Search   Register Register  Login Login

C++Builder 2009 with ActiveX not working?

 Post Reply Post Reply
Author
Message
Bugtester View Drop Down
Beginner
Beginner


Joined: 09 Apr 10
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bugtester Quote  Post ReplyReply Direct Link To This Post Topic: C++Builder 2009 with ActiveX not working?
    Posted: 09 Apr 10 at 3:02PM
Hi.

I have downloaded Trial Quick PDF Library 7.18 and want testing with C++Builder 2009.
I see my only(?) way is to use ActiveX with Unicode-Support. I need chinese, turkey and so on.
But with C++Builder 2009 its wan't working. :(

Can anybody help me? What is my mistake?

#include <vcl.h>
#pragma hdrstop

#include "Unit1.h"
#include "QuickPDFAX0718.h"

//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
    : TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
    QuickPDFAX0718 QP;
    wstring LicenseKey = L"KEY";
    wstring outPDF = L"hello-world.pdf";

    int iResult = QP.UnlockKey(LicenseKey);
    if (iResult == 1)
    {
     }
}
//---------------------------------------------------------------------------


This unit compiled fine, but after i get 51 errors:

Quote [BCC32 Fehler] QuickPDFAX0718.cpp(173): E2015 Mehrdeutigkeit zwischen '_variant_t::_variant_t(short,unsigned short) throw(_com_error) at c:\programme\codegear\rad studio\6.0\include\comutil.h:928' und '_variant_t::_variant_t(long,unsigned short) throw(_com_error) at c:\programme\codegear\rad studio\6.0\include\comutil.h:947'
[BCC32 Fehler] QuickPDFAX0718.cpp(173): E2034 Konvertierung von 'int' nach '_variant_t' nicht möglich
[BCC32 Fehler] QuickPDFAX0718.cpp(173): E2342 Keine Übereinstimmung des Typs beim Parameter 'p1' ('_variant_t' erwartet, 'int' erhalten)
[BCC32 Fehler] QuickPDFAX0718.cpp(196): E2015 Mehrdeutigkeit zwischen '_variant_t::_variant_t(short,unsigned short) throw(_com_error) at c:\programme\codegear\rad studio\6.0\include\comutil.h:928' und '_variant_t::_variant_t(long,unsigned short) throw(_com_error) at c:\programme\codegear\rad studio\6.0\include\comutil.h:947'
[BCC32 Fehler] QuickPDFAX0718.cpp(196): E2034 Konvertierung von 'int' nach '_variant_t' nicht möglich
[BCC32 Fehler] QuickPDFAX0718.cpp(196): E2342 Keine Übereinstimmung des Typs beim Parameter 'p2' ('_variant_t' erwartet, 'int' erhalten)
[BCC32 Fehler] QuickPDFAX0718.cpp(204): E2015 Mehrdeutigkeit zwischen '_variant_t::_variant_t(short,unsigned short) throw(_com_error) at c:\programme\codegear\rad studio\6.0\include\comutil.h:928' und '_variant_t::_variant_t(long,unsigned short) throw(_com_error) at c:\programme\codegear\rad studio\6.0\include\comutil.h:947'
[BCC32 Fehler] QuickPDFAX0718.cpp(204): E2034 Konvertierung von 'int' nach '_variant_t' nicht möglich
[BCC32 Fehler] QuickPDFAX0718.cpp(204): E2342 Keine Übereinstimmung des Typs beim Parameter 'p1' ('_variant_t' erwartet, 'int' erhalten)
[BCC32 Fehler] QuickPDFAX0718.cpp(211): E2015 Mehrdeutigkeit zwischen '_variant_t::_variant_t(short,unsigned short) throw(_com_error) at c:\programme\codegear\rad studio\6.0\include\comutil.h:928' und '_variant_t::_variant_t(long,unsigned short) throw(_com_error) at c:\programme\codegear\rad studio\6.0\include\comutil.h:947'
[BCC32 Fehler] QuickPDFAX0718.cpp(211): E2034 Konvertierung von 'int' nach '_variant_t' nicht möglich
[BCC32 Fehler] QuickPDFAX0718.cpp(211): E2342 Keine Übereinstimmung des Typs beim Parameter 'p1' ('_variant_t' erwartet, 'int' erhalten)
[BCC32 Fehler] QuickPDFAX0718.cpp(228): E2015 Mehrdeutigkeit zwischen '_variant_t::_variant_t(short,unsigned short) throw(_com_error) at c:\programme\codegear\rad studio\6.0\include\comutil.h:928' und '_variant_t::_variant_t(long,unsigned short) throw(_com_error) at c:\programme\codegear\rad studio\6.0\include\comutil.h:947'
[BCC32 Fehler] QuickPDFAX0718.cpp(228): E2034 Konvertierung von 'int' nach '_variant_t' nicht möglich
[BCC32 Fehler] QuickPDFAX0718.cpp(228): E2342 Keine Übereinstimmung des Typs beim Parameter 'p2' ('_variant_t' erwartet, 'int' erhalten)
[BCC32 Fehler] QuickPDFAX0718.cpp(237): E2015 Mehrdeutigkeit zwischen '_variant_t::_variant_t(short,unsigned short) throw(_com_error) at c:\programme\codegear\rad studio\6.0\include\comutil.h:928' und '_variant_t::_variant_t(long,unsigned short) throw(_com_error) at c:\programme\codegear\rad studio\6.0\include\comutil.h:947'
[BCC32 Fehler] QuickPDFAX0718.cpp(237): E2034 Konvertierung von 'int' nach '_variant_t' nicht möglich
[BCC32 Fehler] QuickPDFAX0718.cpp(237): E2342 Keine Übereinstimmung des Typs beim Parameter 'p2' ('_variant_t' erwartet, 'int' erhalten)
[BCC32 Fehler] QuickPDFAX0718.cpp(245): E2015 Mehrdeutigkeit zwischen '_variant_t::_variant_t(short,unsigned short) throw(_com_error) at c:\programme\codegear\rad studio\6.0\include\comutil.h:928' und '_variant_t::_variant_t(long,unsigned short) throw(_com_error) at c:\programme\codegear\rad studio\6.0\include\comutil.h:947'
[BCC32 Fehler] QuickPDFAX0718.cpp(245): E2034 Konvertierung von 'int' nach '_variant_t' nicht möglich
[BCC32 Fehler] QuickPDFAX0718.cpp(245): E2342 Keine Übereinstimmung des Typs beim Parameter 'p2' ('_variant_t' erwartet, 'int' erhalten)
[BCC32 Fehler] QuickPDFAX0718.cpp(268): E2015 Mehrdeutigkeit zwischen '_variant_t::_variant_t(short,unsigned short) throw(_com_error) at c:\programme\codegear\rad studio\6.0\include\comutil.h:928' und '_variant_t::_variant_t(long,unsigned short) throw(_com_error) at c:\programme\codegear\rad studio\6.0\include\comutil.h:947'
[BCC32 Fehler] QuickPDFAX0718.cpp(268): E2034 Konvertierung von 'int' nach '_variant_t' nicht möglich
[BCC32 Fehler] QuickPDFAX0718.cpp(268): E2342 Keine Übereinstimmung des Typs beim Parameter 'p5' ('_variant_t' erwartet, 'int' erhalten)
[BCC32 Fehler] QuickPDFAX0718.cpp(277): E2015 Mehrdeutigkeit zwischen '_variant_t::_variant_t(short,unsigned short) throw(_com_error) at c:\programme\codegear\rad studio\6.0\include\comutil.h:928' und '_variant_t::_variant_t(long,unsigned short) throw(_com_error) at c:\programme\codegear\rad studio\6.0\include\comutil.h:947'
[BCC32 Fehler] QuickPDFAX0718.cpp(277): E2034 Konvertierung von 'int' nach '_variant_t' nicht möglich
[BCC32 Fehler] QuickPDFAX0718.cpp(277): E2342 Keine Übereinstimmung des Typs beim Parameter 'p6' ('_variant_t' erwartet, 'int' erhalten)
[BCC32 Fehler] QuickPDFAX0718.cpp(286): E2015 Mehrdeutigkeit zwischen '_variant_t::_variant_t(short,unsigned short) throw(_com_error) at c:\programme\codegear\rad studio\6.0\include\comutil.h:928' und '_variant_t::_variant_t(long,unsigned short) throw(_com_error) at c:\programme\codegear\rad studio\6.0\include\comutil.h:947'
[BCC32 Fehler] QuickPDFAX0718.cpp(286): E2034 Konvertierung von 'int' nach '_variant_t' nicht möglich
[BCC32 Fehler] QuickPDFAX0718.cpp(286): E2342 Keine Übereinstimmung des Typs beim Parameter 'p6' ('_variant_t' erwartet, 'int' erhalten)
[BCC32 Fehler] QuickPDFAX0718.cpp(294): E2015 Mehrdeutigkeit zwischen '_variant_t::_variant_t(short,unsigned short) throw(_com_error) at c:\programme\codegear\rad studio\6.0\include\comutil.h:928' und '_variant_t::_variant_t(long,unsigned short) throw(_com_error) at c:\programme\codegear\rad studio\6.0\include\comutil.h:947'
[BCC32 Fehler] QuickPDFAX0718.cpp(294): E2034 Konvertierung von 'int' nach '_variant_t' nicht möglich
[BCC32 Fehler] QuickPDFAX0718.cpp(294): E2342 Keine Übereinstimmung des Typs beim Parameter 'p5' ('_variant_t' erwartet, 'int' erhalten)
[BCC32 Fehler] QuickPDFAX0718.cpp(301): E2015 Mehrdeutigkeit zwischen '_variant_t::_variant_t(short,unsigned short) throw(_com_error) at c:\programme\codegear\rad studio\6.0\include\comutil.h:928' und '_variant_t::_variant_t(long,unsigned short) throw(_com_error) at c:\programme\codegear\rad studio\6.0\include\comutil.h:947'
[BCC32 Fehler] QuickPDFAX0718.cpp(301): E2034 Konvertierung von 'int' nach '_variant_t' nicht möglich
[BCC32 Fehler] QuickPDFAX0718.cpp(301): E2342 Keine Übereinstimmung des Typs beim Parameter 'p6' ('_variant_t' erwartet, 'int' erhalten)
[BCC32 Fehler] QuickPDFAX0718.cpp(312): E2015 Mehrdeutigkeit zwischen '_variant_t::_variant_t(short,unsigned short) throw(_com_error) at c:\programme\codegear\rad studio\6.0\include\comutil.h:928' und '_variant_t::_variant_t(long,unsigned short) throw(_com_error) at c:\programme\codegear\rad studio\6.0\include\comutil.h:947'
[BCC32 Fehler] QuickPDFAX0718.cpp(312): E2034 Konvertierung von 'int' nach '_variant_t' nicht möglich
[BCC32 Fehler] QuickPDFAX0718.cpp(312): E2342 Keine Übereinstimmung des Typs beim Parameter 'p3' ('_variant_t' erwartet, 'int' erhalten)
[BCC32 Fehler] QuickPDFAX0718.cpp(321): E2015 Mehrdeutigkeit zwischen '_variant_t::_variant_t(short,unsigned short) throw(_com_error) at c:\programme\codegear\rad studio\6.0\include\comutil.h:928' und '_variant_t::_variant_t(long,unsigned short) throw(_com_error) at c:\programme\codegear\rad studio\6.0\include\comutil.h:947'
[BCC32 Fehler] QuickPDFAX0718.cpp(321): E2034 Konvertierung von 'int' nach '_variant_t' nicht möglich
[BCC32 Fehler] QuickPDFAX0718.cpp(321): E2342 Keine Übereinstimmung des Typs beim Parameter 'p1' ('_variant_t' erwartet, 'int' erhalten)
[BCC32 Fehler] QuickPDFAX0718.cpp(330): E2015 Mehrdeutigkeit zwischen '_variant_t::_variant_t(short,unsigned short) throw(_com_error) at c:\programme\codegear\rad studio\6.0\include\comutil.h:928' und '_variant_t::_variant_t(long,unsigned short) throw(_com_error) at c:\programme\codegear\rad studio\6.0\include\comutil.h:947'
[BCC32 Fehler] QuickPDFAX0718.cpp(330): E2034 Konvertierung von 'int' nach '_variant_t' nicht möglich
[BCC32 Fehler] QuickPDFAX0718.cpp(330): E2342 Keine Übereinstimmung des Typs beim Parameter 'p6' ('_variant_t' erwartet, 'int' erhalten)
[BCC32 Fehler] QuickPDFAX0718.cpp(338): E2015 Mehrdeutigkeit zwischen '_variant_t::_variant_t(short,unsigned short) throw(_com_error) at c:\programme\codegear\rad studio\6.0\include\comutil.h:928' und '_variant_t::_variant_t(long,unsigned short) throw(_com_error) at c:\programme\codegear\rad studio\6.0\include\comutil.h:947'
[BCC32 Fehler] QuickPDFAX0718.cpp(338): E2034 Konvertierung von 'int' nach '_variant_t' nicht möglich
[BCC32 Fehler] QuickPDFAX0718.cpp(338): E2342 Keine Übereinstimmung des Typs beim Parameter 'p6' ('_variant_t' erwartet, 'int' erhalten)
[BCC32 Fehler] QuickPDFAX0718.cpp(345): E2015 Mehrdeutigkeit zwischen '_variant_t::_variant_t(short,unsigned short) throw(_com_error) at c:\programme\codegear\rad studio\6.0\include\comutil.h:928' und '_variant_t::_variant_t(long,unsigned short) throw(_com_error) at c:\programme\codegear\rad studio\6.0\include\comutil.h:947'
[BCC32 Fehler] QuickPDFAX0718.cpp(345): E2034 Konvertierung von 'int' nach '_variant_t' nicht möglich
[BCC32 Fehler] QuickPDFAX0718.cpp(345): E2228 Zu viele Fehlermeldungen oder Warnungen

Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 09 Apr 10 at 4:14PM
Hi Tester!

It seems to me that it's more a general problem using BCC with an activex?
It's not correct that you can use only the ax-version... the normal dll would work, too.
Samples how to work with dlls and ax you'll find on the official support pages.
A few threads below in this section here i've posted few main things for beginners with QuickPDF.
Please have look:
http://www.quickpdf.org/forum/quickpdf-the-first-steps_topic1242.html

Cheers and welcome here,
Ingo

Back to Top
Bugtester View Drop Down
Beginner
Beginner


Joined: 09 Apr 10
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bugtester Quote  Post ReplyReply Direct Link To This Post Posted: 09 Apr 10 at 8:57PM
Hallo. Thanks for the fast answer.

Normal "C++Builder 2009" can use Pascal units, here not? With Trial I can't test it.

The DLL use "string" and not "wstring" i don't think that DLL can use unicode correctly (chinese, turkey and so on), or?


EDIT:
If possible as VCL, an example for an actual C++Builder 2009/2010 would be nice.
I know of many C++Builder developers looking for a pdf component (not as DLL, for native VCL).


Edited by Bugtester - 09 Apr 10 at 9:04PM
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 09 Apr 10 at 9:17PM
Hi!

This is a user-user-forum... If you have suggestions you should use the official support-pages.
Widestring and unicode is similar but not absolutely the same. Sometimes you should think on utf8-convertion, too.
I don't have made these experiences calling the dll i'm using Widestring and PWideChar and it works. Sorry ;-)

Cheers, Ingo
Back to Top
Wheeley View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 Oct 05
Location: United States
Status: Offline
Points: 146
Post Options Post Options   Thanks (0) Thanks(0)   Quote Wheeley Quote  Post ReplyReply Direct Link To This Post Posted: 10 Apr 10 at 12:43AM
With regard to unicode support in the DLL, you need to convert wchar to char BUT use a utf8 encoding just like the document says.

Wheeley
Back to Top
Bugtester View Drop Down
Beginner
Beginner


Joined: 09 Apr 10
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bugtester Quote  Post ReplyReply Direct Link To This Post Posted: 12 Apr 10 at 9:35AM
I have test the DLL example with my C++Builder2009: http://help.quickpdflibrary.com/questions/206/can-i-use-quick-pdf-library-with-borland-c-builder-3 its working fine with standard text.

Modify the Textout with chinese signs:

string utf8Encode(String str)
{
    return UTF8String(str).c_str();
}
UnicodeString Text = L"Hello 排水量 world from C++";
QP.DrawText(100, 500, utf8Encode(Text));


With this I get cryptical signs and not chinese: "Hello æŽ’æ°´é‡ world from C++"
Can anybody help me please? :)



Edited by Bugtester - 12 Apr 10 at 12:02PM
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 12 Apr 10 at 11:56AM
Hi!

UTF8 is good if you have to do with "german umlauts".
Chinese characters you can handle with some tries regarding AnsiString, AnsiChar, WideString and PWideChar.

Cheers, Ingo



Edited by Ingo - 12 Apr 10 at 11:57AM
Back to Top
Bugtester View Drop Down
Beginner
Beginner


Joined: 09 Apr 10
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bugtester Quote  Post ReplyReply Direct Link To This Post Posted: 12 Apr 10 at 1:43PM
I have mixed texts from a database. In this text is german, english, turkish, chinese, japanese, ......
Unicode to me is still new. So there is no easy way to quickpdf text output in a pdf with dll for C++Builder2009?
Back to Top
Bugtester View Drop Down
Beginner
Beginner


Joined: 09 Apr 10
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bugtester Quote  Post ReplyReply Direct Link To This Post Posted: 12 Apr 10 at 3:16PM
I have testing with "Quick PDF Library 7.17 Demo (1.5)"
In this tool Unicode working fine with mixed texts.

The code there in editor is

drawstr = " TEST 你好 HAHA äöü";
// Add a subset font for the text string
QP.AddSubSettedFont("Verdana", 7, drawstr);
// Remap the string to ensure that the correct character codes are used.
substr = QP.GetSubsetstring(drawstr);
// Draw the Unicode text onto the page
QP.DrawText(100, 600, substr);


I have little problems to convert this in C++Builder

Thats working:
string drawstr = "Normal text äöü";
QP.DrawText(100, 500, drawstr);

Thats give undefined signs
string drawstr = "Normal text äöü";
QP.AddSubsettedFont("Verdana", 1, drawstr);
string substr = QP.GetSubsetString(drawstr);
QP.DrawText(100, 500, substr);

Test with chinese signs fails too
UnicodeString Text = L"Hello 排水量 world from C++"; // mixed text from database
string drawstr = utf8Encode(Text);
QP.AddSubsettedFont("Verdana", 7, drawstr);
string substr = QP.GetSubsetString(drawstr);
QP.DrawText(100, 500, substr);

Who can help here?


Edited by Bugtester - 12 Apr 10 at 3:17PM
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 12 Apr 10 at 10:40PM
Hi!

I've written it often enough now where you can get help...
Take the official support pages and make your post there.

Cheers, Ingo
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store