cancel
Showing results for 
Search instead for 
Did you mean: 

Export data from Formatted Text Edit to PDF

Former Member
0 Kudos

Hi Experts,

I am working on a requirement where user will enter the formatted text ( like Bold, Italics and bulleting). Formatted Text Edit UI element is satisfying the requirement. Now I need to collect the data and replicate the same format into a PDF.

Please tell me your suggestions to transfer the data into adobe forms.

Regards,

Mugu

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos
Former Member
0 Kudos

Hi Arshid,

I am following your solution and stuck in displaying the data in adobe forms.

When I am calling the SSF_ABAP_SERVICE,

  • Program is returning the error as CALL_C_FUNCTION_NOT_FOUND
  • Alternatively I called a function module SSFC_BASE64_ENCODE to perform the encoding

PS: Browser issue in copy pasting the code, so attached the screenshot. Please click on the image for a clear view.

Snapshot of the code:


Runtime data of the variables:


In Adobe forms:

  • Created an import parameter in the interface to receive the encoded value (lv_base64)
  • Inserted a Textfield and set the property to RichText and done the data binding to the variable.
  • Provided script is copied to form:ready of the Text field. Run At: Client

Data Printed on the Adobe form is encoded base64 text and not Hello


Can you please guide on what was wrong?

Regards,

Mugu

Former Member
0 Kudos

Hi Mugu,

Try changing Run At: Client to Run At: Server

Regards,

Arshid

Former Member
0 Kudos

Hi Arshid,

I modified to Run At Server, but still the issue persists.

Both the javascript codes

  • to decode base64
  • to convert to xhtml

are copied to form:ready event. Am I right?

Regards,

Mugu

Former Member
0 Kudos

Hi Mugu,

I did this in Initialize event and that code which i have posted works perfectly for me.

One another thing i just noticed is your html string doesn't have body tag,
try with beow string

'<body><p><b>bold</b> not bold</p></body>'

Regards,

Arshid

Former Member
0 Kudos


Hi Arshid,

Thanks for your quick responses. I tried and still the issue persists.

If your adobe form is a simple one and if it is possible can you download the form to XML and share it to me?

Regards,

Mugu

Former Member
0 Kudos

try this in the javascript, if this works then convert the XML to xstring and then try again with hardcoding the xstring in javascript for var b64, if below doesn't work then surely some problem with the scripting or field settings. You might need to adjust the XFA specification in the below text. Have a look at your form XML and you will see the XFA version there

this.value.exData.loadXML('<body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"><p><b>this should be bold</b>this is not bold</p></body>');

http://scn.sap.com/thread/1736481

Former Member
0 Kudos

Hi Arshid,

Thanks a lot for continuous help. Working on other priority tasks. Will complete those and spend time on this. Will get back to you soon.

Regards,

Mugu