PowerBuilder 9 protect PDF file problem

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
Fernando Lusardo
Posts: 5
Joined: Tue Jan 20 2009

PowerBuilder 9 protect PDF file problem

Post by Fernando Lusardo »

I'm using PowerBuilder9 and need help to protect pdf file, my code is using this:
.......
i_ole_pdf = create oleobject
i_ole_pdf.ConnectToNewObject( "cdintfEx.cdintfEx" )
i_ole_pdf.PDFDriverInit( "Amyuni PDF Converter" )
....
in the btn_convert_event....
adw_dw_1.Modify( 'Datawindow.Printer="Amyuni PDF Converter"' )
ls_modify = "DataWindow.Print.FileName=~'" + as_filename + "~'"
adw_dw_1.Modify( ls_modify )
....
i_ole_pdf.DefaultFileName = as_filename
i_ole_pdf.FileNameOptions = 1 + 2 + 100
...
TRY
i_ole_pdf.GetVersionInformation( ref ll_CDIntfMajor, ref ll_CDIntfMinor, ref ll_PrinterDriverMajor, ref ll_PrinterDriverMinor )
CATCH ...
END TRY
...
IF ll_CDIntfMajor >= 3 THEN
i_ole_pdf.EnablePrinter( "owner name", "registernumber" )
...
then trying to protect...

in the next sentence, give me an error: Name not found calling external object function... setlicensekey...
HERE GIVE ME AN ERROR...
i_ole_pdf.object.SetLicenseKey( "owner name", "registernumber" )
i_ole_pdf.EncryptPDFDocument( as_filename, '', 'userpass', -64 + 4 )

Please, anyone can help me writing the correct code example??
I need to resolve this matter urgently!!! :(
Thnks;
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Re: PowerBuilder 9 protect PDF file problem

Post by Joan »

Hello Fernando,

I answered your post in the PDF Converter forum http://www.amyuni.com/forum/viewtopic.php?f=2&t=2485

Please don't cross post messages.

Thank you
Custom Brand the Amyuni PDF Printer Driver http://www.amyuni.com/en/developer/branding/index.html

Amyuni PDF Converter tested for true PDF performance. View results - http://www.amyuni.com/benchmark
Post Reply