Annotations Resource

This resource represents the annotations in the PDF document.

DELETE /qoppapdf/v1/documents/{filePath}.pdf/annotations

Delete all annotations in the document or filter by page index.

Sample Request

DELETE http://{host}:{port}/qoppapdf/v1/documents/mydir/mydoc.pdf/annotations?pageIndex=0

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
pageIndex query The index of the page to delete Annotations from. n/a
Response Body
media type data type description
application/json AnnotationsModel (JSON) A List of Annotations in the document.
application/xml Annotations (XML)

GET /qoppapdf/v1/documents/{filePath}.pdf/annotations

Get all Annotations in the Document or filter by the page index.

Sample Request

GET http://{host}:{port}/qoppapdf/v1/documents/mydir/mydoc.pdf/annotations?pageIndex=0

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
pageIndex query Optional. The index of the page to get Annotations from. n/a
subtype query Optional. The subtype of annotations to retrieve. One of: Text, Link, FreeText, Line, Square, Circle, Polygon, PolyLine, Highlight, Underline, Squiggly, StrikeOut, Caret, Stamp, Ink, Popup, FileAttachment, Sound, Movie, Screen, Widget, PrinterMark, TrapNet, Watermark, 3D, Redact, Projection, RichMedia. (Case insensitive). n/a
Response Body
media type data type description
application/json AnnotationsModel (JSON) A List of Annotations in the document.
application/xml Annotations (XML)

POST /qoppapdf/v1/documents/{filePath}.pdf/annotations

Import annotations from an xfdf or fdf file. This endpoint will be removed in future versions, use /qoppapdf/v1/documents/{filePath}.pdf/annotations/content instead.

The message body is an FDF or XFDF file.

Sample Request

 POST http://{host}:{port}/qoppapdf/v1/documents/mydir/mydoc.pdf/annotations/content
 Content-Type: application/vnd.adobe.xfdf
 (xfdf or fdf file as message body)

Request Parameters
name type description default
QSESSIONID cookie The session id n/a
X-Qoppa-DocumentPassword header The document's password. n/a
content-type header The media type of the resource. application/vnd.adobe.xfdf
filePath path Path to the file to operate on. n/a
Request Body
media type data type description
application/vnd.adobe.xfdf (custom) The file to import.
application/vnd.fdf (custom)
Response Body
media type data type description
application/json AnnotationsModel (JSON) A List of Annotations.
application/xml Annotations (XML)

POST /qoppapdf/v1/documents/{filePath}.pdf/annotations

Add a new annotation to the document. Currently only FileAttachment annotations are supported.

Sample Request

POST http://{host}:{port}/qoppapdf/v1/documents/mydir/mydoc.pdf/annotations

Request Parameters
name type description default
QSESSIONID cookie The session id n/a
annotation formdata The file attachment annotation. This must include the subtype and can include the rectangle and pageIndex. The annotation will be placed in the upper left corner of the first page by default. n/a
file formdata The file to attach. n/a
fileDisposition formdata Information about the file to attach. n/a
X-Qoppa-DocumentPassword header The document's password. n/a
filePath path Path to the file to operate on. n/a
Request Body
media type data type
multipart/form-data (custom)
Response Body
media type data type description
application/json AttachmentAnnotationModel (JSON) Information about the newly added attachment.
application/xml AttachmentAnnotation (XML)

GET /qoppapdf/v1/documents/{filePath}.pdf/annotations/content

Export annotations to an XFDF (default) or FDF file. By default the annotations 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/annotations/content

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/vnd.adobe.xfdf
filePath path Path to the file to operate on. n/a
attachment query Set to true to download the file as an attachment. false
Response Body
media type data type description
application/vnd.adobe.xfdf (custom) The fdf or xfdf file.
application/vnd.fdf (custom)

POST /qoppapdf/v1/documents/{filePath}.pdf/annotations/content

Import annotations from an xfdf or fdf file. This does not clear the document's current annotations. It adds new annotations, or updates existing annotations matched by name.

The message body is an FDF or XFDF file.

Sample Request

 POST http://{host}:{port}/qoppapdf/v1/documents/mydir/mydoc.pdf/annotations/content
 Content-Type: application/vnd.adobe.xfdf
 (xfdf or fdf file as message body)

Request Parameters
name type description default
QSESSIONID cookie The session id n/a
X-Qoppa-DocumentPassword header The document's password. n/a
content-type header The media type of the resource. application/vnd.adobe.xfdf
filePath path Path to the file to operate on. n/a
Request Body
media type data type description
application/vnd.adobe.xfdf (custom) The file to import.
application/vnd.fdf (custom)
Response Body
media type data type description
application/json AnnotationsModel (JSON) A List of Annotations.
application/xml Annotations (XML)

POST /qoppapdf/v1/documents/{filePath}.pdf/annotations/redaction

Creates redaction annotations for all text in the document that matches the search term.

Sample Request

 POST http://{host}:{port}/qoppapdf/v1/documents/mydir/mydoc.pdf/annotations/redaction
 Content-Type: application/json
 (sample JSON in message body)
 {
   "searchText": "text to redact"
 }

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
Request Body
media type data type description
application/json RedactionModel (JSON) The json model that specifies the text to redact and the properties of the redaction annotation.
application/xml Redaction (XML)
Response Body
media type data type description
application/json RedactionModel (JSON)
application/xml Redaction (XML)

DELETE /qoppapdf/v1/documents/{filePath}.pdf/annotations/{name}

Delete an annotation from the document.

Sample Request

DELETE http://{host}:{port}/qoppapdf/v1/documents/mydir/mydoc.pdf/annotations/{name}

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
name path The name of the annotation to delete. 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/annotations/{name}

Get a single annotation by name.

Sample Request

GET http://{host}:{port}/qoppapdf/v1/documents/mydir/mydoc.pdf/annotations/{name}

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
name path The name of the annotation (corresponds to the NM entry in the annotation dictionary). n/a
Response Body
media type data type description
application/json AnnotationModel (JSON) The annotation information.
application/xml Annotation (XML)

GET /qoppapdf/v1/documents/{filePath}.pdf/annotations/{name}/attachment

Get the attachment of a FileAttachment annotation.

Sample Request

GET http://{host}:{port}/qoppapdf/v1/documents/mydir/mydoc.pdf/annotations/{name}/attachment

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
name path The name of the attachment annotation. n/a
Response Body
media type data type description
application/json AttachmentModel (JSON) The file attachment in the body of the response or as an attachment.
application/xml Attachment (XML)

GET /qoppapdf/v1/documents/{filePath}.pdf/annotations/{name}/attachment/content

Download the attachment of a FileAttachment annotation. By default the attachment will be returned in the body of the response but can also be downloaded as a file attachment.

Sample Request

GET http://{host}:{port}/qoppapdf/v1/documents/mydir/mydoc.pdf/annotations/{name}/attachment/content

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 accept header. Optional. Should match the mimetype of the attachment if specified. n/a
filePath path Path to the file to operate on. n/a
name path The name of the attachment annotation to download. n/a
attachment query Set to true to download as an attachment, otherwise the attachment will be the body of the response. false
Response Body
media type data type description
application/json object (JSON) The file attachment in the body of the response or as an attachment.
application/xml anyType (XML)