POST
Creates and returns thumbnail images of documents.
The following sample creates thumbnail images of a given document for page 1 and 2.
# Request:
curl --location --request POST 'https://trial.dsserver.io/documentprocessing/document/thumbnails?imageFormat=PNG' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer GphAd1R0npJM9OuX2y9mUa4cfqPMOg6p' \
--data-raw '"eAUBAA4AAAAAAAAAAAAOAAAAVFhUZXh0Q29udHJvbDEAXAEAAA[..]="'
# Result:
[
"JVBERi0xLjQNJeLjz9MNMSAwIG9iago8PAovVH[..]",
"JVBERi0xLjQNJeLjz9MNMSAwIG9iago8PAovVH[..]"
]
Name | Type | Value | Optional |
---|---|---|---|
zoom |
Integer | An Integer value between 1 and 400 to set the percentage zoom factor of the created thumbnail images. Default value is 100. | yes |
from |
Integer | An Integer value that specifies the first page. By default the first page is selected. Default value is 1. | yes |
to |
Integer | An Integer value that specifies the last page. By default the last page is selected. Default value is 0. | yes |
image |
String | A string value that defines the image format of the returned thumbnails. Possible values are "PNG", "JPG", "GIF" and "BMP". Default value is "PNG". | yes |
Type | Value |
---|---|
String | A document encoded as a Base64 string. Supported formats are DOC, DOCX, PDF, TX, XLSX, RTF and HTML. |
Status | Description |
---|---|
200 | On success, the HTTP status code in the response header is 200 (OK). The response body a string array of Base64 encoded images in the selected format. |
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 the image format is not supported. |
400 | A 400 (Bad Request) is returned, if no document has been found in the body. |
400 | A 400 (Bad Request) is returned, if the given page numbers are invalid. |
400 | A 400 (Bad Request) is returned, if the uploaded document is not valid. |