public class XFDFUtil
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
XFDFUtil.unsupportedAnnotationTypes |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ATTR_NEXT_NUMBER |
static java.lang.String |
ATTR_OBJECT_ID |
static java.lang.String |
ATTR_OBJECT_TYPE_NAME |
static java.lang.String |
ATTR_PREFIX |
static java.lang.String |
ATTR_SUFFIX |
static java.lang.String |
BR_CLOSING_TAG
A close tag
|
static java.lang.String |
BR_TAG
A
tag |
static java.lang.String |
BREAK_TAG_ELEMENT_STRING
The string for br tag elements
|
static double |
CARET_GROWTH_RATE
The rate at which the caret annotation grows when downloaded from OA due to an IText bug.
|
static java.lang.String |
CLOSE_SPAN
A tag closing a span
|
static java.lang.String |
CLOSING_P_TAG
A tag closing a
|
static java.lang.String |
CONTROLLED_PRINT_AUDIT |
static java.lang.String |
CONTROLLED_PRINT_AUTONUMBER |
static java.lang.String |
CONTROLLED_PRINT_OBJECT_TYPE |
static java.lang.String |
currentDateKey |
static java.lang.String |
DATE_FORMAT_STRING
Date Format for parsing XFDF dates
|
static java.lang.String |
DUMMY_DEFAULT_APPEARANCE
Dummy string variable for the defaultappearance attribute of freetext annotations
|
static java.lang.String |
DUMMY_DEFAULT_STYLE
Dummy string variable for the defaultstyle attribute of freetext annotations
|
static java.lang.String |
DUMMY_SPAN_STYLE
Dummy string variable for the style attribute of each span that gets created for a text box annotation.
|
static java.lang.String |
EMPTY_XFDF
An empty XFDF string.
|
static java.lang.String |
ENCODING_PREFIX
The encoding prefix used when decoding dynamic stamps.
|
static java.lang.String |
END_STATUS_XFDF_CONTENTS_RICHTEXT
XFDF end tags for a status' content.
|
static java.lang.String |
END_XFDF_CONTENTS_RICHTEXT
XFDF end tags for content.
|
static java.lang.String |
EXTENSION_XFDF
The file extension for an XFDF file.
|
static java.lang.String |
FAILED_USERNAMES |
static java.lang.String |
IT_FREETEXT_CALLOUT
The IT value for a callout annotation.
|
static org.jdom.Namespace |
NAMESPACE_XFDF
The XFDF namespace.
|
static org.jdom.Namespace |
NAMESPACE_XHTML
The XHTML namespace.
|
static java.lang.String |
NUM_CHECKED_IN_ANNOTS |
static com.itextpdf.text.pdf.PdfName |
PDFNAME_CL
CL stands for Callout.
|
static com.itextpdf.text.pdf.PdfName |
PDFNAME_COMMENT
Comment is a type of PdfName.NAME, which is the symbol for the annotation.
|
static com.itextpdf.text.pdf.PdfName |
PDFNAME_DS
DS stands for default style
|
static com.itextpdf.text.pdf.PdfName |
PDFNAME_GROUP
Group is a type of reply.
|
static com.itextpdf.text.pdf.PdfName |
PDFNAME_ICON
Icon corresponds to the Name key
|
static com.itextpdf.text.pdf.PdfName |
PDFNAME_IT
IT stands for intention.
|
static com.itextpdf.text.pdf.PdfName |
PDFNAME_LE
LE stands for the line end of the head.
|
static com.itextpdf.text.pdf.PdfName |
PDFNAME_REPLACE
Replace is a type of Intention.
|
static com.itextpdf.text.pdf.PdfName |
PDFNAME_STATEMODEL
StateModel values are Marked and Review.
|
static com.itextpdf.text.pdf.PdfName |
PDFNAME_STRIKE_OUT_TEXT_EDIT
StrikeOutTextEdit is a type of Intention.
|
static com.itextpdf.text.pdf.PdfName |
PDFNAME_SUBJ
Subject is the short description of the subject being addressed by the annotation.
|
static java.lang.String |
REPLY_FLAGS_STRING
The flags attribute needs to saved on statuses for PAS compatibility.
|
static java.lang.String |
START_STATUS_XFDF_CONTENTS_RICHTEXT
XFDF body tag start for saving a status' content.
|
static java.lang.String |
START_TAG_XFDF_CONTENTS_RICHTEXT
XFDF body tag start for parsing content.
|
static java.lang.String |
START_XFDF_CONTENTS_RICHTEXT
XFDF body tag start for saving content.
|
static java.lang.String |
TYPE_ACCEPT_STAMP
The type for an Accept stamp
|
static java.lang.String |
TYPE_APPROVED_STAMP
The type for a stamp
|
static java.lang.String |
TYPE_CALLOUT
The type for a callout annotation.
|
static java.lang.String |
TYPE_CARET
The type for a caret annotation (also know as an "Insert Text at Placeholder" annotation).
|
static java.lang.String |
TYPE_ELLIPSE
The type for an oval annotation.
|
static java.lang.String |
TYPE_FILE_ATTACHMENT
The type for a fileattachment annotation.
|
static java.lang.String |
TYPE_FREEDRAW
The type for a freedraw annotation.
|
static java.lang.String |
TYPE_FREETEXT
The type for a freetext annotation.
|
static java.lang.String |
TYPE_HIGHLIGHT
The type for a highlight annotation.
|
static java.lang.String |
TYPE_LINE
The type for a line or arrow annotation.
|
static java.lang.String |
TYPE_PAGESIZEDCHECKMARK_STAMP
The type for a Page Sized Checkmark stamp
|
static java.lang.String |
TYPE_RECTANGLE
The type for a rectangle annotation.
|
static java.lang.String |
TYPE_REJECT_STAMP
The type for a Reject stamp
|
static java.lang.String |
TYPE_REPLACEMENT_TEXT
The type for a special caret annotation (also know as an "Replacement Text at Placeholder" annotation).
|
static java.lang.String |
TYPE_REPLY
The type for a reply annotation.
|
static java.lang.String |
TYPE_REVIEWED_STAMP
The type for a Reviewed stamp
|
static java.lang.String |
TYPE_STATUS
The type for a status annotation.
|
static java.lang.String |
TYPE_STICKY_NOTE
The type for a sticky note annotation.
|
static java.lang.String |
TYPE_STRIKEOUT
The type for a strikeout annotation.
|
static java.lang.String |
TYPE_UNDERLINE
The type for an underline annotation.
|
static java.lang.String[] |
VALID_ANNOTATIONS
The list of all valid annotation types.
|
static java.lang.String |
XML_VERSION
The version of XML being used to write our XFDF.
|
Constructor and Description |
---|
XFDFUtil() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
buildRichTextSpan(java.lang.Boolean isItalic,
java.lang.Boolean isBold,
java.lang.Boolean isUnderline,
java.lang.String color)
Builds our rich text styling from the html styling from OA
|
static void |
burnInAnnotations(com.itextpdf.text.pdf.PdfReader pdfReader,
com.itextpdf.text.pdf.PdfStamper stamper,
java.lang.String objectId,
java.util.List<Annotation> annotations,
java.lang.String userDisplayName,
boolean forOfflineAnnotation,
java.lang.String ticket,
long lastModified)
Burns the provided annotations into the supplied PDF document.
|
static java.lang.String |
computeAnnotationConfigPlaceholder(java.lang.String ticket,
java.lang.String param,
java.lang.String objectId,
java.lang.String displayName)
Takes an individual parameter and returns the value associated with it using supportedAnnotationNameParms enum
|
static void |
controlledPrintOverlay(java.lang.String ticket,
java.lang.String objectId)
Deprecated.
|
static java.lang.String |
escapeXFDF(java.lang.String original)
Utility method to escape an XFDF string by converting
tags to their escaped values. |
static java.lang.String |
executeRegexMatching(java.lang.String contentString,
java.lang.String regexPattern)
Saves a provided annotation at the end of a supplied XFDF document (in the "annots" element).
|
static java.util.List<Annotation> |
filterAnnotationsByFlag(int flagBit,
java.util.List<Annotation> annotations)
Filters out annotations that have a designated bit set to true
|
static java.util.List<Annotation> |
filterAnnotationsByUser(java.lang.String userDisplayName,
java.util.List<Annotation> annotations)
Filters out annotations not associated with current user
|
static com.aspose.pdf.Document |
flattenPDFPortfolio(com.aspose.pdf.Document pdfPortfolio,
DocumentInfo documentInfo)
Loops through each of the embedded files in a PDF Portfolio and puts all the content into a single PDF document
Currently only handles embedded pdfs.
|
static java.util.List<Annotation> |
flattenReplies(java.util.List<Annotation> annotations)
Flattens any reply chains that exist amongst reply-type annotations to a maximum of: .
|
static java.util.List<java.lang.String> |
getAnnotatableTypesByViewer(AnnotationConfig config,
java.lang.String viewer)
Gets a filtered list of content extensions that use the a certain viewer.
|
static int |
getAnnotationCount(org.jdom.Document xfdfDoc)
Return how many annotations are in the parameterized xfdfDoc.
|
protected static java.lang.String |
getAutonumberObjectId(java.lang.String ticket,
java.lang.String objectTypeName)
Gets the object ID of the Autonumber object for the given page set name
|
static java.lang.String |
getNextAutoNumber(java.lang.String ticket,
java.lang.String objectTypeName) |
static DocumentInfo |
getPdfDocumentInfo(java.lang.String ticket,
java.lang.String objectId,
java.lang.String mimetype,
java.lang.Integer docSizeLoadLimitBytes,
java.lang.String[] fileExtensions,
long lastModified)
Gets and populates the documentInfo object for a given PDF object.
|
static Page[] |
getPDFPageDimensions(java.lang.String ticket,
java.lang.String objectId,
com.aspose.pdf.Document pdfDocument,
java.lang.String mimetype)
Determines the height and width of pages in a PDF
|
static java.util.HashMap<java.lang.String,Annotation> |
getRepoAnnotationsAsHashmap(java.util.List<Annotation> annotations)
Takes the repo annotations array and converts it to a hashmap
|
static java.util.HashMap<java.lang.String,Annotation> |
getRepoReplyTypeAnnots(java.util.HashMap<java.lang.String,Annotation> repoAnnots)
Finds all the reply type annotations in the repo annotation map
|
static DocumentInfo |
getVideoDocumentInfo(java.lang.String ticket,
java.lang.String objectId,
long size)
Gets and populates the documentInfo object for a given PDF object.
|
static Annotation |
handleFreetextProperties(java.lang.String defaultAppearanceString,
java.lang.String defaultStyleString,
Annotation parsedAnnotation) |
static Annotation |
handleUnsupportedFreetextTypes(org.jdom.Element annotationElement,
Annotation parsedAnnotation)
Set default values for unsupported freetext type annotations
|
static Annotation |
handleUnsupportedTypes(org.jdom.Element annotationElement,
java.lang.String annotationElementType,
Annotation parsedAnnotation)
Ascertains how to handle the current annotation element type and calls it's equivalent handling function
|
static java.util.List<Annotation> |
parseAnnotations(java.lang.String ticket,
org.jdom.Document xfdfDoc,
java.lang.String creatorDisplayName,
boolean parseFileData)
Parses through a supplied XFDF document and returns a list of OA annotation objects.
|
static java.util.List<Annotation> |
parseAnnotations(java.lang.String ticket,
java.util.List<java.lang.String> fdfObjects,
java.lang.String creatorDisplayName,
boolean parseFileData)
Parses through a supplied FDF document and returns a list of OA annotation objects.
|
static java.util.Map<java.lang.String,java.lang.Object> |
parseAnnotations(java.lang.String ticket,
com.itextpdf.text.pdf.PdfReader PdfReader,
boolean forOfflineAnnotation,
boolean parseFileData)
Parses through a supplied PDF document and returns a list of OA annotation objects.
|
static java.util.List<Annotation> |
parseOfflineAnnotations(java.lang.String userDisplayName,
java.util.List<Annotation> parsedAnnotations,
boolean muliUsersOffline,
java.util.List<java.lang.String> failedUsers,
java.util.List<java.lang.String> allUsers,
java.lang.String ticket)
Specifically parse through annotations that were created offline and if applicable set their title and
content appropriately
|
static java.util.List<Annotation> |
removeBRTags(java.util.List<Annotation> annots)
Converts the content on annotations from rich text format to their HTML equivalent
|
static java.lang.String |
replaceConfigPlaceholders(java.lang.String ticket,
java.lang.String configuredString,
java.lang.String objectId,
java.lang.String displayName)
Parses out the placed from the passed config string and returns a string where the placeholders are replaced by the proper values.
|
static void |
saveAnnotation(org.jdom.Document xfdfDoc,
Annotation annotation,
java.lang.String ticket,
java.lang.String objectId,
long lastModified)
Saves a provided annotation at the end of a supplied XFDF document (in the "annots" element).
|
static java.util.List<Annotation> |
setAnnotationTitlesAsCurrentUserDisplayName(java.lang.String userDisplayName,
java.util.List<Annotation> annotations)
Sets the annotation titles to the currently logged in user's display name.
|
protected static void |
setAnnotationXFDFContentAndAttributes(org.jdom.Element annotationElement,
Annotation annotation,
java.lang.String ticket,
java.lang.String objectId,
long lastModified)
Sets the content and the attributes of the supplied XFDF annotation element.
|
static java.lang.String |
unescapeXFDF(java.lang.String original)
Removes any escaped parts of the provided string.
|
static java.util.List<Annotation> |
wrapXFDFContent(java.util.List<Annotation> annotations)
Takes annotations and converts their wrapping to match our rich text format
|
public static final org.jdom.Namespace NAMESPACE_XFDF
public static final org.jdom.Namespace NAMESPACE_XHTML
public static final java.lang.String START_XFDF_CONTENTS_RICHTEXT
public static final java.lang.String END_XFDF_CONTENTS_RICHTEXT
public static final java.lang.String START_TAG_XFDF_CONTENTS_RICHTEXT
public static final java.lang.String START_STATUS_XFDF_CONTENTS_RICHTEXT
public static final java.lang.String END_STATUS_XFDF_CONTENTS_RICHTEXT
public static final java.lang.String XML_VERSION
public static final java.lang.String TYPE_STICKY_NOTE
public static final java.lang.String TYPE_LINE
public static final java.lang.String TYPE_ELLIPSE
public static final java.lang.String TYPE_RECTANGLE
public static final java.lang.String TYPE_HIGHLIGHT
public static final java.lang.String TYPE_STRIKEOUT
public static final java.lang.String TYPE_UNDERLINE
public static final java.lang.String TYPE_CARET
public static final java.lang.String TYPE_REPLACEMENT_TEXT
public static final java.lang.String TYPE_REPLY
public static final java.lang.String TYPE_APPROVED_STAMP
public static final java.lang.String TYPE_ACCEPT_STAMP
public static final java.lang.String TYPE_REJECT_STAMP
public static final java.lang.String TYPE_REVIEWED_STAMP
public static final java.lang.String TYPE_PAGESIZEDCHECKMARK_STAMP
public static final java.lang.String TYPE_STATUS
public static final java.lang.String TYPE_FREETEXT
public static final java.lang.String TYPE_CALLOUT
public static final java.lang.String IT_FREETEXT_CALLOUT
public static final java.lang.String DATE_FORMAT_STRING
public static final java.lang.String TYPE_FILE_ATTACHMENT
public static final java.lang.String TYPE_FREEDRAW
public static final java.lang.String DUMMY_DEFAULT_APPEARANCE
public static final java.lang.String DUMMY_DEFAULT_STYLE
public static final java.lang.String DUMMY_SPAN_STYLE
public static final java.lang.String CLOSING_P_TAG
tag
public static final java.lang.String BR_TAG
public static final java.lang.String BR_CLOSING_TAG
public static final java.lang.String CLOSE_SPAN
public static final java.lang.String BREAK_TAG_ELEMENT_STRING
public static final java.lang.String REPLY_FLAGS_STRING
public static final java.lang.String currentDateKey
public static final com.itextpdf.text.pdf.PdfName PDFNAME_IT
public static final com.itextpdf.text.pdf.PdfName PDFNAME_CL
public static final com.itextpdf.text.pdf.PdfName PDFNAME_SUBJ
public static final com.itextpdf.text.pdf.PdfName PDFNAME_STATEMODEL
public static final com.itextpdf.text.pdf.PdfName PDFNAME_LE
public static final com.itextpdf.text.pdf.PdfName PDFNAME_GROUP
public static final com.itextpdf.text.pdf.PdfName PDFNAME_STRIKE_OUT_TEXT_EDIT
public static final com.itextpdf.text.pdf.PdfName PDFNAME_REPLACE
public static final com.itextpdf.text.pdf.PdfName PDFNAME_COMMENT
public static final com.itextpdf.text.pdf.PdfName PDFNAME_ICON
public static final com.itextpdf.text.pdf.PdfName PDFNAME_DS
public static final java.lang.String NUM_CHECKED_IN_ANNOTS
public static final java.lang.String FAILED_USERNAMES
public static final java.lang.String CONTROLLED_PRINT_AUDIT
public static final java.lang.String CONTROLLED_PRINT_AUTONUMBER
public static final java.lang.String CONTROLLED_PRINT_OBJECT_TYPE
public static final java.lang.String EXTENSION_XFDF
public static final java.lang.String EMPTY_XFDF
public static final double CARET_GROWTH_RATE
public static final java.lang.String ENCODING_PREFIX
public static final java.lang.String[] VALID_ANNOTATIONS
public static final java.lang.String ATTR_NEXT_NUMBER
public static final java.lang.String ATTR_PREFIX
public static final java.lang.String ATTR_SUFFIX
public static final java.lang.String ATTR_OBJECT_ID
public static final java.lang.String ATTR_OBJECT_TYPE_NAME
public static int getAnnotationCount(org.jdom.Document xfdfDoc) throws java.lang.Exception
xfdfDoc
- The XFDF document to scan through for a count of annotations.java.lang.Exception
public static java.util.List<Annotation> parseAnnotations(java.lang.String ticket, org.jdom.Document xfdfDoc, java.lang.String creatorDisplayName, boolean parseFileData) throws java.lang.Exception
ticket
- A valid OC ticket.xfdfDoc
- The XFDF document to parse through for annotations.creatorDisplayName
- The display name of the creator of the XFDF document we're parsing. This display name will become
the title for each annotation we find in the provided XFDF document.parseFileData
- A flag that determines we need to parse the data on file attachment annotationsjava.lang.Exception
public static java.util.List<Annotation> parseAnnotations(java.lang.String ticket, java.util.List<java.lang.String> fdfObjects, java.lang.String creatorDisplayName, boolean parseFileData) throws java.lang.Exception
ticket
- A valid OC ticket.fdfObjects
- A list of FDF objects as Strings.creatorDisplayName
- The display name of the creator of the FDF document we're parsing. This display name will become
the title for each annotation we find in the provided FDF document.parseFileData
- A flag that determines we need to parse the data on file attachment annotationsjava.lang.Exception
public static java.util.Map<java.lang.String,java.lang.Object> parseAnnotations(java.lang.String ticket, com.itextpdf.text.pdf.PdfReader PdfReader, boolean forOfflineAnnotation, boolean parseFileData)
ticket
- A valid OC ticket.PdfReader
- A PdfReader to read content from a PDF document.parseFileData
- A flag that determines we need to parse the data on file attachment annotationspublic static java.util.HashMap<java.lang.String,Annotation> getRepoAnnotationsAsHashmap(java.util.List<Annotation> annotations)
annotatons
- array of all current repo annotatonspublic static java.util.HashMap<java.lang.String,Annotation> getRepoReplyTypeAnnots(java.util.HashMap<java.lang.String,Annotation> repoAnnots)
repoAnnots
- hashmap that contains all the annotations for a particular objectIdpublic static java.util.List<Annotation> flattenReplies(java.util.List<Annotation> annotations)
annotations
- An List of annotations whose reply structure should be flattened.public static Annotation handleUnsupportedTypes(org.jdom.Element annotationElement, java.lang.String annotationElementType, Annotation parsedAnnotation)
annotationElement
- The current annotation element being worked on in ListparsedAnnotation
- The parsed equivalent of the current annotation element being worked on currentlypublic static Annotation handleUnsupportedFreetextTypes(org.jdom.Element annotationElement, Annotation parsedAnnotation)
annotationElement
- The unsupported annotationElementparsedAnnotation
- The parsed equivalent of annotationElementpublic static Annotation handleFreetextProperties(java.lang.String defaultAppearanceString, java.lang.String defaultStyleString, Annotation parsedAnnotation)
public static java.util.List<Annotation> parseOfflineAnnotations(java.lang.String userDisplayName, java.util.List<Annotation> parsedAnnotations, boolean muliUsersOffline, java.util.List<java.lang.String> failedUsers, java.util.List<java.lang.String> allUsers, java.lang.String ticket)
userDisplayName
- The current user's display nameparsedAnnotations
- List containing all parsedAnnotationspublic static java.util.List<Annotation> setAnnotationTitlesAsCurrentUserDisplayName(java.lang.String userDisplayName, java.util.List<Annotation> annotations)
userDisplayName
- the current display name of the user who is logged inannotations
- The list containing all the parsed annotations to be filteredpublic static java.util.List<Annotation> filterAnnotationsByFlag(int flagBit, java.util.List<Annotation> annotations)
flagBit
- The int designating which particular flag to checkannotations
- The list containing all the parsed annotations to be filteredpublic static java.util.List<Annotation> filterAnnotationsByUser(java.lang.String userDisplayName, java.util.List<Annotation> annotations)
username
- The string containing the current user which will be used to filter the annotationsannotations
- The list containing all the parsed annotationspublic static java.lang.String replaceConfigPlaceholders(java.lang.String ticket, java.lang.String configuredString, java.lang.String objectId, java.lang.String displayName)
ticket
- A valid OC ticket.configuredString
- The string containing config placeholders, which serves as the base for the final string.objectId
- The id of the repo object that is being saved to.displayName
- The display name of the current user.public static java.lang.String computeAnnotationConfigPlaceholder(java.lang.String ticket, java.lang.String param, java.lang.String objectId, java.lang.String displayName)
ticket
- A valid OC ticket.param
- The individual parameter being interpreted.objectId
- The id of the repo object that is being saved to.The
- display name of the current user.public static java.lang.String executeRegexMatching(java.lang.String contentString, java.lang.String regexPattern)
contentString
- The string from which we want to extract the regex match.regexPattern
- The regex pattern used to extract a certain substring from contentString.public static void saveAnnotation(org.jdom.Document xfdfDoc, Annotation annotation, java.lang.String ticket, java.lang.String objectId, long lastModified) throws java.lang.Exception
xfdfDoc
- An XFDF document to add the annotation to the end of the "annots" element.annotation
- The Annotation
object to save into the supplied XFDF document.java.lang.Exception
- If an error occurs saving the annotation into the XFDF document.protected static void setAnnotationXFDFContentAndAttributes(org.jdom.Element annotationElement, Annotation annotation, java.lang.String ticket, java.lang.String objectId, long lastModified) throws java.lang.Exception
annotationElement
- The XFDF element to set the contents and the attributes on.annotation
- The Annotation
object to use for setting the content and attributes in the XFDF.java.lang.Exception
- If an error occurs setting the contents or attributes of the annotation in the XFDF.public static DocumentInfo getPdfDocumentInfo(java.lang.String ticket, java.lang.String objectId, java.lang.String mimetype, java.lang.Integer docSizeLoadLimitBytes, java.lang.String[] fileExtensions, long lastModified) throws java.io.IOException
ticket
- A valid OC ticket.objectId
- The id of the repo object we want documentInfo for.pdfReader
- An iText pdfReader with the object's pdf representation loaded.mimetype
- The desired mimetype of the PDF. Used to distinguish between a normal PDF and a comparison PDF.docSizeLoadLimitBytes
- The default doc sizing that defines when a doc is too large to view. HPI Configured.java.io.IOException
public static com.aspose.pdf.Document flattenPDFPortfolio(com.aspose.pdf.Document pdfPortfolio, DocumentInfo documentInfo)
pdfPortfolio
- - an Aspose document with embedded filesdocumentInfo
- - information about the document being flattenedpublic static Page[] getPDFPageDimensions(java.lang.String ticket, java.lang.String objectId, com.aspose.pdf.Document pdfDocument, java.lang.String mimetype)
ticket
- a valid OC ticket.objectId
- the objectId of the document to get the information for.pdfDocument
- An Aspose PDF document.mimetype
- The desired mimetype of the PDF. Used to distinguish between a normal PDF and a comparison PDF.public static DocumentInfo getVideoDocumentInfo(java.lang.String ticket, java.lang.String objectId, long size)
ticket
- A valid OC ticket.objectId
- The id of the repo object we want documentInfo for.pdfReader
- An iText pdfReader with the object's pdf representation loaded.mimetype
- The desired mimetype of the PDF. Used to distinguish between a normal PDF and a comparison PDF.public static void burnInAnnotations(com.itextpdf.text.pdf.PdfReader pdfReader, com.itextpdf.text.pdf.PdfStamper stamper, java.lang.String objectId, java.util.List<Annotation> annotations, java.lang.String userDisplayName, boolean forOfflineAnnotation, java.lang.String ticket, long lastModified)
pdfReader
- The PdfReader
object representing the PDF to burn the annotations on.stamper
- The stamper
object used to create the new PDF.objectId
- The object ID of the document.annotations
- The arrayList of Annotation
objects to burn in to the PDF.userDisplayName
- The display name of the user attempting the "burn in" operation. Used to determine if an
annotation belongs to this user or not (for coloring purposes).forOfflineAnnotation
- True will result in the annotations being read-only in the downloaded PDF,
annotations will be burned-in normally otherwise.ticket.
- The session ticket.lastModified.
- When the document was last modified.@Deprecated public static void controlledPrintOverlay(java.lang.String ticket, java.lang.String objectId)
ticket
- objectId
- public static java.lang.String unescapeXFDF(java.lang.String original)
original
- The content to "unescape".public static java.lang.String escapeXFDF(java.lang.String original)
original
- the XFDF string to escape.public static java.util.List<Annotation> removeBRTags(java.util.List<Annotation> annots)
annots
- a list of all annotation objects that we need to make readable in htmlpublic static java.util.List<Annotation> wrapXFDFContent(java.util.List<Annotation> annotations)
annotations
- a list of all annotationspublic static java.lang.String buildRichTextSpan(java.lang.Boolean isItalic, java.lang.Boolean isBold, java.lang.Boolean isUnderline, java.lang.String color)
isItalic.
- Whether or not our current text should be italicized.isBold.
- Whether or not our current text should be bold.isUnder.
- Whether or not our current text should be underlined.public static java.lang.String getNextAutoNumber(java.lang.String ticket, java.lang.String objectTypeName) throws OCRuntimeException
OCRuntimeException
protected static java.lang.String getAutonumberObjectId(java.lang.String ticket, java.lang.String objectTypeName)
ticket
- oc ticketobjectTypeName
- the object type namepublic static java.util.List<java.lang.String> getAnnotatableTypesByViewer(AnnotationConfig config, java.lang.String viewer)
config
- the AnnotationConfig
object.viewer
- The string representation of the viewer to filter on.