Skip to Content
Former Member
Jul 22, 2010 at 10:52 AM

How to get Font's associated with a pdf document.


Hi All,

I am currently working on a project related to Document Management in SAP. For this I have a set of pdf document's that needs to be classified as 'searchable' and 'Non-searchable'. I am planning to identify the document based on Font contents i.e a searchable document has some font associated with it, and non-searchable documents do not have any font associated with it.

I am trying to use the class cl_fp_pdf_object and get the information about font. I see that there is no function which gives me this information directly. Is there any way to get font information of a pdf documents using classes ? or Is there any way to identify directly weather a document is searchable or not ? Please help.

DATA: l_fp TYPE REF TO if_fp,

l_pdfobj TYPE REF TO if_fp_pdf_object.

  • Create PDF Object.

l_pdfobj = l_fp->create_pdf_object( connection = p_dest ).

  • Set document.

l_pdfobj->set_document( pdfdata = l_pdf ).

  • Set task to get metadata.

l_pdfobj->set_task_getmetadata( ).

  • Execute, call ADS.

l_pdfobj->execute( ).