Skip to Content
avatar image
Former Member

How to add Custom Properties to a pdf document created in ABAP ?

We have SAP BASIS 7.31 and Adobe Document Services. Using the code below I can add "Description properties" to a PDF document (by "Description properties" I mean the standard File, Title, Author, Subject and Keywords properties in the "Description" tab of the "Properties" of a pdf document):

* Create PDF Object.
l_pdfobj = l_fp->create_pdf_object( connection = 'ADS' ).

* Set document.
l_pdfobj->set_document( pdfdata = l_pdf ).

* Set metadata.
move: 'this is the Title ' to l_meta-title,
'this is the Subject' to l_meta-subject,
'this is the Author' to l_meta-author.

move ' OrderNumber=17OV1230010' to l_word.
insert l_word into table l_meta-keywords.

move ' SupplierNumber=123456' to l_word.
insert l_word into table l_meta-keywords.

l_pdfobj->set_metadata( metadata = l_meta ).

* Execute, call ADS.
l_pdfobj->execute( ).

* Get result.
l_pdfobj->get_document( importing pdfdata = l_pdf ).

But I can't see any Method that would allow me to add "Custom Properties" to the pdf. That is, I want to add Name/Value pairs that I can see in "Document Properties" on the "Custom" tab, rather than the clumsy workaround approach of adding the Name/Value pairs in the keywords.


Custom property : Name = OrderNumber Value = 17OV1230010

instead of

Keyword : OrderNumber=17OV1230010


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers