This property determines whether JavaScript and VBScript are enabled.
By default, client-side script such as JavaScript is disabled when
rendering HTML documents.
This is done for good security reasons, and we strongly recommend
that you do not change this setting.
However, if you are sure that your source documents do not pose
a security risk, you can enable Script using this setting.
If you have a server edition of Windows (e.g. Windows
Server 2008) and are using the MSHTML engine, you may need to also
disable Enhanced Security Configuration for user running the
program/application pool to allow JavaScript execution.
Script-Accessible Functions and Properties. These
are functions and properties that script inside HTML can
access. The function signatures shown are in C#-like syntax.
You'll need to pass in the correct number of arguments.
MSHTML only |
|
window.external.ABCpdf_RenderWait – Delays ABCpdf's rendering of the HTML page. |
|
bool ABCpdf_RenderWait() |
|
Name |
Description |
return |
True if ABCpdf waits (i.e. the function succeeds), otherwise false. |
|
|
When this function is called before the page load is considered
complete, the page load is not considered complete until ABCpdf_RenderComplete
is called. This function returns false if ABCpdf_RenderComplete has been called.
This is useful if the page relies on timeout/asynchronous events (AJAX). |
MSHTML only |
|
window.external.ABCpdf_RenderComplete – Resumes ABCpdf's rendering of the HTML page. |
|
bool ABCpdf_RenderComplete()
bool ABCpdf_RenderComplete(bool force) |
|
Name |
Description |
force |
Whether ABCpdf ignores normal indications of page load completion.
The default value is false. |
return |
True if ABCpdf resumes rendering as requested (i.e. the function succeeds),
otherwise false. |
|
|
This function can be called whether ABCpdf_RenderWait
has/has not been called. If force is false, ABCpdf resumes normal rendering.
If force is true, ABCpdf starts rendering immediately, ignoring all other
indications of page load completion. This function returns false if force
is false and the function has been previously called with force true.
This is useful if the page relies on timeout/asynchronous events (AJAX). |
Gecko only |
|
window.ABCpdf_go – Specifies whether ABCpdf proceeds to render the HTML page. |
|
bool ABCpdf_go |
|
Value |
Description |
undefined (initial value), true |
ABCpdf proceeds to render the HTML page. |
false |
ABCpdf waits. |
|
|
UseScript has to be true and
OnLoadScript has to be non-empty for this
property to be effectual. ABCpdf will wait for this property to be either
undefined or true before rendering the HTML page. The whole HTML rendering
operation is still subject to the Timeout property's value.
Usually, this property is set to false in OnLoadScript and is also set
to true in an event listener added in OnLoadScript. If assignments to
this property are provided in both OnLoadScript
and the script in the web page, please refer to the notes in
OnLoadScript for the order of execution. |
|
[C#]
Doc doc = new
Doc(); doc.HtmlOptions.Engine =
EngineType.Gecko; doc.HtmlOptions.UseScript = true;
//
Render after 3 seconds doc.HtmlOptions.OnLoadScript =
"(function(){ window.ABCpdf_go = false;
setTimeout(function(){ window.ABCpdf_go = true; }, 3000);
})();";
doc.AddImageUrl("http://www.websupergoo.com"); doc.Save(Server.MapPath("wsg.pdf"));
[Visual Basic]
Dim theDoc As Doc =
New Doc()
theDoc.HtmlOptions.Engine =
EngineType.Gecko theDoc.HtmlOptions.UseScript = True
'
Render after 3 seconds theDoc.HtmlOptions.OnLoadScript =
"(function(){ window.ABCpdf_go = false;
setTimeout(function(){ window.ABCpdf_go = true; }, 3000);
})();"
theDoc.AddImageUrl("http://www.websupergoo.com") theDoc.Save(Server.MapPath("wsg.pdf")) |
|
|
|
|