11 Making REST Paged Rendition Requests

This section explains how to format an URL to request single page renditions of documents via REST (Representational State Transfer). You can use REST requests to simplify HTML display of a document by allowing the REST URL to be embedded in the SRC attribute of an IMG tag. This is useful for displaying document pages regardless of native application or browser support.

Format the REST URL as shown below, using the parameters described in Table 11-1. Also see the example URLs provided.




Include the parameter name in the same position (before or after) as specified in the REST URL format. For example, the number precedes the parameter name for pct and deg parameters, but follows the name for the page parameter.

REST URL Examples

Example URL Description


Retrieves a JPEG of the 1st page of document ID IPM7_170001


Retrieves a PNG of the 2nd page of a document at 50% scale


Fits the 5th page of a document into a 100-pixel square


Downloads page 5 of a document as a gif


Displays the 1st page of a document rotated 180 degrees


Downloads page 3 of version 2 of a document at 20% of its original height, rotated 270 degrees, with annotations turned off

Table 11-1 REST URL Parameters

Parameters Description


Specify the percent (as an integer) by which to scale the document. For example, 100 keeps the size unchanged, and 50 scales the document to 50% of its original size.


Specify the rotation (in degrees) by which to rotate the document. Available rotations include: 0, 90, 180, and 270.


To crop pages, specify a fit mode for this parameter (FITWIDTH, FITHEIGHT, or FITBEST) and a crop rectangle using the crop parameter. The page will fit the fit mode based on the specified crop dimensions.

(Note that this parameter is ignored if the crop parameter is not specified.)


To crop pages, specify a crop rectangle's dimensions. The page will fit the specified fit mode (FITWIDTH, FITHEIGHT, or FITBEST) based on the specified crop rectangle's dimensions.

Use the format #T#L#H#W, which corresponds to a java.awt.Rectangle's top, left, height, and width properties. For example, for a rectangle where top=10, left=20, height=100, and width=200, specify the following:


(Note that this parameter is ignored if the fit parameter is not specified.)


Specify true to apply annotations to the rendered page, or false to omit them.


Specify the page to display. For example, specify 2 to display the second page of a multi-page TIFF file.

Note that the page is returned to the caller as raw page data. It includes header information that specifies the proper mime type and suggested file name.


If this parameter is included, the client downloads the file in the Open/Save/Cancel browser dialog box, and the rendition is zipped for return to the caller.

If not included, the page is rendered only.


Specify the document version to render.


Specify the document ID to render (provided, for example, by the web interface).


Specify the format in which to render pages. Supported formats include: TIFF, PNG, GIF, and JPEG.