POST
Creates a PDF document from an input document.
The following example creates a new PDF document from a document in the internal format.
# Request:
curl --location --request POST 'https://trial.dsserver.io/documentprocessing/pdf/create?returnFormat=PDF' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer fePFHv8OtIyRSCAdOnn7USc9kKdYB2rg' \
--data-raw '{
"DocumentData": "eAUBAA4AAAAAAAAAAA[..]="
}'
# Result:
"JVBERi0xLjQNJ[..]"
Name | Type | Value | Optional |
---|---|---|---|
return |
String | A string that specifies the format of the created document. Possible values are: "PDF", "PDFA". Default value is "PDF". | yes |
Type | Value |
---|---|
PDFCreation |
The PDFCreation |
Name | Type | Value | Optional |
---|---|---|---|
document |
String[] | String array that contains keywords that will be added to the PDF document meta information. | yes |
document |
String[] | String array that contains Java |
yes |
image |
int | Specifies the compression quality of images between 1-100. | yes |
master |
String | Specified the master password. | yes |
digital |
Digital |
Specified the digital signature that will be used to sign the document. | yes |
embedded |
Embedded |
Specifies an array of embedded files that are embedded into the document. | yes |
document |
Document |
Specifies access permissions for the document. | yes |
document |
String | Document that will be converted to PDF encoded as Base64 string. | no |
author | String | Sets the document's author. | yes |
creation |
Date |
Sets the document's creation date which will be saved in the document. | yes |
last |
Date |
Sets the date the document is last modified. | yes |
creator |
String | Sets the application, which has created the document. | yes |
document |
String | Sets the document's subject string which will be saved in the document. PDF limitation: The length is limited to 2000 characters. | yes |
document |
String | Sets the document's title that will be saved in the document. PDF limitation: The length is limited to 2000 characters. | yes |
user |
String | Specifies the password for the user to open the document. | yes |
culture | String | Specifies the culture for the merge process for date and currency values. It must be the Language Culture Name that can be found in this list. For French use "fr-FR", for German "de-DE". Default value is "en-US". | yes |
Name | Type | Value | Optional |
---|---|---|---|
x509Certificate2 | String | The actual certificate in a X509 format. | no |
password | String | The password for the given certificate. | no |
time |
String | An URL for a time server. | yes |
Name | Type | Value | Optional |
---|---|---|---|
creation |
Long | Specifies the date of the creation (UNIX EPOCH time). | yes |
data | String | Specifies the data of the embedded file. | yes |
data |
String | Specifies the type of the data. | yes |
description | String | Specifies the description of the embedded file. | yes |
file |
String | Specifies the file name of the embedded file. | yes |
last |
Long | Specifies the last modification date (UNIX EPOCH time). | yes |
MIMEType | String | Specifies the MIME type of the embedded file (for example: "application/pdf"). | yes |
relationship | String | Specifies the relationship string of the embedded file. | yes |
metadata | String | Specifies meta data for the embedded file. | yes |
Name | Type | Value | Optional |
---|---|---|---|
None = 0 | Enum | Allows none of the possible permissions. | yes |
Allow |
Enum | Allows authoring comments and fill in interactive form fields (including signature fields). | yes |
Allow |
Enum | Fill-in existing interactive form fields (including signature fields) is allowed. | yes |
Allow |
Enum | Allows content access for the visually impaired only. | yes |
Allow |
Enum | Allows to assemble the document (insert, rotate or delete pages and create bookmarks or thumbnails). | yes |
Allow |
Enum | Copying or otherwise extracting text and/or graphics is allowed. | yes |
Allow |
Enum | Allows modifying the document's contents. | yes |
Allow |
Enum | Printing the document is fully allowed. | yes |
Allow |
Enum | Printing the document is allowed (low-level). | yes |
Allow |
Enum | Allows all of the possible permissions. | yes |
Status | Description |
---|---|
200 | On success, the HTTP status code in the response header is 200 (OK). The response body contains the resulting document encoded as a Base64 encoded string. |
Status | Description |
---|---|
401 | A 401 (Unauthorized) is returned, if the user is not authorized. |
400 | A 400 (Bad Request) is returned, if DS Server is not licensed or the license is invalid. |
400 | A 400 (Bad Request) is returned, if no data is found in the PDFCreation |
400 | A 400 (Bad Request) is returned, if no documents were found in the PDFCreation |
400 | A 400 (Bad Request) is returned, if the uploaded document is not valid. |