Skip to main content

Overview


The DynamicPDF API has several client libraries designed to make integrating the REST endpoints into your application much easier.

The DynamicPDF API has several client libraries designed to make integrating the REST endpoints into your application much easier. Depending upon your development environment, rather than developing your client application from scratch, consider using one of our client libraries to simplify your organization's development.

info

All resources are contained in the samples/users-guide-samples in your Resource Explorer. Some of these files you may need to download to use. See Sample Resources for instructions on adding sample resources.

Languages

  • C#
  • Go
  • Java
  • Node.js
  • PHP
  • Python

Libraries

Access the libraries from the DynamicPDF API github project at https://github.com/dynamicpdf-api. The client library for each respective language is also available for incorporation into your project via Nuget, Maven, npm, PIP, or Composer.

info

Note that most the client libraries also contain a test folder containing more examples illustrating using the relevant client api.

APIGitHub LocationSample AppsLibrary
C#https://github.com/dynamicpdf-api/dotnet-clienthttps://github.com/dynamicpdf-api/dotnet-client-examplesNuget: https://www.nuget.org/packages/DynamicPDF.API
Gohttps://github.com/dynamicpdf-api/go-clienthttps://github.com/dynamicpdf-api/go-client-examplespkg.go.ddev: https://pkg.go.dev/github.com/dynamicpdf-api/go-client/v2
Javahttps://github.com/dynamicpdf-api/java-clienthttps://github.com/dynamicpdf-api/java-client-examplesMaven: https://repo1.maven.org/maven2/com/dynamicpdf/api/dynamicpdf-api/0.9.0/ Groovy etc: https://search.maven.org/artifact/com.dynamicpdf.api/dynamicpdf-api/0.9.0/jar
Node.jshttps://github.com/dynamicpdf-api/nodejs-clienthttps://github.com/dynamicpdf-api/nodejs-client-examplesnpm: https://www.npmjs.com/package/@dynamicpdf/api
PHPhttps://github.com/dynamicpdf-api/php-clienthttps://github.com/dynamicpdf-api/php-client-examplesComposer: https://packagist.org/packages/dynamicpdf/api
Pythonhttps://github.com/dynamicpdf-api/python-clienthttps://github.com/dynamicpdf-api/python-client-examplesPython Package Index: https://pypi.org/project/dynamicpdf-api/

The following client libraries also have a test framework containing numerous examples illustrating how to use the API.

CLIENT LIBRARYTEST cASES
C#https://github.com/dynamicpdf-api/dotnet-client/tree/main/TestFramework
Javahttps://github.com/dynamicpdf-api/java-client/tree/main/src/test
Node.jshttps://github.com/dynamicpdf-api/nodejs-client/tree/main/test
Pythonhttps://github.com/dynamicpdf-api/python-client/tree/main/test
tip

Refer to each client library's readme.md file on GitHub for documentation on the library.

LibraryInstallation
C#Available on NuGet: Install-Package DynamicPDF.API
GoAvailable as a Go package: go get github.com/dynamicpdf-api/go-client
JavaAvailable on Maven: <dependency><groupId>com.dynamicpdf.api</groupId><artifactId>dynamicpdf-api</artifactId><version>1.10.1</version></dependency>
Node.jsAvailable on NPM: npm i @dynamicpdf/api
PHPAvailable using Composer: composer require dynamicpdf/api
PythonAvailable using PIP: pip install dynamicpdf-api

Underlying REST Client

Each client library uses an underlying REST client library.

Client LibraryUnderlying REST ClientVendor URL
C#RestSharphttps://restsharp.dev/
JavaREST-assuredREST-assured https://rest-assured.io/
Node.jsHTTP Modulenode.js built-in HTTP module (https://nodejs.dev/learn/the-nodejs-http-module)
PHPcURLhttps://curl.se/
PythonRequests HTTP Libraryhttps://docs.python-requests.org/en/latest/
info

The Endpoint class is the parent to all other endpoint related classes. If you need to use a different REST client, you can modify the Endpoint class. However, the REST clients chosen by DynamicPDF API are all industry standard and robust.

General Processing Steps

When calling an endpoint using one of the client libraries, follow these steps to integrate the library with your application.

  • First, create an instance of the resource from your local system.
  • Next, create a new endpoint instance where you pass the resource from your local system.
  • Set the instance's base URL and API key.
  • After creating the endpoint instance, call its process method which calls the REST endpoint and returns the JSON response (or XML if the endpoint is PdfXmp).

Refer to the following Users Guide topic (Users Guide - Workflow) for more explanation describing the general workflow for using one of the DynamicPDF API Endpoints.

Endpoints

The following table lists the endpoint's associated class and constructor arguments. Note that the class names are consistent between client libraries. Also note that all endpoints, with the exception of DlexLayout, use a resource from your local system.

EndpointEndpoint's Class NameConstructor ArgumentsReturnsDescription
image-infoImageInfoImageResourceJSONUploads an image from local system and returns JSON document describing image.
dlex-layoutDlexLayoutString cloudDlexPath, LayoutDataResource resourcePDFUses a dlex file on cloud and local layout data (JSON dataset) and constructs a PDF.
pdf-infoPdfInfoPdfResourceJSONUpload a PDF from local system and return the PDF's metadata as JSON document.
pdf-textPdfTextPdfResourceJSONUpload a PDF from local system and return the PDF's text as a JSON document.
pdf-xmpPdfXmpPdfResourceXMLUpload a PDF from local system and return the PDF's XMP data as XML document.
pdfPdf---PDFReturns a PDF. Refer to the Users Guide page on Instructions.
info

Only the dlex-layout endpoint takes a resource from the cloud (the DLEX file). All other endpoints use resources from local system. Also be certain any embedded resources for the DLEX are also on the cloud. The pdf endpoint is discussed in instructions Users Guide page (Instructions).

Client Library

Complete documentation for each of the endpoints using the available client libraries is available via one of the following Users Guide pages.

EndpointUsers Guide Page
dlex-layoutdlex-layout
image-infoimage-info
pdfpdf
pdf-infopdf-info
pdf-textpdf-text
pdf-xmppdf-xmp
tip

Be certain to refer to the endpoint's documentation. Each has a complete example in all five language that illustrate using the respective client library with the endpoint.

Run In Postman

   Follow us on social media for latest news!