|
FoxitPDFSDKforWeb
7.1.1
Foxit PDF SDK for Web
|
The class that controls PDF document rendering. More...
Inherits Render.
Public Member Functions | |
| getPDFDoc () | |
| getScale () | |
| Gets the current display multiple of the document. More... | |
| getUserPermission () | |
| Gets permissions for the view's documents It's the intersection of PDFDoc::getPermissions() and initialization parameter options.customs.getDocPermissions for the pdfviewer. More... | |
| getViewMode () | |
| Gets the current view mode instance object. More... | |
| getWatermarkConfig () | |
| Gets the document watermark information. More... | |
| goToPage (index,{x=0, y=0, width, height}={}, isPDFPoint=false) | |
| Jump to page. More... | |
| setWatermarkConfig (watermarkConfig) | |
| Sets the document watermark information. More... | |
The class that controls PDF document rendering.
|
inline |
Get the PDF document object
|
inline |
Gets the current display multiple of the document.
|
inline |
Gets permissions for the view's documents
It's the intersection of PDFDoc::getPermissions() and initialization parameter options.customs.getDocPermissions for the pdfviewer.
|
inline |
Gets the current view mode instance object.
|
inline |
Gets the document watermark information.
|
inline |
Jump to page.
| index | {number} - page index. |
| offset | {object} - The offset in the upper left corner. |
| offset.x | {number} - The X-axis offset in the upper-left corner of the page. |
| offset.y | {number} - The Y-axis offset in the upper-left corner of the page. |
| isPDFPoint | {boolean} - If true, offset is the PDF coordinate; otherwise, the device coordinate. |
|
inline |
Sets the document watermark information.
| watermarkConfig | {Object} - Page watermarking configuration. * Example: { type:"text", content:"This is a watermark", watermarkSettings:{ position:"TopLeft", offsetX:0, offsetY:0, scaleX:1, scaleY:1, rotation:45, opacity:100 }, watermarkTextProperties:{ font:"Microsoft Yahei", fontSize:20, color:"#000000", fontStyle:"normal", lineSpace:10, alignment:"center" } }; |
| watermarkConfig.type | String - Specifies watermark's type. One of following values: 1."text" represents a text type watermark. 2."image" represents the image type watermark. |
| watermarkConfig.content | {String} - Specifies watermark's type. One of following values: 1.text type:<String> Text type watermark string. 2.image type:<DataURL> Image of DataURL. |
| watermarkConfig.watermarkSettings | object - Watermark related configuration. |
| watermarkConfig.watermarkSettings.position | String - Position of watermark. Default value is "Center". Available values are listed below. 1."TopLeft":Position: top left. 2."TopCenter":Position: top center. 3."TopRight":Position: top right. 4."CenterLeft":Position center left. 5."Center":Position: center. 6."CenterRight":Position: center right. 7."BottomLeft":Position: bottom left. 8."BottomCenter":Position: bottom center. 9."BottomRight":Position: bottom right. |
| watermarkConfig.watermarkSettings.offsetX | Number - Horizontal offset.The default value is 0. |
| watermarkConfig.watermarkSettings.offsetY | Number - Vertical offset.The default value is 0. |
| watermarkConfig.watermarkSettings.scaleX | Number - Horizontal scale coefficient.The default value is 1. |
| watermarkConfig.watermarkSettings.scaleY | Number - Vertical scale coefficient.The default value is 1. |
| watermarkConfig.watermarkSettings.rotation | Number - Rotation angle in degrees.The default value is 45. |
| watermarkConfig.watermarkSettings.opacity | 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 - Unique configuration for text watermarking. |
| watermarkConfig.watermarkTextProperties.font | String - Font Name.The default value is "Microsoft Yahei". |
| watermarkConfig.watermarkTextProperties.fontSize | Number - Font size.The default value is 20. |
| watermarkConfig.watermarkTextProperties.color | String - Font color.The default value is "#000000". |
| watermarkConfig.watermarkTextProperties.fontStyle | String - The default value is "normal". Available values are listed below. 1."normal":Watermark font style: normal. 2."underline":Watermark font style: with underline. |
| watermarkConfig.watermarkTextProperties.lineSpace | Number - Line spacing.The default value is 10. |
| watermarkConfig.watermarkTextProperties.alignment | String - Alignment. The default value is "center". Available values are listed below. 1."left":Left alignment. 2."center":Center alignment. 3."right":Right alignment. |