Pages Resource

This resource represents the collection of pages in the PDF document.

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

Get page information for all pages in the document.

Sample Request

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

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 PagesModel (JSON) The Pages.
application/xml Pages (XML)

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

Perform an action on the document's pages. This method can be used to create a new page, apply a text or image stamp, append pages from an attached document or an already uploaded document, or perform OCR. The specific type of action must be provided in the request and some actions (image stamps and appending attached documents) also require a file attachment.

The message body content type is Multipart/Form-Data consisting of a PageAction and a PDF or image file when applicable. The PageAction is one of the following: OCRAction, TextStampAction, ImageStampAction, NewPageAction, RotatePageAction, InsertUploadedPagesAction, or InsertAttachedPagesAction.

Sample Request

 POST http://{host}:{port}/qoppapdf/v1/documents/mydir/mydoc.pdf/pages
 Content-Type: multipart/form-data
 (image file as "file" part)
 (sample JSON as "pageAction" part)
 {
 	"ImageStampAction":{
 		"rotation":15,
 		"transparency":50,
 		"x":100,
 		"y":100,
 		"pageIndex":1
 	}
 }

Request Parameters
name type description default
QSESSIONID cookie The session id n/a
file formdata The associated file. This is required for ImageStampActions and InsertAttachedPagesActions. n/a
fileDisposition formdata n/a
pageAction formdata The PageAction. One of OCRAction, TextStampAction, ImageStampAction, NewPageAction, InsertUploadedPagesAction, InsertAttachedPagesAction, RotatePageAction, PageOrderAction, AddImageAction, AddTextAction, or ReiszePageAction 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 PagesModel (JSON) The Pages.
application/xml Pages (XML)

GET /qoppapdf/v1/documents/{filePath}.pdf/pages/text

This method has been deprecated. Use GET /qoppapdf/v1/documents/{filePath}.pdf/content instead.

Get the text in the PDF document as a String.

Sample Request

GET http://{host}:{port}/qoppapdf/v1/documents/mydir/mydoc.pdf/pages/text

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
text/plain (custom) The text.

DELETE /qoppapdf/v1/documents/{filePath}.pdf/pages/{pageIndex}

Delete the page at the specified index from the document.

Sample Request

DELETE http://{host}:{port}/qoppapdf/v1/documents/mydir/mydoc.pdf/pages/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 path The index of the page to delete. n/a
Response Body
media type data type description
application/json PagesModel (JSON) The Pages.
application/xml Pages (XML)

GET /qoppapdf/v1/documents/{filePath}.pdf/pages/{pageIndex}

Get page information for one page in the document.

Sample Request

GET http://{host}:{port}/qoppapdf/v1/documents/mydir/mydoc.pdf/pages/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 path The index of the page to get. n/a
Response Body
media type data type description
application/json PageModel (JSON) The Page(s).
application/xml Page (XML)

GET /qoppapdf/v1/documents/{filePath}.pdf/pages/{pageIndex}/content

Download the page as HTML(default), SVG, PDF, Text, JPEG, GIF, TIFF, or PNG image. By default the page 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/pages/0/content?dpi=300&quality=.5&attachment=true

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. n/a
filePath path Path to the file to operate on. n/a
pageIndex path Index of the page to download/convert. n/a
attachment query Set to true to download the file as an attachment. false
dpi query The dpi of the resulting image (default is 200). Applies to images only. 200
height query The height of the image. Applies to images only. 0
keepAspect query Flag to indicate whether the resized image should keep its aspect ratio. Applies to images only. false
quality query The quality of the jpeg image. Does not apply to other formats. .8
width query The width of the image. Applies to images only. 0
Response Body
media type data type description
application/pdf (custom) The page as an image.
image/gif (custom)
image/jpeg (custom)
image/png (custom)
image/svg+xml anyType (XML)
image/tiff (custom)
text/html (custom)
text/plain (custom)

GET /qoppapdf/v1/documents/{filePath}.pdf/pages/{pageIndex}/text

Get the text of a single page in the document as a String.

Sample Request

GET http://{host}:{port}/qoppapdf/v1/documents/mydir/mydoc.pdf/pages/text/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 path The index of the page to get text for. n/a
Response Body
media type data type description
text/plain (custom) The text.