Not Implemented

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
BombiD
Posts: 4
Joined: Thu Jul 14 2005

Not Implemented

Post by BombiD » Thu Jul 14 2005

Hi

I'm just trying to follow the small example put into the "Technical Note 7.pdf" found on your site, however when this line of code

PDFCreactiveX1.CreateObject (acObjectTypeText, 'text1');

is to be executed I get the "Not Implemented" error! What is that? Is that because of the demo version?

Thanks,
Ivan

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

Post by Joan » Fri Jul 15 2005

Hello,

The small Delphi example was written for version 1.5 of the PDF Creator.

It is still very valid for version 2.0 but you need to add one function to your code: please call SetLicenseKey right after initializing the PDF Creator object.

The error you are getting is not due to SetLicenseKey however, if you try to create an acObjectTypeLine by example or any other object instead of a text, will it work?

If you are still getting the error please post the code you are using to check it.

Thanks.

BombiD
Posts: 4
Joined: Thu Jul 14 2005

Post by BombiD » Fri Jul 15 2005

Hi

Well I added SetLicenseKey and stole stuff from demo project mdiapp.dpr

Now I have this code... which doesn't raise an error, but it also appears to do absolutely nothing.

PDFCreactiveX1.Open('c:\Tmp\amyuni\photo.pdf','');

PDFCreactiveX1.SetLicenseKey(" "," ");

PDFCreactiveX1.CreateObject (acObjectTypeLine, 'text1');
//Position the text
PDFCreactiveX1.ObjectAttribute['text1', 'Left'] := 1600;
PDFCreactiveX1.ObjectAttribute['text1', 'Top'] := 1000;
PDFCreactiveX1.ObjectAttribute['text1', 'Right'] := 1700;
PDFCreactiveX1.ObjectAttribute['text1', 'Bottom'] := 1100;
//Set the Text attribute of text1
PDFCreactiveX1.ObjectAttribute['text1', 'Text'] := 'Dolphin';
PDFCreactiveX1.Refresh;

It should write Dolphin below the photo once refresh executes, but it doesnt do anything. Should I have used any other methods?

Thanks,
Ivan

BombiD
Posts: 4
Joined: Thu Jul 14 2005

Post by BombiD » Fri Jul 15 2005

Correction

PDFCreactiveX1.CreateObject (acObjectTypeLine, 'text1');

is not the right code... I changed that:

PDFCreactiveX1.CreateObject (acObjectTypeText, 'text1');

of course the result is exactly the same.

Ivan

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

Post by Joan » Tue Jul 19 2005

Hello,

You are calling:

Code: Select all

PDFCreactiveX1.Open('c:\Tmp\amyuni\photo.pdf',''); 
I am assuming PDFCreactiveX1 is the PDF Creator Control you added to your form, am I right?

If this is the case please try to call:

Code: Select all

PDFCreactiveX1.Open('c:\Tmp\amyuni\photo.pdf',''); 
PDFCreactiveX1.Refresh,
Will you see the file photo.pdf displayed in the Control?

BombiD
Posts: 4
Joined: Thu Jul 14 2005

Post by BombiD » Tue Jul 19 2005

I think there has been some missunderstanding. I do see the PDF file in the control. The problem I have is that I don't see the text object that I add to the PDF file. No changes are ever made. Even if I save it under a different name and open it - the file looks the same. Just the size of the file has grown (I'm guessing the control adds some data).

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

Post by Joan » Fri Jul 22 2005

Hello,

I will post here the code you get from our Technical Support that solved this issue for further reference.

Code: Select all

PDFCreactiveX1.Open('C:\temp\photo.pdf','');

      PDFCreactiveX1.SetLicenseKey('Amyuni Document Converter
Demo','07EFC.......6DED4BB85E9C');
      PDFCreactiveX1.CreateObject (acObjectTypeText, 'text1');

      PDFCreactiveX1.ObjectAttributeStr ( 'text1', 'Left',  '160');
      PDFCreactiveX1.ObjectAttributeStr ( 'text1', 'Top',  '100');
      PDFCreactiveX1.ObjectAttributeStr ( 'text1', 'Right',  '270');
      PDFCreactiveX1.ObjectAttributeStr ( 'text1', 'Bottom',  '200');

      PDFCreactiveX1.ObjectAttributeStr ('text1', 'Text', 'Dolphin');

      PDFCreactiveX1.DoCommandTool (53776);
      PDFCreactiveX1.Save('C:\temp\photo1.pdf',0); 

Post Reply