Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

API to get the pdf attributes like no of pages,size etc

Avatar

Level 2

Hi,

1.Which livecycle ES2 API (webservice) should I use for getting the pdf attributes like no of pages in a pdf document,size etc.The PDFUtility service gives other info such as author etc

2.Also, is there a way I can position an image in a pdf document using livecycle API's.This is to put  a barcode image in different locations in a document.Which API should I use.

3.How can I get the form field counts in a pdf document using livecycle?Also , is it possible to modify the values of the pdf form elements through livecyce API's?

4 Replies

Avatar

Former Community Member

I use Invoke DDX operation of the AssemblerService.

For my DDX I use the following.

<DDX xmlns="http://ns.adobe.com/DDX/1.0/">

  <PDF result="result.pdf">

    <PDF source="inDoc" />

  </PDF>

  <DocumentInformation source="result.pdf" result="doc_info.xml" />

</DDX>

The output of the Invoke DDX is an AssemblerResult variable.

You can then use a SetValue to pick out the juicy parts.  To get the number of pages, I do

/process_data/result/object/documents, which I assign to a map variable

/process_data/map[@id="doc_info.xml"], which I assign to an xml variable

/process_data/xml//DocInfo/NumPages, which I assign to a int variable

Avatar

Level 2

Thank you,but how to insert an image to  pdf progammetically..through API

Avatar

Former Community Member

I don't know.  Never tried to do that.  I would look in the DDX language for answers.