public class OpenAnnotateImpl extends java.lang.Object implements IOpenAnnotate
Modifier | Constructor and Description |
---|---|
protected |
OpenAnnotateImpl() |
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.Integer> |
getChildrenPages(PDFBookmark bookmark) |
int |
getPageCount(java.lang.String pdfId,
java.lang.String ticket) |
protected java.util.List<java.lang.Integer> |
parseTargetPages(java.lang.String ticket,
java.lang.String objectId,
java.lang.String targetPages,
long lastModified,
int pageCount,
java.lang.String baseURL)
Get all pages with bookmarks on them to be precached.
|
void |
precacheDocumentPages(java.lang.String ticket,
java.lang.String objectId,
java.lang.String targetPages,
long lastModified,
java.lang.String sourceMimetype,
java.lang.String targetMimetype,
java.lang.Integer resolution,
java.lang.String baseURL)
Performs a transformation of each of the commonly visited pages of a PDF, so that they will be pre-cached when the user views the document.
|
byte[] |
transform(java.lang.String ticket,
java.lang.String objectId,
long lastModified,
java.lang.String sourceMimetype,
java.lang.String targetMimetype,
TransformationOptions options)
Grabs the content of the object represented by the passed in objectId from the repository that matches
the "sourceMimeType" and performs a transformation into the "targetMimeType" given the optional map of arguments.
|
@Cacheable(value="oc-pages", key="{#objectId, #lastModified, #soureMimetype, #targetMimetype, #options?.pageNumber, #options?.pageRange, #options?.resolution, #options?.useOverlays, #options?.imageWidth}") public byte[] transform(java.lang.String ticket, java.lang.String objectId, long lastModified, java.lang.String sourceMimetype, java.lang.String targetMimetype, TransformationOptions options)
IOpenAnnotate
transform
in interface IOpenAnnotate
ticket
- A valid OC ticket.objectId
- The objectId of the object whose content should be transformed.lastModified
- The last modified timestamp of the object being transformed.sourceMimetype
- The mimetype of the content that is being transformed.targetMimetype
- The mimetype that the transformed content should be.options
- The TransformationOptions
to use for transforming the content.public void precacheDocumentPages(java.lang.String ticket, java.lang.String objectId, java.lang.String targetPages, long lastModified, java.lang.String sourceMimetype, java.lang.String targetMimetype, java.lang.Integer resolution, java.lang.String baseURL) throws OCRuntimeException
IOpenAnnotate
precacheDocumentPages
in interface IOpenAnnotate
ticket
- A valid OC ticket.objectId
- The objectId of the object whose content should be transformed.targetPages
- A comma separated list of pages to transform. Each item can be a page number or one of the following special constants:
- "bookmarks" - Transforms the destination page of every document level bookmark.
- "last" - The last page of the document.lastModified
- The last modified timestamp of the object being transformed.sourceMimetype
- The mimetype of the content that is being transformed.targetMimetype
- The mimetype that the transformed content should be.OCRuntimeException
- If an error occurs resizing the content to the requested width.protected java.util.List<java.lang.Integer> parseTargetPages(java.lang.String ticket, java.lang.String objectId, java.lang.String targetPages, long lastModified, int pageCount, java.lang.String baseURL)
targetPages
- public java.util.List<java.lang.Integer> getChildrenPages(PDFBookmark bookmark)
public int getPageCount(java.lang.String pdfId, java.lang.String ticket) throws java.io.IOException
java.io.IOException