- Home
- Resources
- Document
This resource represents a PDF document.
DELETE /qoppapdf/v1/documents/{filePath}.pdf
Delete the Document.
Sample Request
DELETE http://{host}:{port}/qoppapdf/v1/documents/mydir/mydoc.pdf
Request Parameters
name |
type |
description |
default |
QSESSIONID |
cookie |
The session id |
n/a |
X-Qoppa-DocumentPassword |
header |
The document's password. |
n/a |
filePath |
path |
Path to the file to operate on. |
n/a |
Response Body
media type |
data type |
description |
application/json |
object
(JSON) |
204 on success. |
application/xml |
anyType
(XML) |
GET /qoppapdf/v1/documents/{filePath}.pdf
Get Document Summary Information.
Sample Request
GET http://{host}:{port}/qoppapdf/v1/documents/mydir/mydoc.pdf
Request Parameters
name |
type |
description |
default |
QSESSIONID |
cookie |
The session id |
n/a |
X-Qoppa-DocumentPassword |
header |
The document's password. |
n/a |
filePath |
path |
Path to the file to operate on. |
n/a |
Response Body
media type |
data type |
description |
application/json |
DocumentModel
(JSON) |
The Document Information. |
application/xml |
Document
(XML) |
POST /qoppapdf/v1/documents/{filePath}.pdf
Perform an action on an existing document and save the resulting document to the path specified in the DocumentAction.
This method can be used to copy, linearize, optimize, flatten annotations, flatten form fields, apply redactions, or convert to PDF/A.
Optimize and flatten actions can be further customized by posting an OptimizeAction, FlattenAnnotationsAction, or FlattenFieldsAction.
The message body is a DocumentAction JSON object. The DocumentAction is one of the following:
LinearizeAction, OptimizeAction,
CopyAction, FlattenFieldsAction,
FlattenAnnotationsAction, ApplyRedactionsAction,
or PDFAConvertAction
Sample Request
POST http://{host}:{port}/qoppapdf/v1/documents/mydir/mydoc.pdf
Content-Type: application/json
(sample JSON in message body)
{
"LinearizeAction": {
"savePath": "linearized/mydoc.pdf"
}
}
Request Parameters
name |
type |
description |
default |
QSESSIONID |
cookie |
The session id |
n/a |
X-Qoppa-DocumentPassword |
header |
The document's password. |
n/a |
filePath |
path |
Path to the file to operate on. |
n/a |
PUT /qoppapdf/v1/documents/{filePath}.pdf
Create a new Document, that can be customized with a NewDocumentAction, that will have the specified file name.
If a pdf already exists at that location it will be overwritten. Parent directories will be created if they don't already exist.
The message body is a NewDocumentAction JSON object.
Sample Request
PUT http://{host}:{port}/qoppapdf/v1/documents/mydir/mydoc.pdf
Content-Type: application/json
(sample JSON in message body)
{
"NewDocumentAction": {
"pageWidth" : 612,
"pageHeight" : 792,
"pageCount" : 4
}
}
Request Parameters
name |
type |
description |
default |
QSESSIONID |
cookie |
The session id |
n/a |
X-Qoppa-DocumentPassword |
header |
The document's password. |
n/a |
filePath |
path |
Path to the file to operate on. |
n/a |
PUT /qoppapdf/v1/documents/{filePath}.pdf
Upload a file to create a new Document from a PDF, Word document, Excel spreadsheet, or
image that will have the specified file name. If a pdf already exists at that location it will be overwritten.
Parent directories will be created if they don't already exist.
The message body is a PDF, GIF, JPEG, PNG, TIFF, Doc, DocX, Xlsx, Pptx, or Text file.
Sample Request
PUT http://{host}:{port}/qoppapdf/v1/documents/mydir/mydoc.pdf
(file as message body)
Request Parameters
name |
type |
description |
default |
QSESSIONID |
cookie |
The session id |
n/a |
Content-Type |
header |
|
application/pdf |
X-Qoppa-DocumentPassword |
header |
The document's password. |
n/a |
filePath |
path |
Path to the file to operate on. |
n/a |
dpi |
query |
The resolution of the GIF file. Does not apply to other file
types and will be ignored. |
72 |
Request Body
media type |
data type |
description |
application/msword |
(custom)
|
The file to upload. |
application/pdf |
(custom)
|
application/vnd.openxmlformats-officedocument.presentationml.presentation |
(custom)
|
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet |
(custom)
|
application/vnd.openxmlformats-officedocument.wordprocessingml.document |
(custom)
|
image/gif |
(custom)
|
image/jpeg |
(custom)
|
image/png |
(custom)
|
image/tiff |
(custom)
|
text/plain |
(custom)
|
Response Body
media type |
data type |
description |
application/json |
DocumentModel
(JSON) |
The uploaded Document. |
application/xml |
Document
(XML) |
GET /qoppapdf/v1/documents/{filePath}.pdf/content
Download the PDF document as PDF (default), SVG, HTML(SVG wrapped in HTML), Text, or TIFF file.
By default the document will be returned in the body of the response but can also be downloaded as an attachment.
Sample Request
GET http://{host}:{port}/qoppapdf/v1/documents/mydir/mydoc.pdf/content?dpi=300
Request Parameters
name |
type |
description |
default |
QSESSIONID |
cookie |
The session id |
n/a |
X-Qoppa-DocumentPassword |
header |
The document's password. |
n/a |
accept |
header |
The desired response format. |
application/pdf |
filePath |
path |
Path to the file to operate on. |
n/a |
attachment |
query |
Set to true to download the file as an attachment. |
false |
dpi |
query |
The dpi of the resulting image when downloading as tiff. Only applies to tiff, will be ignored otherwise. |
72 |
Response Body
media type |
data type |
description |
application/pdf |
(custom)
|
The PDF in the requested format. |
image/svg+xml |
anyType
(XML) |
image/tiff |
(custom)
|
text/html |
(custom)
|
text/plain |
(custom)
|