1. Daniel Seguin
  2. PowerBuilder
  3. Sunday, 22 September 2024 13:50 PM UTC

Hello,

 

On the Powerbuilder 2022R3 What's new tab, there is a quick presentation of Fillable PDFs

 

I am looking for the complete document that explains how to implement this.

Does someone has found it?

Thanks

Daniel

 

Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Sunday, 22 September 2024 17:53 PM UTC
  2. PowerBuilder
  3. # 1

Check out Bruce's Elevate conference session and there is also code sample you can download: https://www.appeon.com/conference/elevate-2023/live?id=395

Comment
  1. Daniel Seguin
  2. Sunday, 22 September 2024 20:33 PM UTC
Here is the script example:



// create rich text edit control in order to add it to pdf document for validation

date ldate_date = Today()

string comboitems[] = {"Yes", "No" }

string ls_initialtext = "~n~r~n~r~n~r~n~r~n~r"

string ls_signature = fill(" ", 100)

string ls_dateformat = "yyyy-MM-dd"



rte_validation.selecttextall()

rte_validation.ReplaceText (ls_initialtext)



rte_validation.SelectText(1,1,0,0)

rte_validation.ReplaceText("Timesheet Approved:")

rte_validation.SelectText(1,100,0,0)

rte_validation.Formcomboboxinsert( 'Answer:', comboitems, false )



rte_validation.SelectText(2,1,0,0)

rte_validation.ReplaceText( "Approval Date:" )

rte_validation.SelectText(2, 100, 0, 0)

rte_validation.Formdatefieldinsert( ldate_date, true, ls_dateformat, 3000 )



rte_validation.SelectText(3, 1, 0, 0)

rte_validation.ReplaceText("Client Signature:")

rte_validation.SelectText(3, 100, 0, 0)

rte_validation.Formtextfieldinsert( ls_signature )



rte_validation.SelectText(4,1,0,0)

rte_validation.ReplaceText("Consultant Signature:")

rte_validation.SelectText(4, 100, 0, 0)

ls_signature = "Daniel Seguin" + fill(" ",87)

rte_validation.ReplaceText(ls_signature)



rte_validation.ReplaceText (ls_initialtext)



lpdf_validator.importrichtextedit( rte_validation )



ll_return = lpdf_validator.save( "C:\local\mailboxes\powerapps\validate_timecheet.pdf")



========================================================================



Once we add the rte to the pdf document

and save it

and you open the pdf, the fields are fillable.



Now I just have to make it prettier!







  1. Helpful 1
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.