Get Started
Plugins
Macros
More information
|
window.Asc.plugin.executeMethod("SetProperties", [args], callback)Description
Defines the method that allows setting the properties to the document. Usage
This method should be used in the following way: window.Asc.plugin.executeMethod("SetProperties", [obj]); Where obj is a JSON object of the following form (JSON): { "copyoutenabled" : boolean, "hideContentControlTrack " : boolean, "watermark_on_draw" : "string" } The obj object can have the following values:
Returns
The method returns the undefined value. Example
initSettings = { copyoutenabled : false, hideContentControlTrack : false, watermark_on_draw : JSON.stringify({ "transparent" : 0.3, "type" : "rect", "width" : 100, "height" : 100, "rotate" : -45, "margins" : [ 10, 10, 10, 10 ], "fill" : [255, 0, 0], "stroke-width" : 1, "stroke" : [0, 0, 255], "align" : 1, "paragraphs" : [ { "align" : 2, "fill" : [255, 0, 0], "linespacing" : 1, "runs" : [ { "text" : "Do not steal, %user_name%!", "fill" : [0, 0, 0], "font-family" : "Arial", "font-size" : 40, "bold" : true, "italic" : false, "strikeout" : false, "underline" : false }, { "text" : "<%br%>" } ] } ] }) }; window.Asc.plugin.executeMethod("SetProperties", [initSettings]); |