Has anyone used the ObjectAttributeStr method of PDF Creator

If you are a Power Builder developer and have any questions about using our products from Power Builder here is the place to post them.
Post Reply
sureshk3
Posts: 29
Joined: Tue Jan 06 2004

Has anyone used the ObjectAttributeStr method of PDF Creator

Post by sureshk3 » Fri Jan 09 2004

The ObjectAttributeStr method is not working for me,
Iam calling it in the following manner,

ole_control.object.ObjectAttributeStr("casename", "Text", "new Text TEsting stuff")

when I use it like that , I get a Powerbuilder Execution error,
"Error accessing external object function "ObjectAttributeStr"........."

Thanks in advance
Suresh

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

Post by Joan » Tue Jan 13 2004

Hello,

Please check the Developers' manual "PDF Creator Developer Manual.pdf" on page 18, you will find information on callind ObjectAttribute and ObjectAttributeSTR.

ObjectAttributeStr is used in applications that do not support Variant. You may use ObjectAtrribute from Powerbuilder.

Thanks.

sureshk3
Posts: 29
Joined: Tue Jan 06 2004

Post by sureshk3 » Tue Jan 13 2004

hi Guys, I figured out the Problem, I got the sample VB app , from your Tech support and Figured , I was missing the SetLicenseKey function in my code and after I did that , my Object attributestr worked real smooth.
Thanx Guys.

Ram04
Posts: 6
Joined: Fri Jan 30 2004

PDF Creator

Post by Ram04 » Fri Jan 30 2004

Sureshk

Can you please let me know on how you populated the pdf file from powerbuilder using objectattributestr, as I have the same problem populating the pdf file using objectattributestr even after adding the licensekey statement in your earlier post. do we get a special licensekey to do that?

IF you can please pass over the vb sample , I would really appreciate.

Ram

sureshk3
Posts: 29
Joined: Tue Jan 06 2004

The Objectattributestr function can be used like this

Post by sureshk3 » Mon Feb 02 2004

Step 1

Int li_ret
String LicenseTo, ActivationCode
LicenseTo = 'Suite Evaluation Version'
ActivationCode = '07EFCDAB010001001DB5BDE69824C760E4DFC8F69516B8E88246C496DA67FA90D447CE8B1BEFC7EDF6DC0B7029903DEA9970304D24B61D2AA3A72E0300C0C90EB051EE3FDBAC800A3B64A5A21895BF78AC9485'
ole_1.Activate(Inplace!)
ole_1.object.SetLicenseKey(LicenseTo,ActivationCode)
li_ret = ole_1.object.open("c:\NA818_D.pdf","")


Step 2
To get the value in a PDF in a string

String ls_casename
ls_casename = ole_1.object.ObjectAttribute('casename', 'Value')

Step 3
to set value.

ls_field1 = dw_1.Getitemstring(ll_rowcnt,'field1')
ole_1.object.ObjectAttributeSTR('casename', 'Value',ls_field1)


Ram are you using Powerbuiler, as you Front End.

Ram04
Posts: 6
Joined: Fri Jan 30 2004

Post by Ram04 » Mon Feb 02 2004

Thanks so much Sureshk for the code.

Yes, I do use Powerbuilder V7 as the front-end.

When using the code you pasted, I still got the same error message. So, I was just wondering on whether the name of the field ("casename" in your case) is the one you defined or was it already there? This is because, I've a fillable pdf form that was already created by Goverment sources and I can just read it using Acrobat Reader or PDF Creator. I dont know how to find out the field name to use in the front - end. Do you have any idea on how to find the field names using Acrobat or PDF Creator softwares from the fillable pdf forms?

Appreciate if you have any idea on this.

Thanks,
Ram.

sureshk3
Posts: 29
Joined: Tue Jan 06 2004

Post by sureshk3 » Mon Feb 02 2004

what is the error you are getting now? which Function is giving the error?
that casename is the name of the field in the PDF.
if you have any questions, Email me skannan@isaws.cahwnet.gov

Ram04
Posts: 6
Joined: Fri Jan 30 2004

replied to your email address

Post by Ram04 » Mon Feb 02 2004

SureshK,

I've sent an email to your address with the details of the error messages. Please let me know if you can help.

Thanks,
Ram.

Post Reply