PDF/A is a standard format for long-term archiving of documents and is based on Adobe PDF format version 1.4. A PDF in PDF/A format is not interactive, does not contain scripting, and its fonts are embedded.
The installed Adobe Document Services provide this functionality. ADS supports this service as of SAP NetWeaver AS for Java 7.20. Before you select the PDF/A-1 option, you must check whether the installed Adobe Document Services provide this functionality. To do this, use the ABAP class CL_FP_FEATURE_TEST, attribute GC_RENDER_PDFA1.
For more information, see the SDN blog https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/14106.
Call this test before you call the function module FP_JOB_OPEN, as follows:
TRY. IF cl_fp_feature_test=>is_available( iv_feature = cl_fp_feature_test=>gc_render_pdfa1 ) = abap_true. * PDF/A-1 can be generated ELSE. * PDF/A-1 can not be generated ENDIF. CATCH cx_fp_runtime. * Add error handling ENDTRY.
Only if the is_available method returns the value abap_true can you activate PDF/A generation when calling function module FP_JOB_OPEN. If you are using an ADS connection other than "ADS", you must enter this information in the is_available method in parameter iv_connection.
Activating PDF/A Generation in the Print Program
You can define the PDF standard for the generation of PDF documents. The parameter IE_OUTPUTPARAMS (structure SFPOUTPUTPARAMS) of function module FP_JOB_OPEN has a field PDFNORM.
Open the function module FP_JOB_OPEN (function group FPCALL).
Select parameter IE_OUTPUTPARAMS.
The possible fixed values are defined in the assigned domain FPPDFNORM and are made available by the static attributes of interface IF_FP_PDF_NORM.
Interface Attribute |
Value |
---|---|
IF_FP_PDF_NORM=>PDF_A1 |
PDF/A-1 |
IF_FP_PDF_NORM=>PDF |
|
IF_FP_PDF_NORM=>DEFAULT |
System default |
Activating PDF/A Generation for Archiving Using a BAdI
For "Archiving" and "Printing and Archiving" scenarios, you can also activate the PDF/A generation by using a BAdI. The relevant enhancement spot and BAdI definition are called FP_EXTENSION_PDF_GENERATION.
The interface IF_BADI_FP_EXT_PDF_GENERATION provides the method SET_PDF_NORM_FOR_ARCHIVING.
For more information, see the technical documentation about the BAdI (make sure you read the link to the feature test).