Skip to main content


Use the dlex-layout endpoint to create PDF reports from DLEX files created using Designer.

The dlex-layout endpoint creates PDF reports from DLEX files. The endpoint consists of two form field parameters and returns a PDF document.


Refer to dlex-layout in the Client Libraries Users Guide section for this example using the DynamicPDF API's client libraries.


RequestRequest BodyResponse
POSTmultipart/form-dataPDF as a byte-array

The dlex-layout endpoint uses a DLEX file combined with JSON data to create PDF reports. It is an HTTP POST command that submits a form. The form fields consist of the following:

  • DlexPath - the path to the DLEX file in your cloud storage space (access using the File Manager), and
  • LayoutData - the path to the JSON layout data on your local system.
  • Resource - the path to a local DLEX file, and any associated resources.

A DLEX file can be in your cloud storage space or in your local filesystem. If in cloud storage, use DlexPath otherwise use Resource.

-H "Authorization:Bearer"
-F "DlexPath=samples/dlex-layout/SimpleReportWithCoverPage.dlex"
-F "LayoutData=@C:/temp/SimpleReportWithCoverPage.json"
-o simple-report.pdf

Realize you are not limited to LayoutData being a file. An HTTP POST command converts a file into a byte-array and then streams the byte-array to the calling REST endpoint.


All calls to the endpoint must provide the JSON dataset for the DLEX file through the LayoutData parameter. The DLEX file can come from DynamicPDF API cloud storage or from your local file system.

   Follow us on social media for latest news!

If the DLEX comes from DynamicPDF API cloud storage, then any resources embedded in the DLEX must reside on cloud storage. If the DLEX comes from your local system, then any resources embedded in the DLEX must reside on your local sysem.

Form Field
DlexPathstringThe path to the DLEX file in your cloud storage space used to generate PDF.REQUIRED
ResourcefileThe DLEX file on your local system.REQUIRED
ResourcefileA local resource embedded in local DLEX file.
LayoutDatafileThe JSON layout data used with DLEX file to generate PDF.REQUIRED
AuthorizationBearer DP.V9xxxxThe API key.REQUIRED

Run In Postman


The LayoutData is multipart/form-data; to generate layout data dynamically, programmatically call the endpoint.

Example cURL Request

-H "Authorization:Bearer"
-F "DlexPath=simplereport.dlex"
-F "LayoutData=@C:/mylayoutdata.json"
-o simple-report.pdf

Further Information

You can also use one of DynamicPDF's provided client libraries to integrate the endpoints into your client applications if you prefer. For more information, refer to the relevant Users Guide sections: