Skip to content

Latest commit

 

History

History
459 lines (246 loc) · 5.83 KB

runtime-api-for-ads-rendering-calls-3d8686d.md

File metadata and controls

459 lines (246 loc) · 5.83 KB

Runtime API for ADS Rendering Calls

The CL_FP_ADS_UTIL class provides the ABAP Runtime API for Adobe Document Services (ADS) rendering calls. It contains the following Public methods to be used for the corresponding functions:

Public Methods

Method

Description

RENDER_PDF

Rendering PDF

RENDER_4_PQ

Rendering for Print Queue

The PDF rendering process on ADS creates the PDF file to be printed (or print output format) using the following both formats:

The XDP form template file is a description of the form layout design in Adobe XFA format. The supported data binding type is an XML data schema.

The Adobe LiveCycle Designer for SAP solutions is the tool for visual design XDP form templates from Adobe Inc. It can be downloaded using the Install Additional Software app, which contains the download link to the SAP ONE Support Launchpad.

The data XML file contains the data that corresponds to the used data schema in the XDP form template.

The RENDER_PDF method calls the ADS to render print PDF using the XDP form file and the XML data file. It has the following importing/exporting parameters:

Importing Parameters

Parameter

Description

IV_XML_DATA

XML data

IV_XDP_LAYOUT

Adobe XDP form template

IV_LOCALE

Locale for rendering the language: language_COUNTRY, for example en_US

IS_OPTIONS

PDF rendering parameters (optional)

Exporting Parameters

Parameter

Description

EV_PDF

PDF rendering result

EV_PAGES

Number of pages

EV_TRACE_STRING

Trace string

Sample Code:


TRY.
*Render PDF
    cl_fp_ads_util=>render_pdf( EXPORTING iv_xml_data      = lv_xml_data
                                          iv_xdp_layout    = lv_xdp
                                          iv_locale        = 'de_DE'
                                          is_options       = ls_options
                                IMPORTING ev_pdf           = ev_pdf
                                          ev_pages         = ev_pages
                                          ev_trace_string  = ev_trace_string
                                          ).

  CATCH cx_fp_ads_util INTO lx_fp_ads_util.
  
ENDTRY.

The RENDER_4_PQ method calls the ADS to render in the print output format required for the target print queue. The support of the Print Definition Language (PDL) print queue format will be taken from print queue properties.

Importing Parameters

Parameter

Description

IV_XML_DATA

XML data

IV_XDP_LAYOUT

Adobe XDP form template

IV_LOCALE

Locale for rendering the language: language_COUNTRY, for example en_US

IV_PQ_NAME

Print Queue name

IS_OPTIONS

PDL rendering parameters (optional)

Exporting Parameters

Parameter

Description

EV_PDL

PDF rendering result

EV_PAGES

Number of pages

EV_TRACE_STRING

Trace string

Sample Code:


TRY.
*Render in Print Queue Format
    cl_fp_ads_util=>render_4_pq( EXPORTING iv_xml_data      = lv_xml_data
                                           iv_xdp_layout    = lv_xdp
                                           iv_locale        = 'en_US'
                                           iv_pq_name       = 'PQ1'
                                           is_options       = ls_options
 
                                 IMPORTING ev_pdf           = ev_pdf
                                           ev_pages         = ev_pages
                                           ev_trace_string  = ev_trace_string
                                           ).

  CATCH cx_fp_ads_util INTO lx_fp_ads_util.

ENDTRY.