iText DITO Java API
Every iText DITO workflow starts with the creation of a template, exported to an iText DITO template package. This file will be at the center of the rest of the workflow. You’ll probably want to create output PDFs using the input data, following the output template.
Loading the License Key
Before you can use the SDK, you need to install the license key. iText DITO SDK for Docker users should refer to https://hub.docker.com/r/itext/dito-sdk, but for Java SDK users this is easily managed by using the following commands:
Setting up Proxy for Volume License AWS Calls
The proxy parameters for AWS calls can be configured with the environment variables HTTPS_PROXY(https_proxy) HTTP_PROXY(http_proxy) e.g:
Checking the Remaining Volume on your Subscription
We advise querying your remaining volume frequently and sending a warning message to your own application/system before the limit is reached and stops working.
For customers using the native Java iText DITO SDK you can call getRemainingProducePagesEvents using the API and this function will return the number of pages remaining on your volume license key. If you have a perpetual license, this call will return null.
For iText DITO API for Docker users it is even simpler. Simply call /api/license to display the expirationDate of your license key as well as the remaining volume.
One of the primary functions of iText DITO is the automatic creation of stylish and useful PDFs based on JSON data. If the template package contains an output template, all you need is the PdfProducer class from the com.itextpdf.dito.sdk. output package. Creating a PDF using an output template and JSON data might look like this:
Setting Properties for the PDF Producer
Apart from properties that can be configured in the iText DITO Editor, such as page setup, a number of additional properties con be set on the API level
Sets name to
Target PDF Version
iText DITO supports version 1.7 and 2.0 of the PDF specification.
With encryption properties you can password protect the PDF files iText DITO generates. You can set a user password, an owner password,or both. You can specify protection levels in further detail.
Sets whether it is possible to copy content from PDF when it is opened with user permissions
Sets whether it is possible to edit content in PDF (including annotations) when it is opened with user permissions
Sets owner password from raw bytes
Sets owner password from
Sets whether it is possible to print PDF when it is opened with user permissions
Sets whether it is possible for screen reader to access content in PDF when it is opened with user permissions
Sets user password from raw bytes
Sets user password from
When the pdfProducer class is called, iText DITO reports on it.
public long getPageCount()
public com.itextpdf.dito.sdk.report.ProcessingReport getTemplateRepairReport()Gets the template repair report that for now contains only entries for normalized attributes in template. Note that report created during PDF production in
Returns: template repair report
Gets the PDF production report that contains information indicating potential problems during PDF production and other informative messages. Please note that those messages have different severity levels,