WebPDF.AccountInstance
Methods
-
<static> getUserAccount()
-
Gets account name of current user.
Returns:
Account name of current user.
-
<static> getUserConfig()
-
Returns:
The configuration data of current user.
-
<static> getWatermarkInfo()
-
Get the information of user's watermark.
Returns:
The information of user's watermark.
- Type
- Object
-
<static> hideDefaultStamps()
-
Hide all default stamps.
-
<static> setUserAccount(userAccount)
-
Set account of current user.
Parameters:
Name Type Description userAccountString The account name of current user to be set.
-
<static> setUserConfig(cfg)
-
Set current user's configuration data.
Parameters:
Name Type Description cfgWebPDF.Config.UserData The user's configuration data.
-
<static> setUserStamps(stamps)
-
Set customized stamps.
Parameters:
Name Type Description stampsObject A json objects indecate customized stamps. This object contain 3 properties: "title" for catagory title, not null; "Stamps" defines user stamps' width, height and url.
Example
var stamps = [{ "title": "New Stamps", "stamps": [ { "icon": "http://localhost:8989/images/icons_sigbtn.png", "width":200, "height":60 } ] } ]; WebPDF.AccountInstance.setUserStamps(stamps); -
<static> setWatermarkInfo(watermarkInfo)
-
Set the user's watermark information.
Parameters:
Name Type Description watermarkInfoObject The format of the user's watermark information.
Properties
Name Type Argument Default Description rotationnumber If true, the watermark will be added; otherwise, it will not.
addboolean The rotation degrees of the watermark.
scalenumber The scaling of the watermark.
fontFamilyString The font of the watermark.
contentString The content of the watermark.
colorString | number The color of the watermark.
isDynamicboolean If true, the following will show, according to the specified settings:
IP, User Name, Open Time. Otherwise, it will only show the content inputted by user.userNameboolean If true, will show the User Name when isDynamic is true; otherwise, it will not show.
ipboolean If true, will show IP when isDynamic is true; otherwise, it will not show.
openTimeboolean If true, will show the Open Time when isDynamic is true; otherwise, will not show.
showDirectlyboolean If true, the watermark will be inserted to the document directly when the document opens. If false, the watermark floats over the document.
opacitynumber <optional>
1 0 - 1