Printing a remote document with the PrintHTML() api occurs by downloading the document, loading to the print engine and then printing it.
ScriptX 8.2 and ScriptX.Services 10.2 and later provide on going support for the print system used by earlier versions of ScriptX but also provde a new print system that adds support for documents using modern standards.
For ScriptX.Add-on, the system used by default is chosen according to the document mode of the current document. ScriptX.Services always uses the new system by default.
The new system this can have a negative impact on documents relyiong on the older behaviour. This sample shows how to resolve these issues if they occur.
PrintHTMLEx() is PrintHTML() with information
This sample uses the PrintHTMLEx() API as it provides for progress callbacks. The sample uses these to show the progress in the log window. The only difference between the APIs is the addition of the callback function and callback data.
For some documents, they paginate and print in the same way independent of the implementation of the print system used and so are independent of the current document mode.
If the document to be printed employs modern html (such as rotated text) then:
For Scriptx.Add-on, the containing document should use document mode 11 (i.e. the document must use <!DOCTYPE html>
. If the containing document is not using document mode 11 then the pre v8.2/v10.2 print system will be used and the output may be wrong. This will depend upon the content and the possibly the use of a custom host of the web browser control.
For ScriptX.Services the new print system will always be used by default and the print will always be correct.
If the document to be printed was previously printed with an earlier version of ScriptX then it may require that the old print system be used in order to maintain consistent pagination and layout:
For Scriptx.Add-on, the containing document should use a document mode earlier than 11. If the containing document must use
document mode 11 then use "url4://"
as a pseudo protocol to request that the pre v8.2/v10.2 print system be used.
For ScriptX.Services use "url4://"
as a pseudo protocol to force the pre v8.2/v10.2 print system to be used.