Skip to Content

With CE 7.20 the PDF Document API is published and officially available (PDF Document API). You can now use it outside the WebDynpro framework.

In Part I I will explain the basics of the “SAP Interactive Forms by Adobe” solution. Part II shows how to create a dynamic PDF form and Part III will explain the retrieval of the user-entered data from a PDF form.

Some Basics

SAP has integrated two technology components from Adobe into SAP Netweaver Application Server

  1. Adobe LiveCycle Designer is a graphical layout tool for creating forms in an easy-to-use, drag-and-drop manner.
  2. Adobe document services (ADS) are a set of runtime services deployed on the Application Server. They allow you to create and manipulate PDF forms as well as extract user-entered data from the interactive PDF form.

The PDF API allows you to

  • Create documents using a template (layout) and data. Template + data = PDF.
  • Add attachments to documents
  • Change the document appearance (hide menu bars, magnification)
  • Digitally sign the document using a private key
  • Change the dynamic mode of the document
  • Extract data in XML form from an existing document

Conceptually, a PDF is composed of a template (created with the LiveCycle Designer and saved as XDP file), which controls the form layout, and XML data, which is typically obtained from a backend system, generated at render time, or entered by the user.

 

image

Setup of the ADS

Since I want to concentrate on the development side, I will only give you some hints on how to install and configure the ADS. General documentation can be found here: Adobe Document Services Configuration Guide.

The following things have to be done:

  1. You must have installed ADS on the CE Server. 
  2. Create a ADS user for basic authentication (Documentation).
  3. Setting up Basic Authentication (Documentation).
  4. Setting up Reader Rights Credentials (Documentation).

PDF API explained a little bit

To use the PDF API you must have a build-time dependency to the DC (Development Component) tc/pdf/object.

The entry point of using the API is the factory class PDFDocumentFactory. This class has only one static method getDocumentHandler() and returns an instance of the interface IPDFDocumentHandler.

This interface is responsible for handing out an appropriate type of context. A context can then be used to carry out the desired action. For example, a “creation context” (interface IPDFCreationContext) can be used to create a PDF document or an “accessible context” (interface IPDFAccessibleContext) is used to work with existing PDF documents.

 

Another interesting concept in the PDF API are Job Profiles. When creating a PDF document you can set various parameters like print options, permissions, layout settings etc.

You can of course set all parameters in your code, but if you want to change them, you must change the sourceode which is not preferable. A better way is to define the name of a Job Profile via API in your code (using method applyJobProfile(String name) of IPDFCreationContext). The Job Profile has to be made available on the server and can be customized using NWA. For more information look at this SAP Interactive Forms by Adobe – Job Profiles:

In Part II we will create a PDF Form using the API.

To report this post you need to login first.

7 Comments

You must be Logged on to comment or reply to a post.

  1. Jian Liao
    Hi Raphael,
    Very interesting blog! As I know, ADS is a SLSB deployed into AS Java.
    1. Is SAP PDF Document API is making in VM invocation?
    2. Can it support remote ADS invocation? For example: Servlet and ADS reside in different AS Java.

    I would like to know more about SAP PDF Document API, any pointer?

    Thanks,
    -Jian

    (0) 
    1. Raphael Vogel Post author
      Hi Jian
      The ADS can of course be on a remote server. A dedicated PDF server could make sense in the case of performance issues.
      AFAIK the PDF API does a WS call to the ADS.
      (0) 
      1. Jian Liao
        But if Servlet and ADS SLSB is reside in the same AS Java instance. The In-VM invocation could highly increase performance. Could it be configurable?
        (0) 
  2. Martin Bäuml
    Hi,

    your provided link to the “Adobe Document Services Configuration Guide” do not work.

    I can not found any other documentation for CE72!?!!

    May you help?

    Regards

    (0) 

Leave a Reply