Prints the contents of the specified window or frame using the current printing settings.

This method is part of the basic freely-distributable printing subset.

However, the acquisition of a MeadCo Publishing License means that you can customize various printing properties such as  copiesduplex, paperSizeprintBackground etc., target specific printer  or print externally-located documents with PrintHTML. See HTML Printing with ScriptX for more info. 


printing.Print([prompt[, frameOrWindow]])

Parameter Description
prompt (Bool) whether or not to prompt. Ignored in the Internet Zone unless a Publishing License is available.

(Object or String) HTML frame (within the containing page that hosts the ScriptX object) to print; either an object or the frame's (String) identifier. By default, the containing page that hosts the ScriptXobject will be printed.

Please note that for promptless printing to work in the Internet Zone a Publishing License is required. This is done to prevent anonymous Internet content invoking printing without a prompt.

Return Value

Returns false if printing with a prompt and the user cancels the printing.


Check out the source code of the ScriptX Basic, Advanced and Techie printing examples.

The following simple but complete example shows how to print the containing page:

<title>MeadCo's ScriptX: Print</title>
<!-- special style sheet for printing -->
<style media="print">
.noprint { display: none }

<body scroll="auto">

<!-- MeadCo Security Manager - using evaluation license -->
<object viewastext style="display:none"
  <param name="GUID" value="{370000ED-D40C-43D4-B3D3-F2E7D2EFF47D}
  <param name="Path" value="sxlic.mlf">
  <param name="Revision" value="0">

<!-- MeadCo ScriptX -->
<object id="factory" viewastext style="display:none"

<script defer>
function window.onload() {
  factory.printing.header = "MeadCo's ScriptX: Print"
  factory.printing.footer = "The de facto standard for advanced web-based printing"
  factory.printing.portrait = false
  idPrint.disabled = false; // enable UI button

function Print() {
  factory.printing.Print(false); // no prompt

<p>Hello, world!</p>

<div class="noprint">
<hr>The button itself will not be printed:
<input id=idPrint disabled type="button" value="Print w/o prompt" onclick="Print()">


Applies To


See Also

HTML Printing with ScriptX

bottomMargin, collate, copiesduplex, footer, header, leftMarginonafterprintonuserprintpaperSize, paperSourceportrait, printBackground, printerprintToFileName, rightMargintemplateURL, topMargin

DefaultPrinter, EnumJobs, EnumPrinters, GetJobsCount, GetMarginMeasure, IsSpooling, IsTemplateSupported, OwnQueue, PageSetupPreview, PrintPrintHTML, PrintPDF, PrintSetupPrintXMLSetMarginMeasure, SetPageRange,  WaitForSpoolingComplete