Licensed Use :: Using WaitForSpoolingComplete with ScriptX.Addon

Activity log  ::  

Asynchronous Printing

Please note that this page licensed. Restart sample with license

All printing with ScriptX is asynchronous.

Each of the functions Print, PrintHTML and BatchPrintPDF will return immediately after the print request has been started and/or queued with the print occuring on a different thread to the Internet Exploer UI thread. Internet Explorer remains responsive and so the user can close the tab/window while the print is in progress.

However, the owning tab/window must not be closed until the print spooling (sending the data to the printer driver) has been completed. If the tab/window is closed, the print must be abandoned.

If the user tries to close the tab/window while printing is in progress or pending ScriptX will wait 5 seconds for the print to complete. If the print completes, the action then occurs. If the print does not complete in that time ScriptX will display a warning and the user is asked to confirm that the print(s) should be abandoned. If not, the close action is abandoned instead and printing the current document and any queued documents will continue.

The OwnQueue Exception

The exception to the above is when the OwnQueue() function has been called and PrintHtml() or PrintHtmlEx() are used to print. In this case, the printing occurs in a completely separate process and the owner tab/window can be closed and no warning will occur.

Tests should be undertaken with the printer in 'direct' mode (i.e. not spooling) this causes the print to be slower and effects more pronounced.
Default behaviour

These actions illustrate the behaviour of ScriptX printing the current document (i.e. the ubiquitous factory.printing.Print() api) or a remote document (i.e. the factory.printing.PrintHTML() api) without any script code to wait for printing to complete.

Navigate now

WaitForSpoolingComplete

The WaitForSpoolingComplete function enables synchronous javascript code to be written so that actions can be taken safely once all printing has completed. For example; navigate to another page or close the current window.

Note that this is different to changing a document before and after printing. The browser onbeforeprint and onafterprint events should be used for that.

The WaitforSpoolingComplete() function requires a license.

Restart sample with license


Some content to force a longer render time.

New Enterprise improvements coming to IE11 on Windows 7 and 8.1

In Windows 10 version 1511, we announced a number of improvements to our collection of Enterprise Mode tools, designed to help customers upgrade more easily to Internet Explorer 11. These tools include a new v.2 Enterprise Mode XML schema, which is designed to be simpler, cleaner, more scalable, and to help ease list management. We also updated the Enterprise Mode Site List Manager tool, allowing you to import an existing v.1 XML file and automatically convert it to the v.2 XML schema. We added support for HTTP ports, and also introduced a new about:compat page in Microsoft Edge and Internet Explorer 11 to help customers better manage their Enterprise Mode Site List.

To provide a stable environment where compatibility is a top priority, our goal is to keep Internet Explorer 11 consistent, no matter what device or platform you use it on. Today, we are excited to announce that many of these improvements are now available for Internet Explorer 11 on Windows 7, Windows 8.1 and Windows 10 (version 1507). These improvements are included in today’s cumulative updates to Windows.

Read more at Edge Dev Blog

Turn on Enterprise Mode and use a site list

From: Microsft Technet

Applies to:

Before you can use a site list with Enterprise Mode, you need to turn the functionality on and set up the system for centralized control. By allowing centralized control, you can create one global list of websites that render using Enterprise Mode. Approximately 65 seconds after Internet Explorer 11 starts, it looks for a properly formatted site list. If a new site list if found, with a different version number than the active list, IE11 loads and uses the newer version. After the initial check, IE11 won’t look for an updated list again until you restart the browser.

Note
We recommend that you store and download your website list from a secure web sever (https://), to help protect against data tampering. After the list is downloaded, it's stored locally on your employee’s computers so if the centralized file location is unavailable, they can still use Enterprise Mode.

To turn on Enterprise Mode using Group Policy

  1. Open your Group Policy editor and go to the Administrative Templates\Windows Components\Internet Explorer\Use the Enterprise Mode IE website list setting.

    Turning this setting on also requires you to create and store a site list. For more information about creating your site list, see the Use the Enterprise Mode Site List Manager topics.

    local group policy editor for using a site list

  2. Click Enabled, and then in the Options area, type the location to your site list.

    To turn on Enterprise Mode using the registry

  3. For only the local user: Open a registry editor, like regedit.exe and go to HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Main\EnterpriseMode.

    -OR-

    For all users on the device: Open a registry editor, like regedit.exe and go to HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Internet Explorer\Main\EnterpriseMode.

  4. Edit the SiteList registry key to point to where you want to keep your Enterprise Mode site list file. For example:

    enterprise mode with site list in the registry

    • HTTP location: "SiteList"="http://localhost:8080/sites.xml"

    • Local network:"SiteList"="\\network\shares\sites.xml"

    • Local file:"SiteList"="file:///c:\\Users\\<user>\\Documents\\testList.xml"

    All of your managed devices must have access to this location if you want them to be able to access and use Enterprise Mode and your site list. For information about how to create and use an Enterprise Mode site list, see Use the Enterprise Mode Site List Manager.

Turn on Enterprise Mode and use a site list

From: Microsft Technet

Applies to:

Before you can use a site list with Enterprise Mode, you need to turn the functionality on and set up the system for centralized control. By allowing centralized control, you can create one global list of websites that render using Enterprise Mode. Approximately 65 seconds after Internet Explorer 11 starts, it looks for a properly formatted site list. If a new site list if found, with a different version number than the active list, IE11 loads and uses the newer version. After the initial check, IE11 won’t look for an updated list again until you restart the browser.

Note
We recommend that you store and download your website list from a secure web sever (https://), to help protect against data tampering. After the list is downloaded, it's stored locally on your employee’s computers so if the centralized file location is unavailable, they can still use Enterprise Mode.

To turn on Enterprise Mode using Group Policy

  1. Open your Group Policy editor and go to the Administrative Templates\Windows Components\Internet Explorer\Use the Enterprise Mode IE website list setting.

    Turning this setting on also requires you to create and store a site list. For more information about creating your site list, see the Use the Enterprise Mode Site List Manager topics.

    local group policy editor for using a site list

  2. Click Enabled, and then in the Options area, type the location to your site list.

    To turn on Enterprise Mode using the registry

  3. For only the local user: Open a registry editor, like regedit.exe and go to HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Main\EnterpriseMode.

    -OR-

    For all users on the device: Open a registry editor, like regedit.exe and go to HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Internet Explorer\Main\EnterpriseMode.

  4. Edit the SiteList registry key to point to where you want to keep your Enterprise Mode site list file. For example:

    enterprise mode with site list in the registry

    • HTTP location: "SiteList"="http://localhost:8080/sites.xml"

    • Local network:"SiteList"="\\network\shares\sites.xml"

    • Local file:"SiteList"="file:///c:\\Users\\<user>\\Documents\\testList.xml"

    All of your managed devices must have access to this location if you want them to be able to access and use Enterprise Mode and your site list. For information about how to create and use an Enterprise Mode site list, see Use the Enterprise Mode Site List Manager.

Turn on Enterprise Mode and use a site list

From: Microsft Technet

Applies to:

Before you can use a site list with Enterprise Mode, you need to turn the functionality on and set up the system for centralized control. By allowing centralized control, you can create one global list of websites that render using Enterprise Mode. Approximately 65 seconds after Internet Explorer 11 starts, it looks for a properly formatted site list. If a new site list if found, with a different version number than the active list, IE11 loads and uses the newer version. After the initial check, IE11 won’t look for an updated list again until you restart the browser.

Note
We recommend that you store and download your website list from a secure web sever (https://), to help protect against data tampering. After the list is downloaded, it's stored locally on your employee’s computers so if the centralized file location is unavailable, they can still use Enterprise Mode.

To turn on Enterprise Mode using Group Policy

  1. Open your Group Policy editor and go to the Administrative Templates\Windows Components\Internet Explorer\Use the Enterprise Mode IE website list setting.

    Turning this setting on also requires you to create and store a site list. For more information about creating your site list, see the Use the Enterprise Mode Site List Manager topics.

    local group policy editor for using a site list

  2. Click Enabled, and then in the Options area, type the location to your site list.

    To turn on Enterprise Mode using the registry

  3. For only the local user: Open a registry editor, like regedit.exe and go to HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Main\EnterpriseMode.

    -OR-

    For all users on the device: Open a registry editor, like regedit.exe and go to HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Internet Explorer\Main\EnterpriseMode.

  4. Edit the SiteList registry key to point to where you want to keep your Enterprise Mode site list file. For example:

    enterprise mode with site list in the registry

    • HTTP location: "SiteList"="http://localhost:8080/sites.xml"

    • Local network:"SiteList"="\\network\shares\sites.xml"

    • Local file:"SiteList"="file:///c:\\Users\\<user>\\Documents\\testList.xml"

    All of your managed devices must have access to this location if you want them to be able to access and use Enterprise Mode and your site list. For information about how to create and use an Enterprise Mode site list, see Use the Enterprise Mode Site List Manager.

Turn on Enterprise Mode and use a site list

From: Microsft Technet

Applies to:

Before you can use a site list with Enterprise Mode, you need to turn the functionality on and set up the system for centralized control. By allowing centralized control, you can create one global list of websites that render using Enterprise Mode. Approximately 65 seconds after Internet Explorer 11 starts, it looks for a properly formatted site list. If a new site list if found, with a different version number than the active list, IE11 loads and uses the newer version. After the initial check, IE11 won’t look for an updated list again until you restart the browser.

Note
We recommend that you store and download your website list from a secure web sever (https://), to help protect against data tampering. After the list is downloaded, it's stored locally on your employee’s computers so if the centralized file location is unavailable, they can still use Enterprise Mode.

To turn on Enterprise Mode using Group Policy

  1. Open your Group Policy editor and go to the Administrative Templates\Windows Components\Internet Explorer\Use the Enterprise Mode IE website list setting.

    Turning this setting on also requires you to create and store a site list. For more information about creating your site list, see the Use the Enterprise Mode Site List Manager topics.

    local group policy editor for using a site list

  2. Click Enabled, and then in the Options area, type the location to your site list.

    To turn on Enterprise Mode using the registry

  3. For only the local user: Open a registry editor, like regedit.exe and go to HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Main\EnterpriseMode.

    -OR-

    For all users on the device: Open a registry editor, like regedit.exe and go to HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Internet Explorer\Main\EnterpriseMode.

  4. Edit the SiteList registry key to point to where you want to keep your Enterprise Mode site list file. For example:

    enterprise mode with site list in the registry

    • HTTP location: "SiteList"="http://localhost:8080/sites.xml"

    • Local network:"SiteList"="\\network\shares\sites.xml"

    • Local file:"SiteList"="file:///c:\\Users\\<user>\\Documents\\testList.xml"

    All of your managed devices must have access to this location if you want them to be able to access and use Enterprise Mode and your site list. For information about how to create and use an Enterprise Mode site list, see Use the Enterprise Mode Site List Manager.

Turn on Enterprise Mode and use a site list

From: Microsft Technet

Applies to:

Before you can use a site list with Enterprise Mode, you need to turn the functionality on and set up the system for centralized control. By allowing centralized control, you can create one global list of websites that render using Enterprise Mode. Approximately 65 seconds after Internet Explorer 11 starts, it looks for a properly formatted site list. If a new site list if found, with a different version number than the active list, IE11 loads and uses the newer version. After the initial check, IE11 won’t look for an updated list again until you restart the browser.

Note
We recommend that you store and download your website list from a secure web sever (https://), to help protect against data tampering. After the list is downloaded, it's stored locally on your employee’s computers so if the centralized file location is unavailable, they can still use Enterprise Mode.

To turn on Enterprise Mode using Group Policy

  1. Open your Group Policy editor and go to the Administrative Templates\Windows Components\Internet Explorer\Use the Enterprise Mode IE website list setting.

    Turning this setting on also requires you to create and store a site list. For more information about creating your site list, see the Use the Enterprise Mode Site List Manager topics.

    local group policy editor for using a site list

  2. Click Enabled, and then in the Options area, type the location to your site list.

    To turn on Enterprise Mode using the registry

  3. For only the local user: Open a registry editor, like regedit.exe and go to HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Main\EnterpriseMode.

    -OR-

    For all users on the device: Open a registry editor, like regedit.exe and go to HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Internet Explorer\Main\EnterpriseMode.

  4. Edit the SiteList registry key to point to where you want to keep your Enterprise Mode site list file. For example:

    enterprise mode with site list in the registry

    • HTTP location: "SiteList"="http://localhost:8080/sites.xml"

    • Local network:"SiteList"="\\network\shares\sites.xml"

    • Local file:"SiteList"="file:///c:\\Users\\<user>\\Documents\\testList.xml"

    All of your managed devices must have access to this location if you want them to be able to access and use Enterprise Mode and your site list. For information about how to create and use an Enterprise Mode site list, see Use the Enterprise Mode Site List Manager.