First attempt to create PDF-documents using the DLL

If you are a Delphi developer and have any questions about using our products from Delphi here is the place to post them.
Post Reply
ToniR
Posts: 6
Joined: Wed Apr 14 2004

First attempt to create PDF-documents using the DLL

Post by ToniR »

:?: I try to use the demo-version of PDF-Converter with Delphi 5 since yesterday. In order to have no problems in deployment of our software, I want to use the DLL interface of CDIntf210.DLL. As mentioned in the example of TN07 and in "common driver interface 210.pdf" I developed a simple RTF-Tool: But it works without problems only on one computer (on which it was created). On some other computers "PDFDriverInit" returns 0, on some a driver handle is created but "SetDefaultDirectory" fails.

Is it a reduction of the demo-version? I cannot find an own mistake...

Thanks for help
Toni
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello Toni,

You Delphi sample should work with the demo version of the PDF Converter on any computer that is running under Windows.

Some issues to take care off are:

1 - If you are using PDFDriverInit in your code, please check that you log to the computer on wich you want to run your application as an Administrator and not as a User.

2 - Check that you are installing the PDF Printer on the other system before running your application. It is advisable to install the printer on the system using the exe file you downloaded when getting the demo.

Hope this helps.
ToniR
Posts: 6
Joined: Wed Apr 14 2004

Post by ToniR »

Hello Joan,

I don't really unterstand... :?:

In our office it won't be a problem to INSTALL your product on every PC (I've tested it on one PC - successful!). But I cannot do this for every customer. We prefer to use PDFDriverInit AND DriverEnd for every single use.

On some of our PC PDFDriverInit creates a new printer (which I can select in other programmes e.g. MS-Word). But it's impossible to call the options of this new PDF-printer (neither in Word nor in our product). On other PC PDFDriverInit causes on error.

Or is the solution using the ActiveX instead of the DLL? But I can't use the code of TN07 because the latest version of CDIntf210.DLL contains the object TCDIntfEx - your example is searching for TPDFCreActiveX.

Do you have any other simple example for using the DLL within Delphi?

It's a petty because your product seems to be exactly what we're searching for... :(

Toni
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello Toni,

PDFDriverInit will fail only if the user doesn't have administrative rights, this is absolutely normal because under Windows 2000, NT, XP only administrators can install a printer on the system, so if a user (not administrator) is logging to the system he / she will not be able to install any printer including our printer. All what PDFDriverInit does is installing a printer so it will fail.

Our Delphi techincal note tn07 uses both TCDIntfEx (CDIntf210.dll) and TPDFCreactiveX (PDF Creator control). Maybe you are downloading an older version of tn07.

I didn't really get what you mean by:
On some of our PC PDFDriverInit creates a new printer (which I can select in other programmes e.g. MS-Word). But it's impossible to call the options of this new PDF-printer (neither in Word nor in our product).
Concerning installing the PDF Printer on users machines, there are many ways to do so other than running Install.exe on each machine, you can write a small script and include it in the installation process of your application. This script will call PDFDriverInit and then DriverInit to install the printer and keep it there.

To help you using the PDF Converter and deploying it on your users machines, please send us an e-mail to support@amyuni.com and we will send you the needed information that would help you.

I am sure this will help and you will be able to use and deploy the PDF Converter very easily from Delphi.

Thanks.
Post Reply