|
FoxitPDFSDKforWeb
9.0.0
Foxit PDF SDK for Web
|
PDF page renderer. More...
Inherits Render.
Public Member Functions | |
| getAnnotRender (name) | |
| Gets annot render with specified name. More... | |
| getHandlerDOM () | |
| Get jquery object. More... | |
| getPDFDoc () | |
| Get PDF doc. More... | |
| getPDFPage () | |
| Get pdf page. More... | |
| getScale () | |
| Get page scale without PDF coordinate to Device coordinate. More... | |
| getSignaturePDFRect (id, deviceRectMap={}) | |
| getSnapshot (left, top, width, height) | |
| Capture the picture of the specified area on the page [Not support in Server] More... | |
| getWatermarkConfig () | |
| Gets the page watermark information. [Not support in Server] More... | |
| reverseDeviceRect (deviceRect) | |
| Transform device rect to PDF rect. More... | |
| setWatermarkConfig (watermarkConfig) | |
| Sets the page watermark information. [Not support in Server] More... | |
| async | transformPoint (options) |
Transforms the options.point from the specified srcType to the destType. More... | |
PDF page renderer.
|
inline |
Gets annot render with specified name.
| name | string|number - annotation name, It is recommended to use object number. |
|
inline |
Get jquery object.
|
inline |
Get PDF doc.
|
inline |
Get pdf page.
|
inline |
Get page scale without PDF coordinate to Device coordinate.
|
inline |
使用 canvas的宽高是因为: ONLINERD-10205 单叶模式下面 只渲染一个 fv__pdf-page-layout 然后 $handler 可能不可见(没有append到 fv__pdf-doc-container) 但是 canvas dom 属性是保持到
主要是为了解决 fill & sign '放置到多个页面...' 后,直接提交,未渲染页面位置不准确问题 未渲染的页面 和 已渲染的页面 page.reverseDeviceRect 传入 相同的uiRect,结果有偏差 设备坐标是和页面相关,所以 页面上 ui 坐标一样,那么设备坐标也一样
|
inline |
Capture the picture of the specified area on the page [Not support in Server]
| left | number - The X-axis offset in the upper-left corner of the page in device pixels. |
| top | number - The Y-axis offset in the upper-left corner of the page in device pixels. |
| width | number - Area width in device pixels. |
| height | number - Area width in device pixels. |
|
inline |
Gets the page watermark information. [Not support in Server]
|
inline |
|
inline |
Sets the page watermark information. [Not support in Server]
| watermarkConfig | Record<string,any>|Array<Record<string,any>> - 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. |
|
inline |
Transforms the options.point from the specified srcType to the destType.
| options | object |
| options.point | object - The user input point to be converted. |
| options.point.x | number - The x-axis coordinate value. |
| options.point.y | number - The y-axis coordinate value. |
| options.srcType | PagePointType - Indicates the source type of point. |
| options.destType | PagePointType - Indicates the target type of the coordinate point. |