FoxitPDFSDKforWeb
v10.0.0
Foxit PDF SDK for Web
|
Public Member Functions | |
addAnnot (annotJson) | |
Add an annotation into the current page. This method may add an annotation along with an associated annotation like popup. [Support in Server] More... | |
addAnnotGroup (annotJsons, headerIndex) | |
Add a group annotation into the current page. This method may add an annotation along with an associated annotation like popup. [Support in Server] More... | |
addGraphicsObject (info) | |
Add a new graphics object to the page. More... | |
addImage (imageBuffer, rect, rotation=0) | |
Add the image to page. More... | |
addWatermark (data) | |
Add a page watermark. More... | |
changeAnnotOrder (orderType, annot) | |
Change the annotation's order. Not support Popup and Watemark. More... | |
flatten (option) | |
Flatten all annotations and interactive form fields in a Page. More... | |
getAllBoxes () | |
Gets all boxes. More... | |
getAnnotCount () | |
Gets the total amount of all annotations in a specified page. [Support in Server] More... | |
getAnnotIdAtDevicePoint (point, tolerance, matrix) | |
Get the specified position of an annotation in device page coordinate. [Support in Server] More... | |
getAnnotObjectNumAtDevicePoint (point, tolerance, matrix) | |
Get the specified position of an annotation in device page coordinate. [Support in Server] More... | |
getAnnots (reload=false, triggerEvent=true) | |
Get an array of all annotations in a page. [Support in Server] More... | |
getAnnotsByIdArray (ids) | |
Get an array of page annotation ID which can be obtained by Annot::getUniqueID(). [Support in Server] More... | |
getAnnotsByObjectNumArray (objNums, force=false) | |
Get an array of page annotation object number which can be obtained by Annot::getObjectNumber(). [Support in Server] More... | |
getAnnotTree () | |
Get a structrual tree of all annotations in a specified page. [Support in Server] More... | |
getBatchProcessor () | |
Obtains the BatchProcessor instance. Batch processors can be used to improve property update performance. More... | |
getCharInfoAtPoint (point, tolerance=0) | |
Get character information at a specified position, in PDF coordination system. More... | |
getDeviceMatrix (rotate=0) | |
Get the device matrix for the page. [Support in Server] More... | |
getDevicePoint (point, scale=1, rotate=0) | |
Convert PDF coordinates to device coordinates for the page. [Support in Server] More... | |
getDeviceRect (pdfRect, scale=1, rotate=0) | |
Convert PDFRect to deviceRect [Support in Server] More... | |
getDict () | |
Get the dictionary of the pdf page. More... | |
getGraphicsObjectAtPoint (point, tolerance, type) | |
Get graphics object at the specified point on the page. More... | |
getGraphicsObjectByIndex (index) | |
Get page graphics object by Index. More... | |
async | getGraphicsObjectsByRect (options) |
Gets the graphics object that intersects or contains the specified bounding rectangle. More... | |
getGraphicsObjectsCount () | |
Get the count of the graphics objects on the page. More... | |
getGraphicsObjectsInRect (rect, tolerance, type) | |
Get graphics objects of the specified rectangle on the page. More... | |
getHeight () | |
Get page height. [Support in Server] More... | |
getIndex () | |
Get page's index. More... | |
getMarkupAnnots () | |
Get only markup annotations in the current page. [Support in Server] More... | |
getMeasureScaleRatio () | |
Get the scale ratio for measuring. More... | |
getPageBox (boxType) | |
Get page box rectangle (in PDF coordinate system). More... | |
getPDFDoc () | |
Get the document object [Support in Server] More... | |
getPDFMatrix () | |
Get page matrix [Support in Server] More... | |
getRotation () | |
Get page rotation angle. More... | |
getRotationAngle () | |
Get page rotation angle. [Support in Server] More... | |
getSnappedPoint (point, mode) | |
Get the snap point based on the given point and snap mode which should be passed as array. More... | |
getTextContinuousRectsAtPoints (point1, point2, tolerance=8, start, end) | |
Gets the rectangle of the consecutively selected text. More... | |
getTextInRect (rect, type=0) | |
Get the text within a rectangle, in PDF coordinate system. More... | |
getTextRectsAtRect (rect) | |
Get page text rectangles in specified rectangle. [Support in Server] More... | |
getTextSearch (pattern, flags) | |
Get PageTextSearch with specified pattern and flags. [Support in Server] More... | |
getThumb (rotate=0, ratio=1) | |
Get the PDF stream of "Thumb". [Support in Server] More... | |
getViewportRect () | |
Get the view port rectangle. More... | |
getWidth () | |
Get page width. [Support in Server] More... | |
getWordCount () | |
Get the page's word count. More... | |
isCropped () | |
Use CropBox to determine whether the page is cropped. More... | |
isVirtual () | |
Some PDF pages are generated without necessary dictionary entries, and can’t be rendered and processed properly in a standard PDF reader. These non-standard pages are marked as virtual pages in our Web SDK. To render this type of pages correctly without causing any errors, you should call this API to detect virtual pages when these pages are in focus and disable actions such as widget creation, PPO, Action, Redaction, and so on. More... | |
markRedactAnnot (rects) | |
Mark page contents (text object, image object, and path object) which are to be redacted. More... | |
pasteAnnot (srcAnnot, position) | |
Paste annotation at the specified position. More... | |
removeAllAnnot () | |
Remove all annotations from the current page. [Support in Server] More... | |
removeAnnotById (id) | |
Remove an annotation by ID from the current page. The ID can be obtained by Annot::getUniqueID(). [Support in Server] More... | |
removeAnnotByObjectNumber (objNum) | |
Remove an annotation by object number from the current page. The object number can be obtained by Annot::getObjectNumber(). [Support in Server] More... | |
removeGraphicsObject (obj) | |
Remove the specified graphic object. More... | |
render (scale, rotate, area, contentsFlags=['page'], usage='view') | |
Get page bitmap. [Support in Server] More... | |
reverseDeviceOffset (offset, scale=1, rotate=0) | |
Convert PDF device page offset to PDF page offset. [Support in Server] More... | |
reverseDevicePoint (point, scale=1, rotate=0) | |
Transform PDF page point device coordinate to PDF page coordinate. [Support in Server] More... | |
reverseDeviceRect (pdfRect, scale=1, rotate=0) | |
Transform PDF page device rectangle to PDF page rectangle. [Support in Server] More... | |
setMeasureScaleRatio (storeInPage, unitName, ratio, scale) | |
Set the scale ratio for measuring. More... | |
setPageSize (width, height) | |
Set the page size and triggers the DataEvents.pagesBoxChanged event after completion. More... | |
setRotation (rotation) | |
PDF page object
|
inline |
Add an annotation into the current page. This method may add an annotation along with an associated annotation like popup. [Support in Server]
icon
and iconCategory
are specified), please call PDFViewer.initAnnotationIcons(icons) to set default annotation icons.annotJson | object - JSON object which indicates annotation's properties. |
annotJson.type | Annot_Type - The type of annotation to be added. Support type:
|
annotJson.rect | object - Rectangle of the new annotation. |
annotJson.rect.left | number - The x-coordinate of the input left-bottom corner. |
annotJson.rect.bottom | number - The y-coordinate of the input left-bottom corner. |
annotJson.rect.right | number - The x-coordinate of the input right-top corner. |
annotJson.rect.top | number - The y-coordinate of the input right-top corner. |
[annotJson.borderInfo] | object - set border information. [optional] |
[annotJson.borderInfo.width] | number - Border width. [optional] |
[annotJson.borderInfo.style] | number - Border style.Style {0:"Solid", 1:"Dashed", 2:"UnderLine", 3:"Beveled",4:"Inset", 5:"Cloudy"}. [optional] If the boder style is set to the unsupporetd type annotation, It will change to set border style as 'Solid' by default internally. For details:
|
[annotJson.borderInfo.cloudIntensity] | number - Intensity of the cloudy effect.Only useful when parameter style is "Cloudy". [optional] Valid value range: 0 to 2. 0 means no cloudy border effect. If the value is below 0, it will have the same effect as value 0. If the value is above 2, it will have the same effect as value 2. |
[annotJson.borderInfo.dashPhase] | number - Dash phase.Only useful when parameter style is "Dashed". [optional] |
[annotJson.borderInfo.dashes] | number[] - A dash array that represents the dash patterns.Only useful when parameter style is "Dashed". [optional] |
[annotJson.alignment] | number - Set alignment value. Alignment { 0:"AlignmentLeft", 1:"AlignmentCenter", 2:"AlignmentRight" } [optional] This parameter is valid only when the type is freetext. |
[annotJson.buffer] | Uint8Array - The buffer of file. This parameter is valid only when the type is fileattachment and screen. |
[annotJson.calloutLinePoints] | number[] - Only when the intent name of a free text annotation is "FreeTextCallout", this free text annotation can have callout line points property, and this property has effect on this kind of free text annotation's appearance. [optional] This parameter is valid only when the type is freetext. |
[annotJson.calloutLineEndingStyle] | number - Only when the intent name of a free text annotation is "FreeTextCallout", this free text annotation can have callout line points property, and this property has effect on this kind of free text annotation's appearance. Please refer to Ending_Style. {freetext && FreeTextCallout}[optional] |
[annotJson.color] | string - New border color to be set.Format: 0xRRGGBB. [optional] |
[annotJson.contents] | string - New content string to be set. [optional] If annotJson.richText is set and annotJson.type equal to freetext, this parameter is invalid. |
[annotJson.coords] | Array<{left:number;top:number;right:number;bottom:number;}> - For a text markup annotation, quadrilaterals are required. This property has effect on text markup annotation's appearance. After setting new quadrilaterals, rectangle of current text markup annotation will be updated as well.In order to startCharIndex/endCharIndex priority. This parameter is valid only when the type is textmarkup. (required) |
[annotJson.creationTimestamp] | number - Set creation date time. [optional] This parameter is valid only when the type is markup. |
[annotJson.date] | number - Set last modified date time. [optional] |
[annotJson.dicts] | object - Set annotation's dictionary object. [optional] |
[annotJson.defaultAppearance] | object - Set annotation's default appearance. [optional] If annotJson.richText is set and annotJson.type equal to freetext, this parameter is invalid. This parameter is valid only when the type is freetext. |
[annotJson.defaultAppearance.textColor] | number - Set annotation's default text color (0x**RRGGBB). [optional] This parameter is valid only when the type is freetext. |
[annotJson.defaultAppearance.textSize] | number - Set annotation's default text size. [optional] This parameter is valid only when the type is freetext. |
[annotJson.endCharIndex] | number - For a text markup annotation, index of the end character. [optional] This parameter is valid only when the type is textmarkup. Setting both annotJson.startCharIndex and annotJson.endCharIndex will calculate the value of annotJson.coords internally and replace it. |
[annotJson.endPoint] | object - Set the end point of line.{x: number, y: number} [optional] This parameter is valid only when the type is line. |
[annotJson.endPoint.x] | number - The value of the X-axis in the end point. [optional] This parameter is valid only when the type is line. |
[annotJson.endPoint.y] | number - The value of the Y-axis in the end point. [optional] This parameter is valid only when the type is line. |
[annotJson.flags] | number - The annotation flags. Please refer to values starting from Annot_Flags.invisible and this would be one or a combination of these values. The default value is 0. It will also not print. |
[annotJson.measure] | object - Set the measure of line. [optional] This parameter is valid only when the type is circle, line, polyline, polygon and square. |
[annotJson.measure.unit] | string - Set the label for displaying the units for measuring. [optional] This parameter is valid only when the type is circle, line, polyline, polygon and square. |
[annotJson.measure.ratio] | object - Set the scale ratio for measuring. [optional] This parameter is valid only when the type is circle, line, polyline, polygon and square. |
[annotJson.measure.ratio.userSpaceValue] | number - Set the ratio value in user space. [optional] This parameter is valid only when the type is circle, line, polyline, polygon and square. |
[annotJson.measure.ratio.userSpaceUnit] | string - Set the ratio unit in user space. [optional] This parameter is valid only when the type is circle, line, polyline, polygon and square. |
[annotJson.measure.ratio.realValue] | number - Set the ratio value in real space. [optional] This parameter is valid only when the type is circle, line, polyline, polygon and square. |
[annotJson.measure.ratio.realUnit] | string - Set the ratio unit in real space. [optional] This parameter is valid only when the type is circle, line, polyline, polygon and square. |
[annotJson.endStyle] | Ending_Style - Set line ending style of the end point. Please refer to Ending_Style. [optional] This parameter is valid only when the type is line. |
[annotJson.fileName] | string - The file name to be set. This is mandatory when the multiBuffer parameter exists. This parameter is valid only when the type is fileattachment and screen. |
[annotJson.contentType] | string - Set the content type (MIME type) of the media data. This is mandatory when the multiBuffer parameter exists. This parameter is valid only when the type is screen. |
[annotJson.fillColor] | string - New fill color to be set. Format: 0xRRGGBB. 0 for transparent. [optional] This parameter is valid only when the type is freetext, circle, square and polygon. |
[annotJson.iconInfo] | object - Specifies the icon of stamp. Attention: this property will override "icon" and "iconCategory" properties. [optional] This parameter is valid only when the type is stamp. |
[annotJson.iconInfo.annotType] | string - The type of supported annot. Currently, it must be "stamp". [optional] This parameter is valid only when the type is stamp. |
[annotJson.iconInfo.category] | string - Category which the icon is collected. [optional] This parameter is valid only when the type is stamp. |
[annotJson.iconInfo.name] | string - The name of icon. Only ascii characters are available. [optional] This parameter is valid only when the type is stamp. |
[annotJson.iconInfo.fileType] | string - The file type of icon. One of 'bmp', 'jpg', 'jpeg', 'png'. [optional] This parameter is valid only when the type is stamp. |
[annotJson.iconInfo.url] | string - The url of icon. It supports HTTP, file, blob url and base64 url. [optional] This parameter is valid only when the type is stamp. |
[annotJson.icon] | string - Set icon name. The name of icon. Only ascii characters are available. [optional] This parameter is valid only when the type is stamp. |
[annotJson.iconCategory] | string - Set stamp icon's category. [optional] This parameter is valid only when the type is stamp. |
[annotJson.inkList] | Array<{x:number;y:number;type:1|2|3;}> - Set ink list data.If type is "ink", it should not be an empty. This parameter is valid only when the type is ink. |
[annotJson.intent] | string - Set intent name. [optional]. Please refer to IMarkupAnnotationSummary::intent This parameter is valid only when the type is markup. |
[annotJson.multiBuffer] | Uint8Array - The buffer of Media. This parameter is valid only when the type is screen. |
[annotJson.name] | string - New unique ID string to be set. [optional] |
[annotJson.noPopup] | boolean - If true, no popup is generated,else popup is generated. [optional] This parameter is valid only when the type is markup. |
[annotJson.opacity] | number - Set opacity value.only 0~1 is valid. [optional] This parameter is valid only when the type is markup. |
[annotJson.startCharIndex] | number - For a text markup annotation,Index of the start character. [optional] This parameter is valid only when the type is textmarkup. Setting both annotJson.startCharIndex and annotJson.endCharIndex will calculate the value of annotJson.coords internally and replace it. |
[annotJson.startStyle] | number - Set line ending style of the start point. Please refer to Ending_Style. [optional] This parameter is valid only when the type is line. |
[annotJson.startPoint] | object - Set the start point of line.{x: number, y: number} [optional] This parameter is valid only when the type is line. |
[annotJson.startPoint.x] | number - The value of the X-axis in the start point. [optional] This parameter is valid only when the type is line. |
[annotJson.startPoint.y] | number - The value of the Y-axis in the start point. [optional] This parameter is valid only when the type is line. |
[annotJson.length] | number - Set line's leader line length. [optional] This parameter is valid only when the type is line. |
[annotJson.styleFillColor] | string - Set fill color for ending styles. New fill color to be set. Format: 0xRRGGBB, 0 for transparent, otherwise alpha will be set to 0xFF. [optional] This parameter is valid only when the type is polyline,line. |
[annotJson.subject] | string - Set subject string.If the value is "replace," that means that this is a Replace annotation. [optional] This parameter is valid only when the type is markup. |
[annotJson.title] | string - Set title string. [optional] This parameter is valid only when the type is markup. |
[annotJson.vertexes] | Array<{x:number;y:number;}> - Set vertexes, Vertexes property is required for a polyline annotation. [optional] This parameter is valid only when the type is polyline and polygon. |
[annotJson.rotation] | number - Set the rotation in clockwise, Currently, only support free text, stamp, srceen annotations. for free text, srceen annotation, this should be one of these values : 0, 90, 180, 270. for stamp annotation, the value range is from 0 to 360. |
[annotJson.richText] | object[] - An array of rich text data. Now, Only support FreeText annotation. |
[annotJson.richText[].content] | string - Text string to be set as content for specified rich text. This should not be an empty string. |
[annotJson.richText[].richTextStyle] | object - The style data of a rich text string |
[annotJson.richText[].richTextStyle.font] | object - A valid font object. |
[annotJson.richText[].richTextStyle.font.name] | string - the face name of the font. If it`s a standard font, the font styles and charset will not work. The standard font are 'Courier','Courier-Bold','Courier-BoldOblique','Courier-Oblique', 'Helvetica','Helvetica-Bold','Helvetica-BoldOblique','Helvetica-Oblique','Times-Roman', 'Times-Bold','Times-BoldItalic','Times-Italic','Symbol','ZapfDingbats'. While using 'Symbol' or 'ZapfDingbats, the parameter "richTextStyle.isBold" and "richTextStyle.isItalic" will not work. If it`s a custom font, you should call PDFViewer.setJRFontMap to map the available fonts. |
[annotJson.richText[].richTextStyle.font.styles] | number - The font styles. Please refer to Font_Styles . |
[annotJson.richText[].richTextStyle.font.charset] | number - The charset of the font. Please refer to Font_Charset or Font_CIDCharset . |
[annotJson.richText[].richTextStyle.textSize] | number - Text size. It should not be negative value. 0 means text will not be shown. |
[annotJson.richText[].richTextStyle.textAlignment] | number - Alignment value. Please Refer to Alignment . |
[annotJson.richText[].richTextStyle.textColor] | number - Text color. Format: 0xRRGGBB. |
[annotJson.richText[].richTextStyle.isBold] | boolean - A boolean value which indicates whether to make text bold or not. |
[annotJson.richText[].richTextStyle.isItalic] | boolean - A boolean value which indicates whether to italicize text or not. |
[annotJson.richText[].richTextStyle.isUnderline] | boolean - A boolean value which indicates whether to underline text or not. |
[annotJson.richText[].richTextStyle.isStrikethrough] | boolean - A boolean value which indicates whether to cross text out with strike through or not. |
[annotJson.richText[].richTextStyle.cornerMarkStyle] | number - Corner mark style which can be used to make text as superscript or subscript or not as any kind of corner mark. 1 - Corner mark style: none. 2 - Corner mark style: superscript. 3 - Corner mark style: subscript. |
|
inline |
Add a group annotation into the current page. This method may add an annotation along with an associated annotation like popup. [Support in Server]
annotJsons | Array<object> - An array of annotations json. |
headerIndex | number - Index of header annotation. |
|
inline |
Add a new graphics object to the page.
info.type | Graphics_ObjectType - Specify the type of the new graphics object. Graphics_ObjectType . |
[info.buffer] | ArrayBuffer - For image object. The image file buffer, which supports png/jpg/bmp format. |
[info.rect] | PDFRect - For image object. Specify the rectangle on page in PDF coordination system. |
[info.points] | Array<[string, number, number]> - For path object. The points array to construct the path.For each element of the points array, which consist of {type, x, y}: type {string} - The path construct operator, which could be 'm','l','c','h'. ('m' stands for 'move to', 'l' stands for 'line to', 'c' stands for 'curve to', 'h' stands fo 'close figure'). x {number} - The horizontal position, in PDF page coordinate. y {number} - The vertical position, in PDF page coordinate. |
[info.borderWidth] | number - For path object. Specify the width of path border, should not be negative. |
[info.originPosition] | PDFPoint - For text object. Specify the original position of the graphic object. |
[info.charspace] | number - For text object. The character space. |
[info.wordspace] | number - For text object. The word space. |
[info.textmatrix] | [number,number,number,number] - For text object. The matrix for the text inside the object. |
[info.textmode] | number - For text object. Text rendering mode. Please refer to values starting from Text_Mode . |
[info.font] | object - For text object. The font info. |
[info.font.standardId] | Font_StandardID - The id of standard PDF fonts. Please refer to Font_StandardID . |
[info.font.name] | string - The font face name. |
[info.font.styles] | Font_Styles - The font style. Please refer to Font_Styles . |
[info.font.charset] | Font_Charset|Font_CIDCharset - The charset of the font. Please refer to Font_Charset or Font_CIDCharset . |
[info.font.weight] | number - The font weight. |
[info.matrix] | [number,number,number,number,number,number] - For text object. The matrix of the text object.[optional] Translations are specified as [1 0 0 1 tx ty], where tx and ty are the distances to translate the origin of the coordinate system in the horizontal and vertical dimensions, respectively. If this is set, the originPosition parameter is invalid. Scaling is obtained by [sx 0 0 sy 0 0]. This scales the coordinates so that 1 unit in the horizontal and vertical dimensions of the new coordinate system is the same size as sx and sy units, respectively, in the previous coordinate system. Rotations are produced by [cos θ sin θ −sin θ cos θ 0 0], which has the effect of rotating the coordinate system axes by an angle θ counterclockwise. Skew is specified by [1 tan α tan β 1 0 0], which skews the x axis by an angle α and the y axis by an angle β |
[info.text] | string - For text object. The text content. |
[info.fillColor] | number - For text object. The text color, which represents as 0xFFRRGGBB. |
|
inline |
Add the image to page.
imageBuffer | ArrayBuffer - Image ArrayBuffer. |
rect | PDFRect - Image Rect. {left:number,right:number, top: number, bottom: number} |
[rotation=0] | number - Image rotation. It should be 0,90,180 or 270; |
|
inline |
Add a page watermark.
watermarkConfig | object - Page watermarking configuration. Example: { type:"text", text:"This is a watermark", watermarkSettings:{ position:"TopLeft", offsetX:0, offsetY:0, scale:1, rotation:45, opacity:100 }, watermarkTextProperties:{ font:2, fontSize:20, color:0x000000, fontStyle:"normal" } }; |
watermarkConfig.type | 'text'|'bitmap' - The type of watermark. 1."text" represents a text type watermark. 2."bitmap" represents the image type watermark. |
[watermarkConfig.text] | string - Text type watermark string. If type is "text". |
[watermarkConfig.bitmap] | Uint8Array - Image type watermark buffer. If type is "bitmap". |
[watermarkConfig.useRelativeScale=true] | boolean - Determine if the scale is relative to the target page. If it is true, use the "watermarkConfig.watermarkSettings.scale", otherwise, use the "watermarkConfig.watermarkTextProperties.fontSize". The default value is true. |
watermarkConfig.watermarkSettings | object - Watermark-related configuration. |
[watermarkConfig.watermarkSettings.position=Position.center] | Position - Please Refer to Position. Default: Position.center. |
[watermarkConfig.watermarkSettings.offsetX=0] | number - Horizontal offset. In points. The default value is 0. |
[watermarkConfig.watermarkSettings.offsetY=0] | number - Vertical offset. In points. The default value is 0. |
watermarkConfig.watermarkSettings.flags | Watermark_Flag - Watermark flags. Please refer to Watermark_Flag. |
[watermarkConfig.watermarkSettings.scale=1] | number - Scale coefficient. The default value is 1. It should be greater than 0.01f. Valid range: from 0.01 to 1. |
[watermarkConfig.watermarkSettings.rotation=45] | number - Rotation angle in degrees. The default value is 45. |
[watermarkConfig.watermarkSettings.opacity=100] | number - Opacity in percents. Valid range: from 0 to 100. 0 for fully transparent and 100 for fully opaque.The default value is 100. |
[watermarkConfig.watermarkTextProperties] | object - Configuration for text watermarking. |
[watermarkConfig.watermarkTextProperties.font=Standard_Font.courier] | Standard_Font - Specify Font object used for the text. Please refer to Standard_Font.Default: Standard_Font.courier. |
[watermarkConfig.watermarkTextProperties.fontSize=20] | number - Font size. The default value is 20. |
[watermarkConfig.watermarkTextProperties.color=0x000000] | number - Font color<Hexadecimal>. The default value is "0x000000". |
[watermarkConfig.watermarkTextProperties.fontStyle='normal'] | 'normal'|'underline' - The default value is "normal". 1."normal":Watermark font style: normal. 2."underline":Watermark font style: with underline. |
|
inline |
Change the annotation's order. Not support Popup and Watemark.
orderType | number - The type of the annotation's order. Please refer to values starting from PosType |
annot | Annot - The specified annotation's order will be changed. |
|
inline |
Flatten all annotations and interactive form fields in a Page.
option | number - Specify which objects will be flattened. Please Refer to Flatten_Option |
|
inline |
Gets all boxes.
Promise<{ mediaBox: PDFRect, // Media Box for page boundary cropBox: PDFRect, // Crop Box for page boundary trimBox: PDFRect, // Trim Box for page boundary artBox: PDFRect, // Art Box for page boundary bleedBox: PDFRect, // Bleed Box for page boundary calcBox: PDFRect, // Content area of PDF page, refer to minWidth: number, // Min width of all boxes minHeight: number, // Min height of all boxes }>
|
inline |
Gets the total amount of all annotations in a specified page. [Support in Server]
|
inline |
Get the specified position of an annotation in device page coordinate. [Support in Server]
point | [number,number] - The specified position, in device coordinate system. |
tolerance | number - The tolerance value. Valid range: 0.0f to 30.0f. |
matrix | Matrix - The device matrix such as page.getDeviceMatrix(); |
|
inline |
Get the specified position of an annotation in device page coordinate. [Support in Server]
point | [number, number] - The specified position, in device coordinate system. |
tolerance | number - The tolerance value. Valid range: 0.0f to 30.0f. |
matrix | Matrix - The device matrix such as page.getDeviceMatrix(); |
|
inline |
Get an array of all annotations in a page. [Support in Server]
|
inline |
Get an array of page annotation ID which can be obtained by Annot::getUniqueID(). [Support in Server]
ids | string[] - Specifies annotations ID. |
|
inline |
Get an array of page annotation object number which can be obtained by Annot::getObjectNumber(). [Support in Server]
objNums | number[] - Specifies annotations ID. |
|
inline |
Get a structrual tree of all annotations in a specified page. [Support in Server]
|
inline |
Obtains the BatchProcessor instance. Batch processors can be used to improve property update performance.
|
inline |
Get character information at a specified position, in PDF coordination system.
point | [number, number] - The specified position, in PDF coordinate system. |
tolerance | number - Tolerance value. Valid range: 0.0f to 30.0f. |
|
inline |
Get the device matrix for the page. [Support in Server]
[rotate=0] | number - Rotation Angle. Only support multiples of 90. The other values default to 0. |
|
inline |
Convert PDF coordinates to device coordinates for the page. [Support in Server]
point | [number, number] - Specifies PDF page point coordinate: [x, y]. |
[scale=1] | number - Indecate magnification |
[rotate=0] | number - Rotation Angle. Only support multiples of 90. The other values default to 0. |
|
inline |
Convert PDFRect to deviceRect [Support in Server]
pdfRect | PDFRect - PDF Rect. {left:number,right:number, top: number, bottom: number} |
[scale=1] | number - Rect magnification |
[rotate=0] | number - Rotation Angle. Only support multiples of 90. The other values default to 0. |
|
inline |
Get the dictionary of the pdf page.
|
inline |
Get graphics object at the specified point on the page.
point | [number,number] - The point on the pdf page, in PDF coordinate. |
tolerance | number - The inaccuracy to be tolerable for the point. |
type | Graphics_ObjectType - The type of graphic object. Graphics_ObjectType . |
|
inline |
Get page graphics object by Index.
index | number - Index of page graphics object. |
|
inline |
Gets the graphics object that intersects or contains the specified bounding rectangle.
options | object |
options.rect | PDFRect - Specifies page rectangle in PDF coordination system. |
options.tolerance | number - The inaccuracy to be tolerable for the rectangle. |
options.type | Graphics_ObjectType - The graphics object type except Graphics_ObjectType.FormXObject. |
[options.isInRect=true] | boolean - If true, all graphics object within the bounds of the rectangle will be returned, if false, all graphics objects that intersect the rectangle will be returned. |
|
inline |
Get the count of the graphics objects on the page.
|
inline |
Get graphics objects of the specified rectangle on the page.
rect | PDFRect - Specifies page rectangle in PDF coordination system. |
tolerance | number - The inaccuracy to be tolerable for the rectangle. |
type | Graphics_ObjectType - The type of graphic object. Graphics_ObjectType . |
|
inline |
Get page height. [Support in Server]
|
inline |
Get page's index.
|
inline |
Get only markup annotations in the current page. [Support in Server]
|
inline |
Get the scale ratio for measuring.
|
inline |
Get page box rectangle (in PDF coordinate system).
boxType | Box_Type - Box type. Please refer to Box_Type. |
|
inline |
Get the document object [Support in Server]
|
inline |
Get page matrix [Support in Server]
|
inline |
Get page rotation angle.
|
inline |
Get page rotation angle. [Support in Server]
|
inline |
Get the snap point based on the given point and snap mode which should be passed as array.
point | object - Point on the page in PDF Point unit |
point.x | number - The X-axis coordinate with the origin at left-bottom corner of the PDF page |
point.y | number - The Y-axis coordinate with the origin at left-bottom corner of the PDF page |
mode | SNAP_MODE - the value be passed as array, it refers to PDFViewCtrl.constants.SNAP_MODE. |
|
inline |
Gets the rectangle of the consecutively selected text.
point1 | [number, number] - Represents the start point in PDF coordinate system. |
point2 | [number, number] - Represents the end point in PDF coordinate system. |
tolerance | number - Represents the value for character hit detection. The default value is 8. The valid range is from 0.0f to 30.0f. |
start | number - The start index of the character. The default value is -1. |
end | number - The end index of the character. The default value is -1. |
|
inline |
Get the text within a rectangle, in PDF coordinate system.
rect | PDFRect - Specifies page rectangle in PDF coordination system. |
[type=0] | 0|1|2 - Specifies text type . 1 for pageText, 2 for fieldsText, 0 for both, The default value is 0. |
|
inline |
Get page text rectangles in specified rectangle. [Support in Server]
rect | PDFRect - Specifies page rectangle in PDF coordination system. |
|
inline |
Get PageTextSearch with specified pattern and flags. [Support in Server]
pattern | String |
flags | Search_Flag - Specify search flag. Please refer to Search_Flag. |
|
inline |
Get the PDF stream of "Thumb". [Support in Server]
rotate | number - rotation degrees of thumbnail image, it should be 0,90,180 or 270 |
|
inline |
Get the view port rectangle.
|
inline |
Get page width. [Support in Server]
|
inline |
Get the page's word count.
|
inline |
Use CropBox to determine whether the page is cropped.
|
inline |
Some PDF pages are generated without necessary dictionary entries, and can’t be rendered and processed properly in a standard PDF reader. These non-standard pages are marked as virtual pages in our Web SDK. To render this type of pages correctly without causing any errors, you should call this API to detect virtual pages when these pages are in focus and disable actions such as widget creation, PPO, Action, Redaction, and so on.
|
inline |
Mark page contents (text object, image object, and path object) which are to be redacted.
rects | Array<{left:number;right:number;top:number;bottom:number;}> - Specify areas in the page to be marked. It should not be an empty array. All the input rectangles will be treated as one redact annotation. |
|
inline |
Paste annotation at the specified position.
srcAnnot | Annot - Indicates the annotation which will be pasted. |
position | {x:number,y:number} - The specified position, in PDF coordinate system. |
|
inline |
Remove all annotations from the current page. [Support in Server]
|
inline |
Remove an annotation by ID from the current page. The ID can be obtained by Annot::getUniqueID(). [Support in Server]
id | string - An ID string of the annotation which will be removed. |
|
inline |
Remove an annotation by object number from the current page. The object number can be obtained by Annot::getObjectNumber(). [Support in Server]
objNum | number - An number of the specifeid annotation which will be removed. |
|
inline |
Remove the specified graphic object.
obj | GraphicsObject - Specify the page object to be removed. |
Get page bitmap. [Support in Server]
[scale=1] | number - Rect magnification. |
[rotate] | number - Rotation Angle. Only support multiples of 90. Please refer to Rotation_Degree. |
[area] | object - Display area in user space(scaled). {x: number, y: number, width: number, height: number} |
[area.x] | number - The value of the X-axis in the upper left corner of the device coordinate system |
[area.y] | number - The value of the Y-axis in the upper left corner of the device coordinate system |
[area.width] | number - Displays the width of the bitmap |
[area.height] | number - Displays the height of the bitmap |
[contentsFlags=['page']] | string[] - Enumeration for rendering content flags. Please refer to Rendering_Content. Default: [Rendering_Content::page]. |
[usage='view'] | string - Enumeration for rendering content flags. Please refer to Rendering_Usage. Default: Rendering_Usage::view. |
|
inline |
Convert PDF device page offset to PDF page offset. [Support in Server]
offset | number[] - Device offset. |
[scale=1] | number - Indecates magnification. |
[rotate=0] | number - Rotation Angle. Only support multiples of 90. The other values default to 0. |
|
inline |
Transform PDF page point device coordinate to PDF page coordinate. [Support in Server]
point | number[] - Specifies device point coordinate |
[scale=1] | number - Indecates magnification. |
[rotate=0] | number - Rotation Angle. Only support multiples of 90. The other values default to 0. |
|
inline |
Transform PDF page device rectangle to PDF page rectangle. [Support in Server]
pdfRect | DeviceRect - Indicates PDF page device rectangle |
[scale=1] | number - Indicates magnification. |
[rotate=0] | number - Rotation Angle. Only support multiples of 90. The other values default to 0. |
|
inline |
Set the scale ratio for measuring.
storeInPage | boolean - True means the measurement data is stored in the current page, otherwise not. |
unitName | string - A label for displaying the units. Please refer to Annot_Unit_Type |
ratio | string - Measure ratio string. The string should be like: "1 inch = 1 ft",indicating that 1 inches in default user space is equivalent to 1 foot in real-world measurements. |
scale | number - Measure scale. |
|
inline |
Set the page size and triggers the DataEvents.pagesBoxChanged event after completion.
width | number - A positive number representing the new width of the page. |
height | number - A positive number representing the new height of the page. |
|
inline |
Set page rotation. [Support in Server]
rotation | number - Rotation to be set. Please refer to Rotation. |