maxGraph/docs/js-api/files/view/mxPrintPreview-js.html

151 lines
62 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><title>mxPrintPreview</title><link rel="stylesheet" type="text/css" href="../../styles/main.css"><script language=JavaScript src="../../javascript/main.js"></script><script language=JavaScript src="../../javascript/prettify.js"></script><script language=JavaScript src="../../javascript/searchdata.js"></script></head><body class="ContentPage" onLoad="NDOnLoad();prettyPrint();"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
<!-- Generated by Natural Docs, version 1.5 -->
<!-- http://www.naturaldocs.org -->
<!-- saved from url=(0026)http://www.naturaldocs.org -->
<div id=Content><div class="CClass"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="mxPrintPreview"></a>mxPrintPreview</h1><div class=CBody><p>Implements printing of a diagram across multiple pages.&nbsp; The following opens a print preview for an existing graph:</p><blockquote><pre class="prettyprint">var preview = new mxPrintPreview(graph);
preview.open();</pre></blockquote><p>Use <a href="../util/mxUtils-js.html#mxUtils.getScaleForPageCount" class=LFunction id=link30 onMouseOver="ShowTip(event, 'tt29', 'link30')" onMouseOut="HideTip('tt29')">mxUtils.getScaleForPageCount</a> as follows in order to print the graph across a given number of pages:</p><blockquote><pre class="prettyprint">var pageCount = mxUtils.prompt('Enter page count', '1');
if (pageCount != null)
{
var scale = mxUtils.getScaleForPageCount(pageCount, graph);
var preview = new mxPrintPreview(graph, scale);
preview.open();
}</pre></blockquote><h4 class=CHeading>Additional pages</h4><p>To add additional pages before and after the output, <a href="#mxPrintPreview.getCoverPages" class=LFunction id=link31 onMouseOver="ShowTip(event, 'tt25', 'link31')" onMouseOut="HideTip('tt25')">getCoverPages</a> and <a href="#mxPrintPreview.getAppendices" class=LFunction id=link32 onMouseOver="ShowTip(event, 'tt26', 'link32')" onMouseOut="HideTip('tt26')">getAppendices</a> can be used, respectively.</p><blockquote><pre class="prettyprint">var preview = new mxPrintPreview(graph, 1);
preview.getCoverPages = function(w, h)
{
return [this.renderPage(w, h, mxUtils.bind(this, function(div)
{
div.innerHTML = '&lt;div style=&quot;position:relative;margin:4px;&quot;&gt;Cover Page&lt;/p&gt;'
}))];
}
preview.getAppendices = function(w, h)
{
return [this.renderPage(w, h, mxUtils.bind(this, function(div)
{
div.innerHTML = '&lt;div style=&quot;position:relative;margin:4px;&quot;&gt;Appendix&lt;/p&gt;'
}))];
}
preview.open();</pre></blockquote><h4 class=CHeading>CSS</h4><p>The CSS from the original page is not carried over to the print preview.&nbsp; To add CSS to the page, use the css argument in the <a href="#mxPrintPreview.open" class=LFunction id=link33 onMouseOver="ShowTip(event, 'tt18', 'link33')" onMouseOut="HideTip('tt18')">open</a> function or override <a href="#mxPrintPreview.writeHead" class=LFunction id=link34 onMouseOver="ShowTip(event, 'tt19', 'link34')" onMouseOut="HideTip('tt19')">writeHead</a> to add the respective link tags as follows:</p><blockquote><pre class="prettyprint">var writeHead = preview.writeHead;
preview.writeHead = function(doc, css)
{
writeHead.apply(this, arguments);
doc.writeln('&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;style.css&quot;&gt;');
};</pre></blockquote><h4 class=CHeading>Headers</h4><p>Apart from setting the title argument in the mxPrintPreview constructor you can override <a href="#mxPrintPreview.renderPage" class=LFunction id=link35 onMouseOver="ShowTip(event, 'tt21', 'link35')" onMouseOut="HideTip('tt21')">renderPage</a> as follows to add a header to any page:</p><blockquote><pre class="prettyprint">var oldRenderPage = mxPrintPreview.prototype.renderPage;
mxPrintPreview.prototype.renderPage = function(w, h)
{
var div = oldRenderPage.apply(this, arguments);
var header = document.createElement('div');
header.style.position = 'absolute';
header.style.top = '0px';
header.style.width = '100%';
header.style.textAlign = 'right';
mxUtils.write(header, 'Your header here');
div.firstChild.appendChild(header);
return div;
};</pre></blockquote><p>For adding page numbers to the graph output pages, implement a counter in the above code or override <a href="#mxPrintPreview.addGraphFragment" class=LFunction id=link36 onMouseOver="ShowTip(event, 'tt23', 'link36')" onMouseOut="HideTip('tt23')">addGraphFragment</a> instead, where div corresponds to div.firstChild in the above code.</p><h4 class=CHeading>Page Format</h4><p>For landscape printing, use &lt;mxConstants.PAGE_FORMAT_A4_LANDSCAPE&gt; as the pageFormat in <a href="../util/mxUtils-js.html#mxUtils.getScaleForPageCount" class=LFunction id=link37 onMouseOver="ShowTip(event, 'tt29', 'link37')" onMouseOut="HideTip('tt29')">mxUtils.getScaleForPageCount</a> and <a href="#mxPrintPreview.mxPrintPreview" class=LFunction id=link38 onMouseOver="ShowTip(event, 'tt1', 'link38')" onMouseOut="HideTip('tt1')">mxPrintPreview</a>.&nbsp; Keep in mind that one can not set the defaults for the print dialog of the operating system from JavaScript so the user must manually choose a page format that matches this setting.</p><p>You can try passing the following CSS directive to <a href="#mxPrintPreview.open" class=LFunction id=link39 onMouseOver="ShowTip(event, 'tt18', 'link39')" onMouseOut="HideTip('tt18')">open</a> to set the page format in the print dialog to landscape.&nbsp; However, this CSS directive seems to be ignored in most major browsers, including IE.</p><blockquote><pre class="prettyprint">@page {
size: landscape;
}</pre></blockquote><p>Note that the print preview behaves differently in IE when used from the filesystem or via HTTP so printing should always be tested via HTTP.</p><p>If you are using a DOCTYPE in the source page you can override &lt;getDoctype&gt; and provide the same DOCTYPE for the print preview if required.&nbsp; Here is an example for IE8 standards mode.</p><blockquote><pre class="prettyprint">var preview = new mxPrintPreview(graph);
preview.getDoctype = function()
{
return '&lt;!--[if IE]&gt;&lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=5,IE=8&quot; &gt;&lt;![endif]--&gt;';
};
preview.open();</pre></blockquote><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#mxPrintPreview" >mxPrintPreview</a></td><td class=SDescription>Implements printing of a diagram across multiple pages. </td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#mxPrintPreview.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#mxPrintPreview.mxPrintPreview" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">mxPrintPreview</a></td><td class=SDescription>Constructs a new print preview for the given parameters.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#mxPrintPreview.Variables" >Variables</a></td><td class=SDescription></td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#mxPrintPreview.graph" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">graph</a></td><td class=SDescription>Reference to the <a href="mxGraph-js.html#mxGraph" class=LClass id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">mxGraph</a> that should be previewed.</td></tr><tr class="SVariable SIndent2"><td class=SEntry><a href="#mxPrintPreview.pageFormat" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">pageFormat</a></td><td class=SDescription>Holds the <a href="../util/mxRectangle-js.html#mxRectangle" class=LClass id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">mxRectangle</a> that defines the page format.</td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#mxPrintPreview.scale" id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')">scale</a></td><td class=SDescription>Holds the scale of the print preview.</td></tr><tr class="SVariable SIndent2"><td class=SEntry><a href="#mxPrintPreview.border" id=link7 onMouseOver="ShowTip(event, 'tt7', 'link7')" onMouseOut="HideTip('tt7')">border</a></td><td class=SDescription>The border inset around each side of every page in the preview. </td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#mxPrintPreview.y0" id=link8 onMouseOver="ShowTip(event, 'tt8', 'link8')" onMouseOut="HideTip('tt8')">y0</a></td><td class=SDescription>Holds the vertical offset of the output.</td></tr><tr class="SVariable SIndent2"><td class=SEntry><a href="#mxPrintPreview.autoOrigin" id=link9 onMouseOver="ShowTip(event, 'tt9', 'link9')" onMouseOut="HideTip('tt9')">autoOrigin</a></td><td class=SDescription>Specifies if the origin should be automatically computed based on the top, left corner of the actual diagram contents. </td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#mxPrintPreview.printOverlays" id=link10 onMouseOver="ShowTip(event, 'tt10', 'link10')" onMouseOut="HideTip('tt10')">printOverlays</a></td><td class=SDescription>Specifies if overlays should be printed. </td></tr><tr class="SVariable SIndent2"><td class=SEntry><a href="#mxPrintPreview.printBackgroundImage" id=link11 onMouseOver="ShowTip(event, 'tt11', 'link11')" onMouseOut="HideTip('tt11')">printBackgroundImage</a></td><td class=SDescription>Specifies if the background image should be printed. </td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#mxPrintPreview.borderColor" id=link12 onMouseOver="ShowTip(event, 'tt12', 'link12')" onMouseOut="HideTip('tt12')">borderColor</a></td><td class=SDescription>Holds the color value for the page border.</td></tr><tr class="SVariable SIndent2"><td class=SEntry><a href="#mxPrintPreview.title" id=link13 onMouseOver="ShowTip(event, 'tt13', 'link13')" onMouseOut="HideTip('tt13')">title</a></td><td class=SDescription>Holds the title of the preview window.</td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#mxPrintPreview.pageSelector" id=link14 onMouseOver="ShowTip(event, 'tt14', 'link14')" onMouseOut="HideTip('tt14')">pageSelector</a></td><td class=SDescription>Boolean that specifies if the page selector should be displayed. </td></tr><tr class="SVariable SIndent2"><td class=SEntry><a href="#mxPrintPreview.wnd" id=link15 onMouseOver="ShowTip(event, 'tt15', 'link15')" onMouseOut="HideTip('tt15')">wnd</a></td><td class=SDescription>Reference to the preview window.</td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#mxPrintPreview.pageCount" id=link16 onMouseOver="ShowTip(event, 'tt16', 'link16')" onMouseOut="HideTip('tt16')">pageCount</a></td><td class=SDescription>Holds the actual number of pages in the preview.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#mxPrintPreview.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#mxPrintPreview.getWindow" id=link17 onMouseOver="ShowTip(event, 'tt17', 'link17')" onMouseOut="HideTip('tt17')">getWindow</a></td><td class=SDescription>Returns <a href="#mxPrintPreview.wnd" class=LVariable id=link18 onMouseOver="ShowTip(event, 'tt15', 'link18')" onMouseOut="HideTip('tt15')">wnd</a>.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#mxPrintPreview.getDocType" >getDocType</a></td><td class=SDescription>Returns the string that should go before the HTML tag in the print preview page. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#mxPrintPreview.open" id=link19 onMouseOver="ShowTip(event, 'tt18', 'link19')" onMouseOut="HideTip('tt18')">open</a></td><td class=SDescription>Shows the print preview window. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#mxPrintPreview.writeHead" id=link20 onMouseOver="ShowTip(event, 'tt19', 'link20')" onMouseOut="HideTip('tt19')">writeHead</a></td><td class=SDescription>Writes the HEAD section into the given document, without the opening and closing HEAD tags.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#mxPrintPreview.createPageSelector" id=link21 onMouseOver="ShowTip(event, 'tt20', 'link21')" onMouseOut="HideTip('tt20')">createPageSelector</a></td><td class=SDescription>Creates the page selector table.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#mxPrintPreview.renderPage" id=link22 onMouseOver="ShowTip(event, 'tt21', 'link22')" onMouseOut="HideTip('tt21')">renderPage</a></td><td class=SDescription>Creates a DIV that prints a single page of the given graph using the given scale and returns the DIV that represents the page.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#mxPrintPreview.getRoot" id=link23 onMouseOver="ShowTip(event, 'tt22', 'link23')" onMouseOut="HideTip('tt22')">getRoot</a></td><td class=SDescription>Returns the root cell for painting the graph.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#mxPrintPreview.addGraphFragment" id=link24 onMouseOver="ShowTip(event, 'tt23', 'link24')" onMouseOut="HideTip('tt23')">addGraphFragment</a></td><td class=SDescription>Adds a graph fragment to the given div.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#mxPrintPreview.insertBackgroundImage" id=link25 onMouseOver="ShowTip(event, 'tt24', 'link25')" onMouseOut="HideTip('tt24')">insertBackgroundImage</a></td><td class=SDescription>Inserts the background image into the given div.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#mxPrintPreview.getCoverPages" id=link26 onMouseOver="ShowTip(event, 'tt25', 'link26')" onMouseOut="HideTip('tt25')">getCoverPages</a></td><td class=SDescription>Returns the pages to be added before the print output. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#mxPrintPreview.getAppendices" id=link27 onMouseOver="ShowTip(event, 'tt26', 'link27')" onMouseOut="HideTip('tt26')">getAppendices</a></td><td class=SDescription>Returns the pages to be added after the print output. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#mxPrintPreview.print" id=link28 onMouseOver="ShowTip(event, 'tt27', 'link28')" onMouseOut="HideTip('tt27')">print</a></td><td class=SDescription>Opens the print preview and shows the print dialog.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#mxPrintPreview.close" id=link29 onMouseOver="ShowTip(event, 'tt28', 'link29')" onMouseOut="HideTip('tt28')">close</a></td><td class=SDescription>Closes the print preview window.</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.Functions"></a>Functions</h3></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.mxPrintPreview"></a>mxPrintPreview</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function mxPrintPreview(</td><td class=PParameter nowrap>graph,</td></tr><tr><td></td><td class=PParameter nowrap>scale,</td></tr><tr><td></td><td class=PParameter nowrap>pageFormat,</td></tr><tr><td></td><td class=PParameter nowrap>border,</td></tr><tr><td></td><td class=PParameter nowrap>x0,</td></tr><tr><td></td><td class=PParameter nowrap>y0,</td></tr><tr><td></td><td class=PParameter nowrap>borderColor,</td></tr><tr><td></td><td class=PParameter nowrap>title,</td></tr><tr><td></td><td class=PParameter nowrap>pageSelector</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Constructs a new print preview for the given parameters.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>graph</td><td class=CDLDescription><a href="mxGraph-js.html#mxGraph" class=LClass id=link40 onMouseOver="ShowTip(event, 'tt3', 'link40')" onMouseOut="HideTip('tt3')">mxGraph</a> to be previewed.</td></tr><tr><td class=CDLEntry>scale</td><td class=CDLDescription>Optional scale of the output.&nbsp; Default is 1 / <a href="mxGraph-js.html#mxGraph.pageScale" class=LVariable id=link41 onMouseOver="ShowTip(event, 'tt30', 'link41')" onMouseOut="HideTip('tt30')">mxGraph.pageScale</a>.</td></tr><tr><td class=CDLEntry>border</td><td class=CDLDescription>Border in pixels along each side of every page.&nbsp; Note that the actual print function in the browser will add another border for printing.</td></tr><tr><td class=CDLEntry>pageFormat</td><td class=CDLDescription><a href="../util/mxRectangle-js.html#mxRectangle" class=LClass id=link42 onMouseOver="ShowTip(event, 'tt5', 'link42')" onMouseOut="HideTip('tt5')">mxRectangle</a> that specifies the page format (in pixels).&nbsp; This should match the page format of the printer.&nbsp; Default uses the <a href="mxGraph-js.html#mxGraph.pageFormat" class=LVariable id=link43 onMouseOver="ShowTip(event, 'tt31', 'link43')" onMouseOut="HideTip('tt31')">mxGraph.pageFormat</a> of the given graph.</td></tr><tr><td class=CDLEntry>x0</td><td class=CDLDescription>Optional left offset of the output.&nbsp; Default is 0.</td></tr><tr><td class=CDLEntry>y0</td><td class=CDLDescription>Optional top offset of the output.&nbsp; Default is 0.</td></tr><tr><td class=CDLEntry>borderColor</td><td class=CDLDescription>Optional color of the page border.&nbsp; Default is no border.&nbsp; Note that a border is sometimes useful to highlight the printed page border in the print preview of the browser.</td></tr><tr><td class=CDLEntry>title</td><td class=CDLDescription>Optional string that is used for the window title.&nbsp; Default is &lsquo;Printer-friendly version&rsquo;.</td></tr><tr><td class=CDLEntry>pageSelector</td><td class=CDLDescription>Optional boolean that specifies if the page selector should appear in the window with the print preview.&nbsp; Default is true.</td></tr></table></div></div></div>
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.Variables"></a>Variables</h3></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.graph"></a>graph</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.graph</td></tr></table></blockquote><p>Reference to the <a href="mxGraph-js.html#mxGraph" class=LClass id=link44 onMouseOver="ShowTip(event, 'tt3', 'link44')" onMouseOut="HideTip('tt3')">mxGraph</a> that should be previewed.</p></div></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.pageFormat"></a>pageFormat</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.pageFormat</td></tr></table></blockquote><p>Holds the <a href="../util/mxRectangle-js.html#mxRectangle" class=LClass id=link45 onMouseOver="ShowTip(event, 'tt5', 'link45')" onMouseOut="HideTip('tt5')">mxRectangle</a> that defines the page format.</p></div></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.scale"></a>scale</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.scale</td></tr></table></blockquote><p>Holds the scale of the print preview.</p></div></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.border"></a>border</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.border</td></tr></table></blockquote><p>The border inset around each side of every page in the preview.&nbsp; This is set to 0 if autoOrigin is false.</p></div></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.y0"></a>y0</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.y0</td></tr></table></blockquote><p>Holds the vertical offset of the output.</p></div></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.autoOrigin"></a>autoOrigin</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.autoOrigin</td></tr></table></blockquote><p>Specifies if the origin should be automatically computed based on the top, left corner of the actual diagram contents.&nbsp; If this is set to false then the values for &lt;x0&gt; and <a href="#mxPrintPreview.y0" class=LVariable id=link46 onMouseOver="ShowTip(event, 'tt8', 'link46')" onMouseOut="HideTip('tt8')">y0</a> will be overridden in <a href="#mxPrintPreview.open" class=LFunction id=link47 onMouseOver="ShowTip(event, 'tt18', 'link47')" onMouseOut="HideTip('tt18')">open</a>.&nbsp; Default is true.</p></div></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.printOverlays"></a>printOverlays</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.printOverlays</td></tr></table></blockquote><p>Specifies if overlays should be printed.&nbsp; Default is false.</p></div></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.printBackgroundImage"></a>printBackgroundImage</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.printBackgroundImage</td></tr></table></blockquote><p>Specifies if the background image should be printed.&nbsp; Default is false.</p></div></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.borderColor"></a>borderColor</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.borderColor</td></tr></table></blockquote><p>Holds the color value for the page border.</p></div></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.title"></a>title</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.title</td></tr></table></blockquote><p>Holds the title of the preview window.</p></div></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.pageSelector"></a>pageSelector</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.pageSelector</td></tr></table></blockquote><p>Boolean that specifies if the page selector should be displayed.&nbsp; Default is true.</p></div></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.wnd"></a>wnd</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.wnd</td></tr></table></blockquote><p>Reference to the preview window.</p></div></div></div>
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.pageCount"></a>pageCount</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.pageCount</td></tr></table></blockquote><p>Holds the actual number of pages in the preview.</p></div></div></div>
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.Functions"></a>Functions</h3></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.getWindow"></a>getWindow</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.getWindow = function()</td></tr></table></blockquote><p>Returns <a href="#mxPrintPreview.wnd" class=LVariable id=link48 onMouseOver="ShowTip(event, 'tt15', 'link48')" onMouseOut="HideTip('tt15')">wnd</a>.</p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.getDocType"></a>getDocType</h3><div class=CBody><p>Returns the string that should go before the HTML tag in the print preview page.&nbsp; This implementation returns an X-UA meta tag for IE5 in quirks mode, IE8 in IE8 standards mode and edge in IE9 standards mode.</p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.open"></a>open</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxPrintPreview.prototype.open = function(</td><td class=PParameter nowrap>css</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Shows the print preview window.&nbsp; The window is created here if it does not exist.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>css</td><td class=CDLDescription>Optional CSS string to be used in the head section.</td></tr></table></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.writeHead"></a>writeHead</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxPrintPreview.prototype.writeHead = function(</td><td class=PParameter nowrap>doc,</td></tr><tr><td></td><td class=PParameter nowrap>css</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Writes the HEAD section into the given document, without the opening and closing HEAD tags.</p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.createPageSelector"></a>createPageSelector</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxPrintPreview.prototype.createPageSelector = function(</td><td class=PParameter nowrap>vpages,</td></tr><tr><td></td><td class=PParameter nowrap>hpages</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates the page selector table.</p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.renderPage"></a>renderPage</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxPrintPreview.prototype.renderPage = function(</td><td class=PParameter nowrap>w,</td></tr><tr><td></td><td class=PParameter nowrap>h,</td></tr><tr><td></td><td class=PParameter nowrap>dx,</td></tr><tr><td></td><td class=PParameter nowrap>dy,</td></tr><tr><td></td><td class=PParameter nowrap>content</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates a DIV that prints a single page of the given graph using the given scale and returns the DIV that represents the page.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>w</td><td class=CDLDescription>Width of the page in pixels.</td></tr><tr><td class=CDLEntry>h</td><td class=CDLDescription>Height of the page in pixels.</td></tr><tr><td class=CDLEntry>content</td><td class=CDLDescription>Callback that adds the HTML content to the inner div of a page.&nbsp; Takes the inner div as the argument.</td></tr></table></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.getRoot"></a>getRoot</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.getRoot = function()</td></tr></table></blockquote><p>Returns the root cell for painting the graph.</p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.addGraphFragment"></a>addGraphFragment</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxPrintPreview.prototype.addGraphFragment = function(</td><td class=PParameter nowrap>dx,</td></tr><tr><td></td><td class=PParameter nowrap>dy,</td></tr><tr><td></td><td class=PParameter nowrap>scale,</td></tr><tr><td></td><td class=PParameter nowrap>pageNumber,</td></tr><tr><td></td><td class=PParameter nowrap>div</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Adds a graph fragment to the given div.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>dx</td><td class=CDLDescription>Horizontal translation for the diagram.</td></tr><tr><td class=CDLEntry>dy</td><td class=CDLDescription>Vertical translation for the diagram.</td></tr><tr><td class=CDLEntry>scale</td><td class=CDLDescription>Scale for the diagram.</td></tr><tr><td class=CDLEntry>pageNumber</td><td class=CDLDescription>Number of the page to be rendered.</td></tr><tr><td class=CDLEntry>div</td><td class=CDLDescription>Div that contains the output.</td></tr></table></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.insertBackgroundImage"></a>insertBackgroundImage</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxPrintPreview.prototype.insertBackgroundImage = function(</td><td class=PParameter nowrap>div,</td></tr><tr><td></td><td class=PParameter nowrap>dx,</td></tr><tr><td></td><td class=PParameter nowrap>dy</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Inserts the background image into the given div.</p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.getCoverPages"></a>getCoverPages</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.getCoverPages = function()</td></tr></table></blockquote><p>Returns the pages to be added before the print output.&nbsp; This returns null.</p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.getAppendices"></a>getAppendices</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.getAppendices = function()</td></tr></table></blockquote><p>Returns the pages to be added after the print output.&nbsp; This returns null.</p></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.print"></a>print</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxPrintPreview.prototype.print = function(</td><td class=PParameter nowrap>css</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Opens the print preview and shows the print dialog.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>css</td><td class=CDLDescription>Optional CSS string to be used in the head section.</td></tr></table></div></div></div>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxPrintPreview.close"></a>close</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.close = function()</td></tr></table></blockquote><p>Closes the print preview window.</p></div></div></div>
</div><!--Content-->
<div id=Footer><a href="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->
<div id=Menu><div class=MEntry><div class=MFile><a href="../index-txt.html">API Specification</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Editor</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MFile><a href="../editor/mxDefaultKeyHandler-js.html">mxDefaultKeyHandler</a></div></div><div class=MEntry><div class=MFile><a href="../editor/mxDefaultPopupMenu-js.html">mxDefaultPopupMenu</a></div></div><div class=MEntry><div class=MFile><a href="../editor/mxDefaultToolbar-js.html">mxDefaultToolbar</a></div></div><div class=MEntry><div class=MFile><a href="../editor/mxEditor-js.html">mxEditor</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent2')">Handler</a><div class=MGroupContent id=MGroupContent2><div class=MEntry><div class=MFile><a href="../handler/mxCellHighlight-js.html">mxCellHighlight</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxCellMarker-js.html">mxCellMarker</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxCellTracker-js.html">mxCellTracker</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxConnectionHandler-js.html">mxConnectionHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxConstraintHandler-js.html">mxConstraintHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxEdgeHandler-js.html">mxEdgeHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxEdgeSegmentHandler-js.html">mxEdgeSegmentHandler.js</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxElbowEdgeHandler-js.html">mxElbowEdgeHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxGraphHandler-js.html">mxGraphHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxKeyHandler-js.html">mxKeyHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxPanningHandler-js.html">mxPanningHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxPopupMenuHandler-js.html">mxPopupMenuHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxRubberband-js.html">mxRubberband</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxSelectionCellsHandler-js.html">mxSelectionCellsHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxTooltipHandler-js.html">mxTooltipHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxVertexHandler-js.html">mxVertexHandler</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent3')">Io</a><div class=MGroupContent id=MGroupContent3><div class=MEntry><div class=MFile><a href="../io/mxCellCodec-js.html">mxCellCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxChildChangeCodec-js.html">mxChildChangeCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxCodec-js.html">mxCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxCodecRegistry-js.html">mxCodecRegistry</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxDefaultKeyHandlerCodec-js.html">mxDefaultKeyHandlerCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxDefaultPopupMenuCodec-js.html">mxDefaultPopupMenuCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxDefaultToolbarCodec-js.html">mxDefaultToolbarCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxEditorCodec-js.html">mxEditorCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxGenericChangeCodec-js.html">mxGenericChangeCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxGraphCodec-js.html">mxGraphCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxGraphViewCodec-js.html">mxGraphViewCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxModelCodec-js.html">mxModelCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxObjectCodec-js.html">mxObjectCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxRootChangeCodec-js.html">mxRootChangeCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxStylesheetCodec-js.html">mxStylesheetCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxTerminalChangeCodec-js.html">mxTerminalChangeCodec</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent7')">Layout</a><div class=MGroupContent id=MGroupContent7><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent6')">Hierarchical</a><div class=MGroupContent id=MGroupContent6><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent4')">Model</a><div class=MGroupContent id=MGroupContent4><div class=MEntry><div class=MFile><a href="../layout/hierarchical/model/mxGraphAbstractHierarchyCell-js.html">mxGraphAbstractHierarchyCell</a></div></div><div class=MEntry><div class=MFile><a href="../layout/hierarchical/model/mxGraphHierarchyEdge-js.html">mxGraphHierarchyEdge</a></div></div><div class=MEntry><div class=MFile><a href="../layout/hierarchical/model/mxGraphHierarchyModel-js.html">mxGraphHierarchyModel</a></div></div><div class=MEntry><div class=MFile><a href="../layout/hierarchical/model/mxGraphHierarchyNode-js.html">mxGraphHierarchyNode</a></div></div><div class=MEntry><div class=MFile><a href="../layout/hierarchical/model/mxSwimlaneModel-js.html">mxSwimlaneModel</a></div></div></div></div></div><div class=MEntry><div class=MFile><a href="../layout/hierarchical/mxHierarchicalLayout-js.html">mxHierarchicalLayout</a></div></div><div class=MEntry><div class=MFile><a href="../layout/hierarchical/mxSwimlaneLayout-js.html">mxSwimlaneLayout</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent5')">Stage</a><div class=MGroupContent id=MGroupContent5><div class=MEntry><div class=MFile><a href="../layout/hierarchical/stage/mxCoordinateAssignment-js.html">mxCoordinateAssignment</a></div></div><div class=MEntry><div class=MFile><a href="../layout/hierarchical/stage/mxHierarchicalLayoutStage-js.html">mxHierarchicalLayoutStage</a></div></div><div class=MEntry><div class=MFile><a href="../layout/hierarchical/stage/mxMedianHybridCrossingReduction-js.html">mxMedianHybridCrossingReduction</a></div></div><div class=MEntry><div class=MFile><a href="../layout/hierarchical/stage/mxMinimumCycleRemover-js.html">mxMinimumCycleRemover</a></div></div><div class=MEntry><div class=MFile><a href="../layout/hierarchical/stage/mxSwimlaneOrdering-js.html">mxSwimlaneOrdering</a></div></div></div></div></div></div></div></div><div class=MEntry><div class=MFile><a href="../layout/mxCircleLayout-js.html">mxCircleLayout</a></div></div><div class=MEntry><div class=MFile><a href="../layout/mxCompactTreeLayout-js.html">mxCompactTreeLayout</a></div></div><div class=MEntry><div class=MFile><a href="../layout/mxCompositeLayout-js.html">mxCompositeLayout</a></div></div><div class=MEntry><div class=MFile><a href="../layout/mxEdgeLabelLayout-js.html">mxEdgeLabelLayout</a></div></div><div class=MEntry><div class=MFile><a href="../layout/mxFastOrganicLayout-js.html">mxFastOrganicLayout</a></div></div><div class=MEntry><div class=MFile><a href="../layout/mxGraphLayout-js.html">mxGraphLayout</a></div></div><div class=MEntry><div class=MFile><a href="../layout/mxParallelEdgeLayout-js.html">mxParallelEdgeLayout</a></div></div><div class=MEntry><div class=MFile><a href="../layout/mxPartitionLayout-js.html">mxPartitionLayout</a></div></div><div class=MEntry><div class=MFile><a href="../layout/mxStackLayout-js.html">mxStackLayout</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent8')">Model</a><div class=MGroupContent id=MGroupContent8><div class=MEntry><div class=MFile><a href="../model/mxCell-js.html">mxCell</a></div></div><div class=MEntry><div class=MFile><a href="../model/mxCellPath-js.html">mxCellPath</a></div></div><div class=MEntry><div class=MFile><a href="../model/mxGeometry-js.html">mxGeometry</a></div></div><div class=MEntry><div class=MFile><a href="../model/mxGraphModel-js.html">mxGraphModel</a></div></div></div></div></div><div class=MEntry><div class=MFile><a href="../mxClient-js.html">mxClient</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent9')">Shape</a><div class=MGroupContent id=MGroupContent9><div class=MEntry><div class=MFile><a href="../shape/mxActor-js.html">mxActor</a></div></div><div class=MEntry><div class=MFile><a href="../shape/mxArrow-js.html">mxArrow</a></div></div><div class=MEntry><div class=MFile><a href="../shape/mxCloud-js.html">mxCloud</a></div></div><div class=MEntry><div class=MFile><a href="../shape/mxConnector-js.html">mxConnector</a></div></div><div class=MEntry><div class=MFile><a href="../shape/mxCylinder-js.html">mxCylinder</a></div></div><div class=MEntry><div class=MFile><a href="../shape/mxDoubleEllipse-js.html">mxDoubleEllipse</a></div></div><div class=MEntry><div class=MFile><a href="../shape/mxEllipse-js.html">mxEllipse</a></div></div><div class=MEntry><div class=MFile><a href="../shape/mxHexagon-js.html">mxHexagon</a></div></div><div class=MEntry><div class=MFile><a href="../shape/mxImageShape-js.html">mxImageShape</a></div></div><div class=MEntry><div class=MFile><a href="../shape/mxLabel-js.html">mxLabel</a></div></div><div class=MEntry><div class=MFile><a href="../shape/mxLine-js.html">mxLine</a></div></div><div class=MEntry><div class=MFile><a href="../shape/mxMarker-js.html">mxMarker</a></div></div><div class=MEntry><div class=MFile><a href="../shape/mxPolyline-js.html">mxPolyline</a></div></div><div class=MEntry><div class=MFile><a href="../shape/mxRectangleShape-js.html">mxRectangleShape</a></div></div><div class=MEntry><div class=MFile><a href="../shape/mxRhombus-js.html">mxRhombus</a></div></div><div class=MEntry><div class=MFile><a href="../shape/mxShape-js.html">mxShape</a></div></div><div class=MEntry><div class=MFile><a href="../shape/mxStencil-js.html">mxStencil</a></div></div><div class=MEntry><div class=MFile><a href="../shape/mxStencilRegistry-js.html">mxStencilRegistry</a></div></div><div class=MEntry><div class=MFile><a href="../shape/mxSwimlane-js.html">mxSwimlane</a></div></div><div class=MEntry><div class=MFile><a href="../shape/mxText-js.html">mxText</a></div></div><div class=MEntry><div class=MFile><a href="../shape/mxTriangle-js.html">mxTriangle</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent10')">Util</a><div class=MGroupContent id=MGroupContent10><div class=MEntry><div class=MFile><a href="../util/mxAbstractCanvas2D-js.html">mxAbstractCanvas2D</a></div></div><div class=MEntry><div class=MFile><a href="../util/mxAnimation-js.html">mxAnimation</a></div></div><div class=MEntry><div class=MFile><a href="../util/mxAutoSaveManager-js.html">mxAutoSaveManager</a></div></div><div class=MEntry><div class=MFile><a href="../util/mxClipboard-js.html">mxClipboard</a></div></div><div class=MEntry><div class=MFile><a href="../util/mxConstants-js.html">mxConstants</a></div></div><div class=MEntry><div class=MFile><a href="../util/mxDictionary-js.html">mxDictionary</a></div></div><div class=MEntry><div class=MFile><a href="../util/mxDivResizer-js.html">mxDivResizer</a></div></div><div class=MEntry><div class=MFile><a href="../util/mxDragSource-js.html">mxDragSource</a></div></div><div class=MEntry><div class=MFile><a href="../util/mxEffects-js.html">mxEffects</a></div></div><div class=MEntry><div class=MFile><a href="../util/mxEvent-js.html">mxEvent</a></div></div><div class=MEntry><div class=MFile><a href="../util/mxEventObject-js.html">mxEventObject</a></div></div><div class=MEntry><div class=MFile><a href="../util/mxEventSource-js.html">mxEventSource</a></div></div><div class=MEntry><div class=MFile><a href="../util/mxForm-js.html">mxForm</a></div></div><div class=MEntry><div class=MFile><a href="../util/mxGuide-js.html">mxGuide</a></div></div><div class=MEntry><div class=MFile><a href="../util/mxImage-js.html">mxImage</a></div></div><div class=MEntry><div class=MFile><a href="../util/mxImageBundle-js.html">mxImageBundle</a></div></div><div class=MEntry><div class=MFile><a href="../util/mxImageExport-js.html">mxImageExport</a></div></div><div class=MEntry><div class=MFile><a href="../util/mxLog-js.html">mxLog</a></div></div><div class=MEntry><div class=MFile><a href="../util/mxMorphing-js.html">mxMorphing</a></div></div><div class=MEntry><div class=MFile><a href="../util/mxMouseEvent-js.html">mxMouseEvent</a></div></div><div class=MEntry><div class=MFile><a href="../util/mxObjectIdentity-js.html">mxObjectIdentity</a></div></div><div class=MEntry><div class=MFile><a href="../util/mxPanningManager-js.html">mxPanningManager</a></div></div><div class=MEntry><div class=MFile><a href="../util/mxPoint-js.html">mxPoint</a></div></div><div class=MEntry><div class=MFile><a href="../util/mxPopupMenu-js.html">mxPopupMenu</a></div></div><div class=MEntry><div class=MFile><a href="../util/mxRectangle-js.html">mxRectangle</a></div></div><div class=MEntry><div class=MFile><a href="../util/mxResources-js.html">mxResources</a></div></div><div class=MEntry><div class=MFile><a href="../util/mxSession-js.html">mxSession</a></div></div><div class=MEntry><div class=MFile><a href="../util/mxSvgCanvas2D-js.html">mxSvgCanvas2D</a></div></div><div class=MEntry><div class=MFile><a href="../util/mxToolbar-js.html">mxToolbar</a></div></div><div class=MEntry><div class=MFile><a href="../util/mxUndoableEdit-js.html">mxUndoableEdit</a></div></div><div class=MEntry><div class=MFile><a href="../util/mxUndoManager-js.html">mxUndoManager</a></div></div><div class=MEntry><div class=MFile><a href="../util/mxUrlConverter-js.html">mxUrlConverter</a></div></div><div class=MEntry><div class=MFile><a href="../util/mxUtils-js.html">mxUtils</a></div></div><div class=MEntry><div class=MFile><a href="../util/mxVmlCanvas2D-js.html">mxVmlCanvas2D</a></div></div><div class=MEntry><div class=MFile><a href="../util/mxWindow-js.html">mxWindow</a></div></div><div class=MEntry><div class=MFile><a href="../util/mxXmlCanvas2D-js.html">mxXmlCanvas2D</a></div></div><div class=MEntry><div class=MFile><a href="../util/mxXmlRequest-js.html">mxXmlRequest</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent11')">View</a><div class=MGroupContent id=MGroupContent11><div class=MEntry><div class=MFile><a href="mxCellEditor-js.html">mxCellEditor</a></div></div><div class=MEntry><div class=MFile><a href="mxCellOverlay-js.html">mxCellOverlay</a></div></div><div class=MEntry><div class=MFile><a href="mxCellRenderer-js.html">mxCellRenderer</a></div></div><div class=MEntry><div class=MFile><a href="mxCellState-js.html">mxCellState</a></div></div><div class=MEntry><div class=MFile><a href="mxCellStatePreview-js.html">mxCellStatePreview</a></div></div><div class=MEntry><div class=MFile><a href="mxConnectionConstraint-js.html">mxConnectionConstraint</a></div></div><div class=MEntry><div class=MFile><a href="mxEdgeStyle-js.html">mxEdgeStyle</a></div></div><div class=MEntry><div class=MFile><a href="mxGraph-js.html">mxGraph</a></div></div><div class=MEntry><div class=MFile><a href="mxGraphSelectionModel-js.html">mxGraphSelectionModel</a></div></div><div class=MEntry><div class=MFile><a href="mxGraphView-js.html">mxGraphView</a></div></div><div class=MEntry><div class=MFile><a href="mxLayoutManager-js.html">mxLayoutManager</a></div></div><div class=MEntry><div class=MFile><a href="mxMultiplicity-js.html">mxMultiplicity</a></div></div><div class=MEntry><div class=MFile><a href="mxOutline-js.html">mxOutline</a></div></div><div class=MEntry><div class=MFile><a href="mxPerimeter-js.html">mxPerimeter</a></div></div><div class=MEntry><div class=MFile id=MSelected>mxPrintPreview</div></div><div class=MEntry><div class=MFile><a href="mxSpaceManager-js.html">mxSpaceManager</a></div></div><div class=MEntry><div class=MFile><a href="mxStyleRegistry-js.html">mxStyleRegistry</a></div></div><div class=MEntry><div class=MFile><a href="mxStylesheet-js.html">mxStylesheet</a></div></div><div class=MEntry><div class=MFile><a href="mxSwimlaneManager-js.html">mxSwimlaneManager</a></div></div><div class=MEntry><div class=MFile><a href="mxTemporaryCellStates-js.html">mxTemporaryCellStates</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent12')">Index</a><div class=MGroupContent id=MGroupContent12><div class=MEntry><div class=MIndex><a href="../../index/General.html">Everything</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Classes.html">Classes</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Cookies.html">Cookies</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Events.html">Events</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Files.html">Files</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Functions.html">Functions</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Variables.html">Variables</a></div></div></div></div></div><script type="text/javascript"><!--
var searchPanel = new SearchPanel("searchPanel", "HTML", "../../search");
--></script><div id=MSearchPanel class=MSearchPanelInactive><input type=text id=MSearchField value=Search onFocus="searchPanel.OnSearchFieldFocus(true)" onBlur="searchPanel.OnSearchFieldFocus(false)" onKeyUp="searchPanel.OnSearchFieldChange()"><select id=MSearchType onFocus="searchPanel.OnSearchTypeFocus(true)" onBlur="searchPanel.OnSearchTypeFocus(false)" onChange="searchPanel.OnSearchTypeChange()"><option id=MSearchEverything selected value="General">Everything</option><option value="Classes">Classes</option><option value="Cookies">Cookies</option><option value="Events">Events</option><option value="Files">Files</option><option value="Functions">Functions</option><option value="Variables">Variables</option></select></div><script language=JavaScript><!--
HideAllBut([11], 13);// --></script></div><!--Menu-->
<!--START_ND_TOOLTIPS-->
<div class=CToolTip id="tt1"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function mxPrintPreview(</td><td class=PParameter nowrap>graph,</td></tr><tr><td></td><td class=PParameter nowrap>scale,</td></tr><tr><td></td><td class=PParameter nowrap>pageFormat,</td></tr><tr><td></td><td class=PParameter nowrap>border,</td></tr><tr><td></td><td class=PParameter nowrap>x0,</td></tr><tr><td></td><td class=PParameter nowrap>y0,</td></tr><tr><td></td><td class=PParameter nowrap>borderColor,</td></tr><tr><td></td><td class=PParameter nowrap>title,</td></tr><tr><td></td><td class=PParameter nowrap>pageSelector</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Constructs a new print preview for the given parameters.</div></div><div class=CToolTip id="tt2"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.graph</td></tr></table></blockquote>Reference to the mxGraph that should be previewed.</div></div><div class=CToolTip id="tt3"><div class=CClass>Extends mxEventSource to implement a graph component for the browser. </div></div><div class=CToolTip id="tt4"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.pageFormat</td></tr></table></blockquote>Holds the mxRectangle that defines the page format.</div></div><div class=CToolTip id="tt5"><div class=CClass>Extends mxPoint to implement a 2-dimensional rectangle with double precision coordinates.</div></div><div class=CToolTip id="tt6"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.scale</td></tr></table></blockquote>Holds the scale of the print preview.</div></div><div class=CToolTip id="tt7"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.border</td></tr></table></blockquote>The border inset around each side of every page in the preview. </div></div><div class=CToolTip id="tt8"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.y0</td></tr></table></blockquote>Holds the vertical offset of the output.</div></div><div class=CToolTip id="tt9"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.autoOrigin</td></tr></table></blockquote>Specifies if the origin should be automatically computed based on the top, left corner of the actual diagram contents. </div></div><div class=CToolTip id="tt10"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.printOverlays</td></tr></table></blockquote>Specifies if overlays should be printed. </div></div><div class=CToolTip id="tt11"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.printBackgroundImage</td></tr></table></blockquote>Specifies if the background image should be printed. </div></div><div class=CToolTip id="tt12"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.borderColor</td></tr></table></blockquote>Holds the color value for the page border.</div></div><div class=CToolTip id="tt13"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.title</td></tr></table></blockquote>Holds the title of the preview window.</div></div><div class=CToolTip id="tt14"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.pageSelector</td></tr></table></blockquote>Boolean that specifies if the page selector should be displayed. </div></div><div class=CToolTip id="tt15"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.wnd</td></tr></table></blockquote>Reference to the preview window.</div></div><div class=CToolTip id="tt16"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.pageCount</td></tr></table></blockquote>Holds the actual number of pages in the preview.</div></div><div class=CToolTip id="tt17"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.getWindow = function()</td></tr></table></blockquote>Returns wnd.</div></div><div class=CToolTip id="tt18"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxPrintPreview.prototype.open = function(</td><td class=PParameter nowrap>css</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Shows the print preview window. </div></div><div class=CToolTip id="tt19"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxPrintPreview.prototype.writeHead = function(</td><td class=PParameter nowrap>doc,</td></tr><tr><td></td><td class=PParameter nowrap>css</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Writes the HEAD section into the given document, without the opening and closing HEAD tags.</div></div><div class=CToolTip id="tt20"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxPrintPreview.prototype.createPageSelector = function(</td><td class=PParameter nowrap>vpages,</td></tr><tr><td></td><td class=PParameter nowrap>hpages</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Creates the page selector table.</div></div><div class=CToolTip id="tt21"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxPrintPreview.prototype.renderPage = function(</td><td class=PParameter nowrap>w,</td></tr><tr><td></td><td class=PParameter nowrap>h,</td></tr><tr><td></td><td class=PParameter nowrap>dx,</td></tr><tr><td></td><td class=PParameter nowrap>dy,</td></tr><tr><td></td><td class=PParameter nowrap>content</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Creates a DIV that prints a single page of the given graph using the given scale and returns the DIV that represents the page.</div></div><div class=CToolTip id="tt22"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.getRoot = function()</td></tr></table></blockquote>Returns the root cell for painting the graph.</div></div><div class=CToolTip id="tt23"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxPrintPreview.prototype.addGraphFragment = function(</td><td class=PParameter nowrap>dx,</td></tr><tr><td></td><td class=PParameter nowrap>dy,</td></tr><tr><td></td><td class=PParameter nowrap>scale,</td></tr><tr><td></td><td class=PParameter nowrap>pageNumber,</td></tr><tr><td></td><td class=PParameter nowrap>div</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Adds a graph fragment to the given div.</div></div><div class=CToolTip id="tt24"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxPrintPreview.prototype.insertBackgroundImage = function(</td><td class=PParameter nowrap>div,</td></tr><tr><td></td><td class=PParameter nowrap>dx,</td></tr><tr><td></td><td class=PParameter nowrap>dy</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Inserts the background image into the given div.</div></div><div class=CToolTip id="tt25"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.getCoverPages = function()</td></tr></table></blockquote>Returns the pages to be added before the print output. </div></div><div class=CToolTip id="tt26"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.getAppendices = function()</td></tr></table></blockquote>Returns the pages to be added after the print output. </div></div><div class=CToolTip id="tt27"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxPrintPreview.prototype.print = function(</td><td class=PParameter nowrap>css</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Opens the print preview and shows the print dialog.</div></div><div class=CToolTip id="tt28"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxPrintPreview.prototype.close = function()</td></tr></table></blockquote>Closes the print preview window.</div></div><div class=CToolTip id="tt29"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>getScaleForPageCount: function(</td><td class=PParameter nowrap>pageCount,</td></tr><tr><td></td><td class=PParameter nowrap>graph,</td></tr><tr><td></td><td class=PParameter nowrap>pageFormat,</td></tr><tr><td></td><td class=PParameter nowrap>border</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Returns the scale to be used for printing the graph with the given bounds across the specifies number of pages with the given format. </div></div><div class=CToolTip id="tt30"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxGraph.prototype.pageScale</td></tr></table></blockquote>Specifies the scale of the background page. </div></div><div class=CToolTip id="tt31"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxGraph.prototype.pageFormat</td></tr></table></blockquote>Specifies the page format for the background page. </div></div><!--END_ND_TOOLTIPS-->
<div id=MSearchResultsWindow><iframe src="" frameborder=0 name=MSearchResults id=MSearchResults></iframe><a href="javascript:searchPanel.CloseResultsWindow()" id=MSearchResultsWindowClose>Close</a></div>
<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>