Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > 1dd17e0d683ef79b4bb6872bbf359d7f > files > 6182

qt4-doc-4.8.7-26.2.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qprinter.cpp -->
  <title>Qt 4.8: QPrinter Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtgui.html">QtGui</a></li>
<li>QPrinter</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></li>
            </ul>
        </div>
        </div>
        <div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QPrinter Class Reference</h1>
<!-- $$$QPrinter-brief -->
<p>The QPrinter class is a paint device that paints on a printer. <a href="#details">More...</a></p>
<!-- @@@QPrinter -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QPrinter&gt;</span></pre><p><b>Inherits: </b><a href="qpaintdevice.html">QPaintDevice</a>.</p>
<p><b>Note:</b> All functions in this class are <a href="threads-reentrancy.html#reentrant">reentrant</a>.</p>
<ul>
<li><a href="qprinter-members.html">List of all members, including inherited members</a></li>
<li><a href="qprinter-obsolete.html">Obsolete members</a></li>
<li><a href="qprinter-qt3.html">Qt 3 support members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#ColorMode-enum">ColorMode</a></b> { Color, GrayScale }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#DuplexMode-enum">DuplexMode</a></b> { DuplexNone, DuplexAuto, DuplexLongSide, DuplexShortSide }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#Orientation-enum">Orientation</a></b> { Portrait, Landscape }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#OutputFormat-enum">OutputFormat</a></b> { NativeFormat, PdfFormat, PostScriptFormat }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#PageOrder-enum">PageOrder</a></b> { FirstPageFirst, LastPageFirst }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#PaperSize-enum">PaperSize</a></b> { A0, A1, A2, A3, ..., Custom }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#PaperSource-enum">PaperSource</a></b> { Auto, Cassette, Envelope, EnvelopeManual, ..., SmallFormat }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#PrintRange-enum">PrintRange</a></b> { AllPages, Selection, PageRange, CurrentPage }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#PrinterMode-enum">PrinterMode</a></b> { ScreenResolution, PrinterResolution, HighResolution }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#PrinterState-enum">PrinterState</a></b> { Idle, Active, Aborted, Error }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#Unit-enum">Unit</a></b> { Millimeter, Point, Inch, Pica, ..., DevicePixel }</td></tr>
</table>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#QPrinter">QPrinter</a></b> ( PrinterMode <i>mode</i> = ScreenResolution )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#QPrinter-2">QPrinter</a></b> ( const QPrinterInfo &amp; <i>printer</i>, PrinterMode <i>mode</i> = ScreenResolution )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#dtor.QPrinter">~QPrinter</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#abort">abort</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#collateCopies">collateCopies</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> ColorMode </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#colorMode">colorMode</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#copyCount">copyCount</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#creator">creator</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#docName">docName</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#doubleSidedPrinting">doubleSidedPrinting</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> DuplexMode </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#duplex">duplex</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#fontEmbeddingEnabled">fontEmbeddingEnabled</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#fromPage">fromPage</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#fullPage">fullPage</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#getPageMargins">getPageMargins</a></b> ( qreal * <i>left</i>, qreal * <i>top</i>, qreal * <i>right</i>, qreal * <i>bottom</i>, Unit <i>unit</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#isValid">isValid</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#newPage">newPage</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Orientation </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#orientation">orientation</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#outputFileName">outputFileName</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> OutputFormat </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#outputFormat">outputFormat</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> PageOrder </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#pageOrder">pageOrder</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRect </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#pageRect">pageRect</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRectF </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#pageRect-2">pageRect</a></b> ( Unit <i>unit</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRect </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#paperRect">paperRect</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRectF </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#paperRect-2">paperRect</a></b> ( Unit <i>unit</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> PaperSize </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#paperSize">paperSize</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSizeF </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#paperSize-2">paperSize</a></b> ( Unit <i>unit</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> PaperSource </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#paperSource">paperSource</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPrintEngine * </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#printEngine">printEngine</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#printProgram">printProgram</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> PrintRange </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#printRange">printRange</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#printerName">printerName</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#printerSelectionOption">printerSelectionOption</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> PrinterState </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#printerState">printerState</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#resolution">resolution</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#setCollateCopies">setCollateCopies</a></b> ( bool <i>collate</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#setColorMode">setColorMode</a></b> ( ColorMode <i>newColorMode</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#setCopyCount">setCopyCount</a></b> ( int <i>count</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#setCreator">setCreator</a></b> ( const QString &amp; <i>creator</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#setDocName">setDocName</a></b> ( const QString &amp; <i>name</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#setDoubleSidedPrinting">setDoubleSidedPrinting</a></b> ( bool <i>doubleSided</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#setDuplex">setDuplex</a></b> ( DuplexMode <i>duplex</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#setFontEmbeddingEnabled">setFontEmbeddingEnabled</a></b> ( bool <i>enable</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#setFromTo">setFromTo</a></b> ( int <i>from</i>, int <i>to</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#setFullPage">setFullPage</a></b> ( bool <i>fp</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#setOrientation">setOrientation</a></b> ( Orientation <i>orientation</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#setOutputFileName">setOutputFileName</a></b> ( const QString &amp; <i>fileName</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#setOutputFormat">setOutputFormat</a></b> ( OutputFormat <i>format</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#setPageMargins">setPageMargins</a></b> ( qreal <i>left</i>, qreal <i>top</i>, qreal <i>right</i>, qreal <i>bottom</i>, Unit <i>unit</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#setPageOrder">setPageOrder</a></b> ( PageOrder <i>pageOrder</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#setPaperSize">setPaperSize</a></b> ( PaperSize <i>newPaperSize</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#setPaperSize-2">setPaperSize</a></b> ( const QSizeF &amp; <i>paperSize</i>, Unit <i>unit</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#setPaperSource">setPaperSource</a></b> ( PaperSource <i>source</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#setPrintProgram">setPrintProgram</a></b> ( const QString &amp; <i>printProg</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#setPrintRange">setPrintRange</a></b> ( PrintRange <i>range</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#setPrinterName">setPrinterName</a></b> ( const QString &amp; <i>name</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#setPrinterSelectionOption">setPrinterSelectionOption</a></b> ( const QString &amp; <i>option</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#setResolution">setResolution</a></b> ( int <i>dpi</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#setWinPageSize">setWinPageSize</a></b> ( int <i>pageSize</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;PaperSource&gt; </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#supportedPaperSources">supportedPaperSources</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;int&gt; </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#supportedResolutions">supportedResolutions</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#supportsMultipleCopies">supportsMultipleCopies</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#toPage">toPage</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#winPageSize">winPageSize</a></b> () const</td></tr>
</table>
<a name="reimplemented-public-functions"></a>
<h2>Reimplemented Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual QPaintEngine * </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#paintEngine">paintEngine</a></b> () const</td></tr>
</table>
<ul>
<li class="fn">13 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
</ul>
<a name="protected-functions"></a>
<h2>Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qprinter.html#setEngines">setEngines</a></b> ( QPrintEngine * <i>printEngine</i>, QPaintEngine * <i>paintEngine</i> )</td></tr>
</table>
<ul>
<li class="fn">1 protected function inherited from <a href="qpaintdevice.html#protected-functions">QPaintDevice</a></li>
</ul>
<a name="details"></a>
<!-- $$$QPrinter-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QPrinter class is a paint device that paints on a printer.</p>
<p>This device represents a series of pages of printed output, and is used in almost exactly the same way as other paint devices such as <a href="qwidget.html">QWidget</a> and <a href="qpixmap.html">QPixmap</a>. A set of additional functions are provided to manage device-specific features, such as orientation and resolution, and to step through the pages in a document as it is generated.</p>
<p>When printing directly to a printer on Windows or Mac OS X, QPrinter uses the built-in printer drivers. On X11, QPrinter uses the <a href="http://www.cups.org/">Common Unix Printing System (CUPS)</a> or the standard Unix <a href="http://www.ietf.org/rfc/rfc1179.txt#lpr">lpr</a> utility to send PostScript or PDF output to the printer. As an alternative, the <a href="qprinter.html#printProgram">printProgram</a>() function can be used to specify the command or utility to use instead of the system default.</p>
<p>Note that setting parameters like paper size and resolution on an invalid printer is undefined. You can use <a href="qprinter.html#isValid">QPrinter::isValid</a>() to verify this before changing any parameters.</p>
<p>QPrinter supports a number of parameters, most of which can be changed by the end user through a <a href="qprintdialog.html">print dialog</a>. In general, QPrinter passes these functions onto the underlying <a href="qprintengine.html">QPrintEngine</a>.</p>
<p>The most important parameters are:</p>
<ul>
<li><a href="qprinter.html#setOrientation">setOrientation</a>() tells QPrinter which page orientation to use.</li>
<li><a href="qprinter.html#setPaperSize">setPaperSize</a>() tells QPrinter what paper size to expect from the printer.</li>
<li><a href="qprinter.html#setResolution">setResolution</a>() tells QPrinter what resolution you wish the printer to provide, in dots per inch (DPI).</li>
<li><a href="qprinter.html#setFullPage">setFullPage</a>() tells QPrinter whether you want to deal with the full page or just with the part the printer can draw on.</li>
<li><a href="qprinter.html#setCopyCount">setCopyCount</a>() tells QPrinter how many copies of the document it should print.</li>
</ul>
<p>Many of these functions can only be called before the actual printing begins (i.e&#x2e;, before <a href="qpainter.html#begin">QPainter::begin</a>() is called). This usually makes sense because, for example, it's not possible to change the number of copies when you are halfway through printing. There are also some settings that the user sets (through the printer dialog) and that applications are expected to obey. See <a href="qabstractprintdialog.html">QAbstractPrintDialog</a>'s documentation for more details.</p>
<p>When <a href="qpainter.html#begin">QPainter::begin</a>() is called, the QPrinter it operates on is prepared for a new page, enabling the <a href="qpainter.html">QPainter</a> to be used immediately to paint the first page in a document. Once the first page has been painted, <a href="qprinter.html#newPage">newPage</a>() can be called to request a new blank page to paint on, or <a href="qpainter.html#end">QPainter::end</a>() can be called to finish printing. The second page and all following pages are prepared using a call to <a href="qprinter.html#newPage">newPage</a>() before they are painted.</p>
<p>The first page in a document does not need to be preceded by a call to <a href="qprinter.html#newPage">newPage</a>(). You only need to calling <a href="qprinter.html#newPage">newPage</a>() after <a href="qpainter.html#begin">QPainter::begin</a>() if you need to insert a blank page at the beginning of a printed document. Similarly, calling <a href="qprinter.html#newPage">newPage</a>() after the last page in a document is painted will result in a trailing blank page appended to the end of the printed document.</p>
<p>If you want to abort the print job, <a href="qprinter.html#abort">abort</a>() will try its best to stop printing. It may cancel the entire job or just part of it.</p>
<p>Since QPrinter can print to any <a href="qprintengine.html">QPrintEngine</a> subclass, it is possible to extend printing support to cover new types of printing subsystem by subclassing <a href="qprintengine.html">QPrintEngine</a> and reimplementing its interface.</p>
</div>
<p><b>See also </b><a href="qprintdialog.html">QPrintDialog</a> and <a href="printing.html">Printing with Qt</a>.</p>
<!-- @@@QPrinter -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$ColorMode$$$GrayScale$$$Color -->
<h3 class="fn"><a name="ColorMode-enum"></a>enum QPrinter::<span class="name">ColorMode</span></h3>
<p>This enum type is used to indicate whether <a href="qprinter.html">QPrinter</a> should print in color or not.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QPrinter::Color</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">print in color if available, otherwise in grayscale.</td></tr>
<tr><td class="topAlign"><tt>QPrinter::GrayScale</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">print in grayscale, even on color printers.</td></tr>
</table>
<!-- @@@ColorMode -->
<!-- $$$DuplexMode$$$DuplexNone$$$DuplexAuto$$$DuplexLongSide$$$DuplexShortSide -->
<h3 class="fn"><a name="DuplexMode-enum"></a>enum QPrinter::<span class="name">DuplexMode</span></h3>
<p>This enum is used to indicate whether printing will occur on one or both sides of each sheet of paper (simplex or duplex printing).</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QPrinter::DuplexNone</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">Single sided (simplex) printing only.</td></tr>
<tr><td class="topAlign"><tt>QPrinter::DuplexAuto</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">The printer's default setting is used to determine whether duplex printing is used.</td></tr>
<tr><td class="topAlign"><tt>QPrinter::DuplexLongSide</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">Both sides of each sheet of paper are used for printing. The paper is turned over its longest edge before the second side is printed</td></tr>
<tr><td class="topAlign"><tt>QPrinter::DuplexShortSide</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">Both sides of each sheet of paper are used for printing. The paper is turned over its shortest edge before the second side is printed</td></tr>
</table>
<p>This enum was introduced or modified in Qt 4.4.</p>
<!-- @@@DuplexMode -->
<!-- $$$Orientation$$$Portrait$$$Landscape -->
<h3 class="fn"><a name="Orientation-enum"></a>enum QPrinter::<span class="name">Orientation</span></h3>
<p>This enum type (not to be confused with <tt>Orientation</tt>) is used to specify each page's orientation.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QPrinter::Portrait</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">the page's height is greater than its width.</td></tr>
<tr><td class="topAlign"><tt>QPrinter::Landscape</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">the page's width is greater than its height.</td></tr>
</table>
<p>This type interacts with <a href="qprinter.html#PaperSize-enum">QPrinter::PaperSize</a> and <a href="qprinter.html#setFullPage">QPrinter::setFullPage</a>() to determine the final size of the page available to the application.</p>
<!-- @@@Orientation -->
<!-- $$$OutputFormat$$$NativeFormat$$$PdfFormat$$$PostScriptFormat -->
<h3 class="fn"><a name="OutputFormat-enum"></a>enum QPrinter::<span class="name">OutputFormat</span></h3>
<p>The OutputFormat enum is used to describe the format <a href="qprinter.html">QPrinter</a> should use for printing.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QPrinter::NativeFormat</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign"><a href="qprinter.html">QPrinter</a> will print output using a method defined by the platform it is running on. This mode is the default when printing directly to a printer.</td></tr>
<tr><td class="topAlign"><tt>QPrinter::PdfFormat</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign"><a href="qprinter.html">QPrinter</a> will generate its output as a searchable PDF file. This mode is the default when printing to a file.</td></tr>
<tr><td class="topAlign"><tt>QPrinter::PostScriptFormat</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign"><a href="qprinter.html">QPrinter</a> will generate its output as in the PostScript format. (This feature was introduced in Qt 4.2&#x2e;)</td></tr>
</table>
<p><b>See also </b><a href="qprinter.html#outputFormat">outputFormat</a>(), <a href="qprinter.html#setOutputFormat">setOutputFormat</a>(), and <a href="qprinter.html#setOutputFileName">setOutputFileName</a>().</p>
<!-- @@@OutputFormat -->
<!-- $$$PageOrder$$$FirstPageFirst$$$LastPageFirst -->
<h3 class="fn"><a name="PageOrder-enum"></a>enum QPrinter::<span class="name">PageOrder</span></h3>
<p>This enum type is used by <a href="qprinter.html">QPrinter</a> to tell the application program how to print.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QPrinter::FirstPageFirst</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">the lowest-numbered page should be printed first.</td></tr>
<tr><td class="topAlign"><tt>QPrinter::LastPageFirst</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">the highest-numbered page should be printed first.</td></tr>
</table>
<!-- @@@PageOrder -->
<!-- $$$PaperSize$$$A4$$$B5$$$Letter$$$Legal$$$Executive$$$A0$$$A1$$$A2$$$A3$$$A5$$$A6$$$A7$$$A8$$$A9$$$B0$$$B1$$$B10$$$B2$$$B3$$$B4$$$B6$$$B7$$$B8$$$B9$$$C5E$$$Comm10E$$$DLE$$$Folio$$$Ledger$$$Tabloid$$$Custom$$$NPageSize$$$NPaperSize -->
<h3 class="fn"><a name="PaperSize-enum"></a>enum QPrinter::<span class="name">PaperSize</span></h3>
<p>This enum type specifies what paper size <a href="qprinter.html">QPrinter</a> should use. <a href="qprinter.html">QPrinter</a> does not check that the paper size is available; it just uses this information, together with <a href="qprinter.html#Orientation-enum">QPrinter::Orientation</a> and <a href="qprinter.html#setFullPage">QPrinter::setFullPage</a>(), to determine the printable area.</p>
<p>The defined sizes (with setFullPage(true)) are:</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QPrinter::A0</tt></td><td class="topAlign"><tt>5</tt></td><td class="topAlign">841 x 1189 mm</td></tr>
<tr><td class="topAlign"><tt>QPrinter::A1</tt></td><td class="topAlign"><tt>6</tt></td><td class="topAlign">594 x 841 mm</td></tr>
<tr><td class="topAlign"><tt>QPrinter::A2</tt></td><td class="topAlign"><tt>7</tt></td><td class="topAlign">420 x 594 mm</td></tr>
<tr><td class="topAlign"><tt>QPrinter::A3</tt></td><td class="topAlign"><tt>8</tt></td><td class="topAlign">297 x 420 mm</td></tr>
<tr><td class="topAlign"><tt>QPrinter::A4</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">210 x 297 mm, 8.26 x 11.69 inches</td></tr>
<tr><td class="topAlign"><tt>QPrinter::A5</tt></td><td class="topAlign"><tt>9</tt></td><td class="topAlign">148 x 210 mm</td></tr>
<tr><td class="topAlign"><tt>QPrinter::A6</tt></td><td class="topAlign"><tt>10</tt></td><td class="topAlign">105 x 148 mm</td></tr>
<tr><td class="topAlign"><tt>QPrinter::A7</tt></td><td class="topAlign"><tt>11</tt></td><td class="topAlign">74 x 105 mm</td></tr>
<tr><td class="topAlign"><tt>QPrinter::A8</tt></td><td class="topAlign"><tt>12</tt></td><td class="topAlign">52 x 74 mm</td></tr>
<tr><td class="topAlign"><tt>QPrinter::A9</tt></td><td class="topAlign"><tt>13</tt></td><td class="topAlign">37 x 52 mm</td></tr>
<tr><td class="topAlign"><tt>QPrinter::B0</tt></td><td class="topAlign"><tt>14</tt></td><td class="topAlign">1000 x 1414 mm</td></tr>
<tr><td class="topAlign"><tt>QPrinter::B1</tt></td><td class="topAlign"><tt>15</tt></td><td class="topAlign">707 x 1000 mm</td></tr>
<tr><td class="topAlign"><tt>QPrinter::B2</tt></td><td class="topAlign"><tt>17</tt></td><td class="topAlign">500 x 707 mm</td></tr>
<tr><td class="topAlign"><tt>QPrinter::B3</tt></td><td class="topAlign"><tt>18</tt></td><td class="topAlign">353 x 500 mm</td></tr>
<tr><td class="topAlign"><tt>QPrinter::B4</tt></td><td class="topAlign"><tt>19</tt></td><td class="topAlign">250 x 353 mm</td></tr>
<tr><td class="topAlign"><tt>QPrinter::B5</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">176 x 250 mm, 6.93 x 9.84 inches</td></tr>
<tr><td class="topAlign"><tt>QPrinter::B6</tt></td><td class="topAlign"><tt>20</tt></td><td class="topAlign">125 x 176 mm</td></tr>
<tr><td class="topAlign"><tt>QPrinter::B7</tt></td><td class="topAlign"><tt>21</tt></td><td class="topAlign">88 x 125 mm</td></tr>
<tr><td class="topAlign"><tt>QPrinter::B8</tt></td><td class="topAlign"><tt>22</tt></td><td class="topAlign">62 x 88 mm</td></tr>
<tr><td class="topAlign"><tt>QPrinter::B9</tt></td><td class="topAlign"><tt>23</tt></td><td class="topAlign">33 x 62 mm</td></tr>
<tr><td class="topAlign"><tt>QPrinter::B10</tt></td><td class="topAlign"><tt>16</tt></td><td class="topAlign">31 x 44 mm</td></tr>
<tr><td class="topAlign"><tt>QPrinter::C5E</tt></td><td class="topAlign"><tt>24</tt></td><td class="topAlign">163 x 229 mm</td></tr>
<tr><td class="topAlign"><tt>QPrinter::Comm10E</tt></td><td class="topAlign"><tt>25</tt></td><td class="topAlign">105 x 241 mm, U.S&#x2e; Common 10 Envelope</td></tr>
<tr><td class="topAlign"><tt>QPrinter::DLE</tt></td><td class="topAlign"><tt>26</tt></td><td class="topAlign">110 x 220 mm</td></tr>
<tr><td class="topAlign"><tt>QPrinter::Executive</tt></td><td class="topAlign"><tt>4</tt></td><td class="topAlign">7.5 x 10 inches, 190.5 x 254 mm</td></tr>
<tr><td class="topAlign"><tt>QPrinter::Folio</tt></td><td class="topAlign"><tt>27</tt></td><td class="topAlign">210 x 330 mm</td></tr>
<tr><td class="topAlign"><tt>QPrinter::Ledger</tt></td><td class="topAlign"><tt>28</tt></td><td class="topAlign">431.8 x 279.4 mm</td></tr>
<tr><td class="topAlign"><tt>QPrinter::Legal</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">8.5 x 14 inches, 215.9 x 355.6 mm</td></tr>
<tr><td class="topAlign"><tt>QPrinter::Letter</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">8.5 x 11 inches, 215.9 x 279.4 mm</td></tr>
<tr><td class="topAlign"><tt>QPrinter::Tabloid</tt></td><td class="topAlign"><tt>29</tt></td><td class="topAlign">279.4 x 431.8 mm</td></tr>
<tr><td class="topAlign"><tt>QPrinter::Custom</tt></td><td class="topAlign"><tt>30</tt></td><td class="topAlign">Unknown, or a user defined size.</td></tr>
</table>
<p>With setFullPage(false) (the default), the metrics will be a bit smaller; how much depends on the printer in use.</p>
<p>This enum was introduced or modified in Qt 4.4.</p>
<!-- @@@PaperSize -->
<!-- $$$PaperSource$$$OnlyOne$$$Lower$$$Middle$$$Manual$$$Envelope$$$EnvelopeManual$$$Auto$$$Tractor$$$SmallFormat$$$LargeFormat$$$LargeCapacity$$$Cassette$$$FormSource$$$MaxPageSource -->
<h3 class="fn"><a name="PaperSource-enum"></a>enum QPrinter::<span class="name">PaperSource</span></h3>
<p>This enum type specifies what paper source <a href="qprinter.html">QPrinter</a> is to use. <a href="qprinter.html">QPrinter</a> does not check that the paper source is available; it just uses this information to try and set the paper source. Whether it will set the paper source depends on whether the printer has that particular source.</p>
<p><b>Warning:</b> This is currently only implemented for Windows.</p>
<table class="valuelist"><tr><th class="tblConst">Constant</th><th class="tblVal">Value</th></tr>
<tr><td class="topAlign"><tt>QPrinter::Auto</tt></td><td class="topAlign"><tt>6</tt></td></tr>
<tr><td class="topAlign"><tt>QPrinter::Cassette</tt></td><td class="topAlign"><tt>11</tt></td></tr>
<tr><td class="topAlign"><tt>QPrinter::Envelope</tt></td><td class="topAlign"><tt>4</tt></td></tr>
<tr><td class="topAlign"><tt>QPrinter::EnvelopeManual</tt></td><td class="topAlign"><tt>5</tt></td></tr>
<tr><td class="topAlign"><tt>QPrinter::FormSource</tt></td><td class="topAlign"><tt>12</tt></td></tr>
<tr><td class="topAlign"><tt>QPrinter::LargeCapacity</tt></td><td class="topAlign"><tt>10</tt></td></tr>
<tr><td class="topAlign"><tt>QPrinter::LargeFormat</tt></td><td class="topAlign"><tt>9</tt></td></tr>
<tr><td class="topAlign"><tt>QPrinter::Lower</tt></td><td class="topAlign"><tt>1</tt></td></tr>
<tr><td class="topAlign"><tt>QPrinter::MaxPageSource</tt></td><td class="topAlign"><tt>13</tt></td></tr>
<tr><td class="topAlign"><tt>QPrinter::Middle</tt></td><td class="topAlign"><tt>2</tt></td></tr>
<tr><td class="topAlign"><tt>QPrinter::Manual</tt></td><td class="topAlign"><tt>3</tt></td></tr>
<tr><td class="topAlign"><tt>QPrinter::OnlyOne</tt></td><td class="topAlign"><tt>0</tt></td></tr>
<tr><td class="topAlign"><tt>QPrinter::Tractor</tt></td><td class="topAlign"><tt>7</tt></td></tr>
<tr><td class="topAlign"><tt>QPrinter::SmallFormat</tt></td><td class="topAlign"><tt>8</tt></td></tr>
</table>
<!-- @@@PaperSource -->
<!-- $$$PrintRange$$$AllPages$$$Selection$$$PageRange$$$CurrentPage -->
<h3 class="fn"><a name="PrintRange-enum"></a>enum QPrinter::<span class="name">PrintRange</span></h3>
<p>Used to specify the print range selection option.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QPrinter::AllPages</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">All pages should be printed.</td></tr>
<tr><td class="topAlign"><tt>QPrinter::Selection</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">Only the selection should be printed.</td></tr>
<tr><td class="topAlign"><tt>QPrinter::PageRange</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">The specified page range should be printed.</td></tr>
<tr><td class="topAlign"><tt>QPrinter::CurrentPage</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">Only the current page should be printed.</td></tr>
</table>
<p><b>See also </b><a href="qabstractprintdialog.html#PrintRange-enum">QAbstractPrintDialog::PrintRange</a>.</p>
<!-- @@@PrintRange -->
<!-- $$$PrinterMode$$$ScreenResolution$$$PrinterResolution$$$HighResolution -->
<h3 class="fn"><a name="PrinterMode-enum"></a>enum QPrinter::<span class="name">PrinterMode</span></h3>
<p>This enum describes the mode the printer should work in. It basically presets a certain resolution and working mode.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QPrinter::ScreenResolution</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">Sets the resolution of the print device to the screen resolution. This has the big advantage that the results obtained when painting on the printer will match more or less exactly the visible output on the screen. It is the easiest to use, as font metrics on the screen and on the printer are the same. This is the default value. ScreenResolution will produce a lower quality output than HighResolution and should only be used for drafts.</td></tr>
<tr><td class="topAlign"><tt>QPrinter::PrinterResolution</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">This value is deprecated. Is is equivalent to ScreenResolution on Unix and HighResolution on Windows and Mac. Due do the difference between ScreenResolution and HighResolution, use of this value may lead to non-portable printer code.</td></tr>
<tr><td class="topAlign"><tt>QPrinter::HighResolution</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">On Windows, sets the printer resolution to that defined for the printer in use. For PostScript printing, sets the resolution of the PostScript driver to 1200 dpi.</td></tr>
</table>
<p><b>Note:</b> When rendering text on a <a href="qprinter.html">QPrinter</a> device, it is important to realize that the size of text, when specified in points, is independent of the resolution specified for the device itself. Therefore, it may be useful to specify the font size in pixels when combining text with graphics to ensure that their relative sizes are what you expect.</p>
<!-- @@@PrinterMode -->
<!-- $$$PrinterState$$$Idle$$$Active$$$Aborted$$$Error -->
<h3 class="fn"><a name="PrinterState-enum"></a>enum QPrinter::<span class="name">PrinterState</span></h3>
<table class="valuelist"><tr><th class="tblConst">Constant</th><th class="tblVal">Value</th></tr>
<tr><td class="topAlign"><tt>QPrinter::Idle</tt></td><td class="topAlign"><tt>0</tt></td></tr>
<tr><td class="topAlign"><tt>QPrinter::Active</tt></td><td class="topAlign"><tt>1</tt></td></tr>
<tr><td class="topAlign"><tt>QPrinter::Aborted</tt></td><td class="topAlign"><tt>2</tt></td></tr>
<tr><td class="topAlign"><tt>QPrinter::Error</tt></td><td class="topAlign"><tt>3</tt></td></tr>
</table>
<!-- @@@PrinterState -->
<!-- $$$Unit$$$Millimeter$$$Point$$$Inch$$$Pica$$$Didot$$$Cicero$$$DevicePixel -->
<h3 class="fn"><a name="Unit-enum"></a>enum QPrinter::<span class="name">Unit</span></h3>
<p>This enum type is used to specify the measurement unit for page and paper sizes.</p>
<table class="valuelist"><tr><th class="tblConst">Constant</th><th class="tblVal">Value</th></tr>
<tr><td class="topAlign"><tt>QPrinter::Millimeter</tt></td><td class="topAlign"><tt>0</tt></td></tr>
<tr><td class="topAlign"><tt>QPrinter::Point</tt></td><td class="topAlign"><tt>1</tt></td></tr>
<tr><td class="topAlign"><tt>QPrinter::Inch</tt></td><td class="topAlign"><tt>2</tt></td></tr>
<tr><td class="topAlign"><tt>QPrinter::Pica</tt></td><td class="topAlign"><tt>3</tt></td></tr>
<tr><td class="topAlign"><tt>QPrinter::Didot</tt></td><td class="topAlign"><tt>4</tt></td></tr>
<tr><td class="topAlign"><tt>QPrinter::Cicero</tt></td><td class="topAlign"><tt>5</tt></td></tr>
<tr><td class="topAlign"><tt>QPrinter::DevicePixel</tt></td><td class="topAlign"><tt>6</tt></td></tr>
</table>
<p>Note the difference between Point and DevicePixel. The Point unit is defined to be 1/72th of an inch, while the DevicePixel unit is resolution dependant and is based on the actual pixels, or dots, on the printer.</p>
<p>This enum was introduced or modified in Qt 4.4.</p>
<!-- @@@Unit -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QPrinter[overload1]$$$QPrinterPrinterMode -->
<h3 class="fn"><a name="QPrinter"></a>QPrinter::<span class="name">QPrinter</span> ( <span class="type"><a href="qprinter.html#PrinterMode-enum">PrinterMode</a></span> <i>mode</i> = ScreenResolution )</h3>
<p>Creates a new printer object with the given <i>mode</i>.</p>
<!-- @@@QPrinter -->
<!-- $$$QPrinter$$$QPrinterconstQPrinterInfo&PrinterMode -->
<h3 class="fn"><a name="QPrinter-2"></a>QPrinter::<span class="name">QPrinter</span> ( const <span class="type"><a href="qprinterinfo.html">QPrinterInfo</a></span> &amp; <i>printer</i>, <span class="type"><a href="qprinter.html#PrinterMode-enum">PrinterMode</a></span> <i>mode</i> = ScreenResolution )</h3>
<p>Creates a new printer object with the given <i>printer</i> and <i>mode</i>.</p>
<p>This function was introduced in Qt 4.4.</p>
<!-- @@@QPrinter -->
<!-- $$$~QPrinter[overload1]$$$~QPrinter -->
<h3 class="fn"><a name="dtor.QPrinter"></a>QPrinter::<span class="name">~QPrinter</span> ()</h3>
<p>Destroys the printer object and frees any allocated resources. If the printer is destroyed while a print job is in progress this may or may not affect the print job.</p>
<!-- @@@~QPrinter -->
<!-- $$$abort[overload1]$$$abort -->
<h3 class="fn"><a name="abort"></a><span class="type">bool</span> QPrinter::<span class="name">abort</span> ()</h3>
<p>Aborts the current print run. Returns true if the print run was successfully aborted and <a href="qprinter.html#printerState">printerState</a>() will return <a href="qprinter.html#PrinterState-enum">QPrinter::Aborted</a>; otherwise returns false.</p>
<p>It is not always possible to abort a print job. For example, all the data has gone to the printer but the printer cannot or will not cancel the job when asked to.</p>
<!-- @@@abort -->
<!-- $$$collateCopies[overload1]$$$collateCopies -->
<h3 class="fn"><a name="collateCopies"></a><span class="type">bool</span> QPrinter::<span class="name">collateCopies</span> () const</h3>
<p>Returns true if collation is turned on when multiple copies is selected. Returns false if it is turned off when multiple copies is selected. When collating is turned off the printing of each individual page will be repeated the <a href="qprinter-obsolete.html#numCopies" class="obsolete">numCopies</a>() amount before the next page is started. With collating turned on all pages are printed before the next copy of those pages is started.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also </b><a href="qprinter.html#setCollateCopies">setCollateCopies</a>().</p>
<!-- @@@collateCopies -->
<!-- $$$colorMode[overload1]$$$colorMode -->
<h3 class="fn"><a name="colorMode"></a><span class="type"><a href="qprinter.html#ColorMode-enum">ColorMode</a></span> QPrinter::<span class="name">colorMode</span> () const</h3>
<p>Returns the current color mode.</p>
<p><b>See also </b><a href="qprinter.html#setColorMode">setColorMode</a>().</p>
<!-- @@@colorMode -->
<!-- $$$copyCount[overload1]$$$copyCount -->
<h3 class="fn"><a name="copyCount"></a><span class="type">int</span> QPrinter::<span class="name">copyCount</span> () const</h3>
<p>Returns the number of copies that will be printed. The default value is 1.</p>
<p>This function was introduced in Qt 4.7.</p>
<p><b>See also </b><a href="qprinter.html#setCopyCount">setCopyCount</a>() and <a href="qprinter.html#supportsMultipleCopies">supportsMultipleCopies</a>().</p>
<!-- @@@copyCount -->
<!-- $$$creator[overload1]$$$creator -->
<h3 class="fn"><a name="creator"></a><span class="type"><a href="qstring.html">QString</a></span> QPrinter::<span class="name">creator</span> () const</h3>
<p>Returns the name of the application that created the document.</p>
<p><b>See also </b><a href="qprinter.html#setCreator">setCreator</a>().</p>
<!-- @@@creator -->
<!-- $$$docName[overload1]$$$docName -->
<h3 class="fn"><a name="docName"></a><span class="type"><a href="qstring.html">QString</a></span> QPrinter::<span class="name">docName</span> () const</h3>
<p>Returns the document name.</p>
<p><b>See also </b><a href="qprinter.html#setDocName">setDocName</a>() and <a href="qprintengine.html#PrintEnginePropertyKey-enum">QPrintEngine::PrintEnginePropertyKey</a>.</p>
<!-- @@@docName -->
<!-- $$$doubleSidedPrinting[overload1]$$$doubleSidedPrinting -->
<h3 class="fn"><a name="doubleSidedPrinting"></a><span class="type">bool</span> QPrinter::<span class="name">doubleSidedPrinting</span> () const</h3>
<p>Returns true if double side printing is enabled.</p>
<p>Currently this option is only supported on X11.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="qprinter.html#setDoubleSidedPrinting">setDoubleSidedPrinting</a>().</p>
<!-- @@@doubleSidedPrinting -->
<!-- $$$duplex[overload1]$$$duplex -->
<h3 class="fn"><a name="duplex"></a><span class="type"><a href="qprinter.html#DuplexMode-enum">DuplexMode</a></span> QPrinter::<span class="name">duplex</span> () const</h3>
<p>Returns the current duplex mode.</p>
<p>Currently this option is only supported on X11.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also </b><a href="qprinter.html#setDuplex">setDuplex</a>().</p>
<!-- @@@duplex -->
<!-- $$$fontEmbeddingEnabled[overload1]$$$fontEmbeddingEnabled -->
<h3 class="fn"><a name="fontEmbeddingEnabled"></a><span class="type">bool</span> QPrinter::<span class="name">fontEmbeddingEnabled</span> () const</h3>
<p>Returns true if font embedding is enabled.</p>
<p>Currently this option is only supported on X11.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also </b><a href="qprinter.html#setFontEmbeddingEnabled">setFontEmbeddingEnabled</a>().</p>
<!-- @@@fontEmbeddingEnabled -->
<!-- $$$fromPage[overload1]$$$fromPage -->
<h3 class="fn"><a name="fromPage"></a><span class="type">int</span> QPrinter::<span class="name">fromPage</span> () const</h3>
<p>Returns the number of the first page in a range of pages to be printed (the &quot;from page&quot; setting). Pages in a document are numbered according to the convention that the first page is page 1.</p>
<p>By default, this function returns a special value of 0, meaning that the &quot;from page&quot; setting is unset.</p>
<p><b>Note:</b> If fromPage() and <a href="qprinter.html#toPage">toPage</a>() both return 0, this indicates that <i>the whole document will be printed</i>.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also </b><a href="qprinter.html#setFromTo">setFromTo</a>() and <a href="qprinter.html#toPage">toPage</a>().</p>
<!-- @@@fromPage -->
<!-- $$$fullPage[overload1]$$$fullPage -->
<h3 class="fn"><a name="fullPage"></a><span class="type">bool</span> QPrinter::<span class="name">fullPage</span> () const</h3>
<p>Returns true if the origin of the printer's coordinate system is at the corner of the page and false if it is at the edge of the printable area.</p>
<p>See <a href="qprinter.html#setFullPage">setFullPage</a>() for details and caveats.</p>
<p><b>See also </b><a href="qprinter.html#setFullPage">setFullPage</a>() and <a href="qprinter.html#PaperSize-enum">PaperSize</a>.</p>
<!-- @@@fullPage -->
<!-- $$$getPageMargins[overload1]$$$getPageMarginsqreal*qreal*qreal*qreal*Unit -->
<h3 class="fn"><a name="getPageMargins"></a><span class="type">void</span> QPrinter::<span class="name">getPageMargins</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> * <i>left</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> * <i>top</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> * <i>right</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> * <i>bottom</i>, <span class="type"><a href="qprinter.html#Unit-enum">Unit</a></span> <i>unit</i> ) const</h3>
<p>Returns the page margins for this printer in <i>left</i>, <i>top</i>, <i>right</i>, <i>bottom</i>. The unit of the returned margins are specified with the <i>unit</i> parameter.</p>
<p>This function was introduced in Qt 4.4.</p>
<!-- @@@getPageMargins -->
<!-- $$$isValid[overload1]$$$isValid -->
<h3 class="fn"><a name="isValid"></a><span class="type">bool</span> QPrinter::<span class="name">isValid</span> () const</h3>
<p>Returns true if the printer currently selected is a valid printer in the system, or a pure PDF/PostScript printer; otherwise returns false.</p>
<p>To detect other failures check the output of <a href="qpainter.html#begin">QPainter::begin</a>() or <a href="qprinter.html#newPage">QPrinter::newPage</a>().</p>
<pre class="cpp">     <span class="type"><a href="qprinter.html">QPrinter</a></span> printer;
     printer<span class="operator">.</span>setOutputFormat(<span class="type"><a href="qprinter.html">QPrinter</a></span><span class="operator">::</span>PdfFormat);
     printer<span class="operator">.</span>setOutputFileName(<span class="string">&quot;/foobar/nonwritable.pdf&quot;</span>);
     <span class="type"><a href="qpainter.html">QPainter</a></span> painter;
     <span class="keyword">if</span> (<span class="operator">!</span> painter<span class="operator">.</span>begin(<span class="operator">&amp;</span>printer)) { <span class="comment">// failed to open file</span>
         <a href="qtglobal.html#qWarning">qWarning</a>(<span class="string">&quot;failed to open file, is it writable?&quot;</span>);
         <span class="keyword">return</span> <span class="number">1</span>;
     }
     painter<span class="operator">.</span>drawText(<span class="number">10</span><span class="operator">,</span> <span class="number">10</span><span class="operator">,</span> <span class="string">&quot;Test&quot;</span>);
     <span class="keyword">if</span> (<span class="operator">!</span> printer<span class="operator">.</span>newPage()) {
         <a href="qtglobal.html#qWarning">qWarning</a>(<span class="string">&quot;failed in flushing page to disk, disk full?&quot;</span>);
         <span class="keyword">return</span> <span class="number">1</span>;
     }
     painter<span class="operator">.</span>drawText(<span class="number">10</span><span class="operator">,</span> <span class="number">10</span><span class="operator">,</span> <span class="string">&quot;Test 2&quot;</span>);
     painter<span class="operator">.</span>end();</pre>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also </b><a href="qprinter.html#setPrinterName">setPrinterName</a>().</p>
<!-- @@@isValid -->
<!-- $$$newPage[overload1]$$$newPage -->
<h3 class="fn"><a name="newPage"></a><span class="type">bool</span> QPrinter::<span class="name">newPage</span> ()</h3>
<p>Tells the printer to eject the current page and to continue printing on a new page. Returns true if this was successful; otherwise returns false.</p>
<p>Calling newPage() on an inactive <a href="qprinter.html">QPrinter</a> object will always fail.</p>
<!-- @@@newPage -->
<!-- $$$orientation[overload1]$$$orientation -->
<h3 class="fn"><a name="orientation"></a><span class="type"><a href="qprinter.html#Orientation-enum">Orientation</a></span> QPrinter::<span class="name">orientation</span> () const</h3>
<p>Returns the orientation setting. This is driver-dependent, but is usually <a href="qprinter.html#Orientation-enum">QPrinter::Portrait</a>.</p>
<p><b>See also </b><a href="qprinter.html#setOrientation">setOrientation</a>().</p>
<!-- @@@orientation -->
<!-- $$$outputFileName[overload1]$$$outputFileName -->
<h3 class="fn"><a name="outputFileName"></a><span class="type"><a href="qstring.html">QString</a></span> QPrinter::<span class="name">outputFileName</span> () const</h3>
<p>Returns the name of the output file. By default, this is an empty string (indicating that the printer shouldn't print to file).</p>
<p><b>See also </b><a href="qprinter.html#setOutputFileName">setOutputFileName</a>() and <a href="qprintengine.html#PrintEnginePropertyKey-enum">QPrintEngine::PrintEnginePropertyKey</a>.</p>
<!-- @@@outputFileName -->
<!-- $$$outputFormat[overload1]$$$outputFormat -->
<h3 class="fn"><a name="outputFormat"></a><span class="type"><a href="qprinter.html#OutputFormat-enum">OutputFormat</a></span> QPrinter::<span class="name">outputFormat</span> () const</h3>
<p>Returns the output format for this printer.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also </b><a href="qprinter.html#setOutputFormat">setOutputFormat</a>().</p>
<!-- @@@outputFormat -->
<!-- $$$pageOrder[overload1]$$$pageOrder -->
<h3 class="fn"><a name="pageOrder"></a><span class="type"><a href="qprinter.html#PageOrder-enum">PageOrder</a></span> QPrinter::<span class="name">pageOrder</span> () const</h3>
<p>Returns the current page order.</p>
<p>The default page order is <tt>FirstPageFirst</tt>.</p>
<p><b>See also </b><a href="qprinter.html#setPageOrder">setPageOrder</a>().</p>
<!-- @@@pageOrder -->
<!-- $$$pageRect[overload1]$$$pageRect -->
<h3 class="fn"><a name="pageRect"></a><span class="type"><a href="qrect.html">QRect</a></span> QPrinter::<span class="name">pageRect</span> () const</h3>
<p>Returns the page's rectangle; this is usually smaller than the <a href="qprinter.html#paperRect">paperRect</a>() since the page normally has margins between its borders and the paper.</p>
<p>The unit of the returned rectangle is <a href="qprinter.html#Unit-enum">DevicePixel</a>.</p>
<p><b>See also </b><a href="qprinter.html#paperSize">paperSize</a>().</p>
<!-- @@@pageRect -->
<!-- $$$pageRect$$$pageRectUnit -->
<h3 class="fn"><a name="pageRect-2"></a><span class="type"><a href="qrectf.html">QRectF</a></span> QPrinter::<span class="name">pageRect</span> ( <span class="type"><a href="qprinter.html#Unit-enum">Unit</a></span> <i>unit</i> ) const</h3>
<p>Returns the page's rectangle in <i>unit</i>; this is usually smaller than the <a href="qprinter.html#paperRect">paperRect</a>() since the page normally has margins between its borders and the paper.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also </b><a href="qprinter.html#paperSize">paperSize</a>().</p>
<!-- @@@pageRect -->
<!-- $$$paintEngine[overload1]$$$paintEngine -->
<h3 class="fn"><a name="paintEngine"></a><span class="type"><a href="qpaintengine.html">QPaintEngine</a></span> * QPrinter::<span class="name">paintEngine</span> () const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qpaintdevice.html#paintEngine">QPaintDevice::paintEngine</a>().</p>
<p>Returns the paint engine used by the printer.</p>
<!-- @@@paintEngine -->
<!-- $$$paperRect[overload1]$$$paperRect -->
<h3 class="fn"><a name="paperRect"></a><span class="type"><a href="qrect.html">QRect</a></span> QPrinter::<span class="name">paperRect</span> () const</h3>
<p>Returns the paper's rectangle; this is usually larger than the <a href="qprinter.html#pageRect">pageRect</a>().</p>
<p>The unit of the returned rectangle is <a href="qprinter.html#Unit-enum">DevicePixel</a>.</p>
<p><b>See also </b><a href="qprinter.html#pageRect">pageRect</a>().</p>
<!-- @@@paperRect -->
<!-- $$$paperRect$$$paperRectUnit -->
<h3 class="fn"><a name="paperRect-2"></a><span class="type"><a href="qrectf.html">QRectF</a></span> QPrinter::<span class="name">paperRect</span> ( <span class="type"><a href="qprinter.html#Unit-enum">Unit</a></span> <i>unit</i> ) const</h3>
<p>Returns the paper's rectangle in <i>unit</i>; this is usually larger than the <a href="qprinter.html#pageRect">pageRect</a>().</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also </b><a href="qprinter.html#pageRect">pageRect</a>().</p>
<!-- @@@paperRect -->
<!-- $$$paperSize[overload1]$$$paperSize -->
<h3 class="fn"><a name="paperSize"></a><span class="type"><a href="qprinter.html#PaperSize-enum">PaperSize</a></span> QPrinter::<span class="name">paperSize</span> () const</h3>
<p>Returns the printer paper size. The default value is driver-dependent.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also </b><a href="qprinter.html#setPaperSize">setPaperSize</a>(), <a href="qprinter.html#pageRect">pageRect</a>(), and <a href="qprinter.html#paperRect">paperRect</a>().</p>
<!-- @@@paperSize -->
<!-- $$$paperSize$$$paperSizeUnit -->
<h3 class="fn"><a name="paperSize-2"></a><span class="type"><a href="qsizef.html">QSizeF</a></span> QPrinter::<span class="name">paperSize</span> ( <span class="type"><a href="qprinter.html#Unit-enum">Unit</a></span> <i>unit</i> ) const</h3>
<p>Returns the paper size in <i>unit</i>.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also </b><a href="qprinter.html#setPaperSize">setPaperSize</a>().</p>
<!-- @@@paperSize -->
<!-- $$$paperSource[overload1]$$$paperSource -->
<h3 class="fn"><a name="paperSource"></a><span class="type"><a href="qprinter.html#PaperSource-enum">PaperSource</a></span> QPrinter::<span class="name">paperSource</span> () const</h3>
<p>Returns the printer's paper source. This is <tt>Manual</tt> or a printer tray or paper cassette.</p>
<p><b>See also </b><a href="qprinter.html#setPaperSource">setPaperSource</a>().</p>
<!-- @@@paperSource -->
<!-- $$$printEngine[overload1]$$$printEngine -->
<h3 class="fn"><a name="printEngine"></a><span class="type"><a href="qprintengine.html">QPrintEngine</a></span> * QPrinter::<span class="name">printEngine</span> () const</h3>
<p>Returns the print engine used by the printer.</p>
<p>This function was introduced in Qt 4.1.</p>
<!-- @@@printEngine -->
<!-- $$$printProgram[overload1]$$$printProgram -->
<h3 class="fn"><a name="printProgram"></a><span class="type"><a href="qstring.html">QString</a></span> QPrinter::<span class="name">printProgram</span> () const</h3>
<p>Returns the name of the program that sends the print output to the printer.</p>
<p>The default is to return an empty string; meaning that <a href="qprinter.html">QPrinter</a> will try to be smart in a system-dependent way. On X11 only, you can set it to something different to use a specific print program. On the other platforms, this returns an empty string.</p>
<p><b>See also </b><a href="qprinter.html#setPrintProgram">setPrintProgram</a>() and <a href="qprinter.html#setPrinterSelectionOption">setPrinterSelectionOption</a>().</p>
<!-- @@@printProgram -->
<!-- $$$printRange[overload1]$$$printRange -->
<h3 class="fn"><a name="printRange"></a><span class="type"><a href="qprinter.html#PrintRange-enum">PrintRange</a></span> QPrinter::<span class="name">printRange</span> () const</h3>
<p>Returns the page range of the <a href="qprinter.html">QPrinter</a>. After the print setup dialog has been opened, this function returns the value selected by the user.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also </b><a href="qprinter.html#setPrintRange">setPrintRange</a>().</p>
<!-- @@@printRange -->
<!-- $$$printerName[overload1]$$$printerName -->
<h3 class="fn"><a name="printerName"></a><span class="type"><a href="qstring.html">QString</a></span> QPrinter::<span class="name">printerName</span> () const</h3>
<p>Returns the printer name. This value is initially set to the name of the default printer.</p>
<p><b>See also </b><a href="qprinter.html#setPrinterName">setPrinterName</a>().</p>
<!-- @@@printerName -->
<!-- $$$printerSelectionOption[overload1]$$$printerSelectionOption -->
<h3 class="fn"><a name="printerSelectionOption"></a><span class="type"><a href="qstring.html">QString</a></span> QPrinter::<span class="name">printerSelectionOption</span> () const</h3>
<p>Returns the printer options selection string. This is useful only if the print command has been explicitly set.</p>
<p>The default value (an empty string) implies that the printer should be selected in a system-dependent manner.</p>
<p>Any other value implies that the given value should be used.</p>
<p><b>Warning:</b> This function is not available on Windows.</p>
<p><b>See also </b><a href="qprinter.html#setPrinterSelectionOption">setPrinterSelectionOption</a>().</p>
<!-- @@@printerSelectionOption -->
<!-- $$$printerState[overload1]$$$printerState -->
<h3 class="fn"><a name="printerState"></a><span class="type"><a href="qprinter.html#PrinterState-enum">PrinterState</a></span> QPrinter::<span class="name">printerState</span> () const</h3>
<p>Returns the current state of the printer. This may not always be accurate (for example if the printer doesn't have the capability of reporting its state to the operating system).</p>
<!-- @@@printerState -->
<!-- $$$resolution[overload1]$$$resolution -->
<h3 class="fn"><a name="resolution"></a><span class="type">int</span> QPrinter::<span class="name">resolution</span> () const</h3>
<p>Returns the current assumed resolution of the printer, as set by <a href="qprinter.html#setResolution">setResolution</a>() or by the printer driver.</p>
<p><b>See also </b><a href="qprinter.html#setResolution">setResolution</a>().</p>
<!-- @@@resolution -->
<!-- $$$setCollateCopies[overload1]$$$setCollateCopiesbool -->
<h3 class="fn"><a name="setCollateCopies"></a><span class="type">void</span> QPrinter::<span class="name">setCollateCopies</span> ( <span class="type">bool</span> <i>collate</i> )</h3>
<p>Sets the default value for collation checkbox when the print dialog appears. If <i>collate</i> is true, it will enable <a href="qprinter-qt3.html#setCollateCopiesEnabled" class="compat">setCollateCopiesEnabled</a>(). The default value is false. This value will be changed by what the user presses in the print dialog.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also </b><a href="qprinter.html#collateCopies">collateCopies</a>().</p>
<!-- @@@setCollateCopies -->
<!-- $$$setColorMode[overload1]$$$setColorModeColorMode -->
<h3 class="fn"><a name="setColorMode"></a><span class="type">void</span> QPrinter::<span class="name">setColorMode</span> ( <span class="type"><a href="qprinter.html#ColorMode-enum">ColorMode</a></span> <i>newColorMode</i> )</h3>
<p>Sets the printer's color mode to <i>newColorMode</i>, which can be either <tt>Color</tt> or <tt>GrayScale</tt>.</p>
<p><b>See also </b><a href="qprinter.html#colorMode">colorMode</a>().</p>
<!-- @@@setColorMode -->
<!-- $$$setCopyCount[overload1]$$$setCopyCountint -->
<h3 class="fn"><a name="setCopyCount"></a><span class="type">void</span> QPrinter::<span class="name">setCopyCount</span> ( <span class="type">int</span> <i>count</i> )</h3>
<p>Sets the number of copies to be printed to <i>count</i>.</p>
<p>The printer driver reads this setting and prints the specified number of copies.</p>
<p>This function was introduced in Qt 4.7.</p>
<p><b>See also </b><a href="qprinter.html#copyCount">copyCount</a>() and <a href="qprinter.html#supportsMultipleCopies">supportsMultipleCopies</a>().</p>
<!-- @@@setCopyCount -->
<!-- $$$setCreator[overload1]$$$setCreatorconstQString& -->
<h3 class="fn"><a name="setCreator"></a><span class="type">void</span> QPrinter::<span class="name">setCreator</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>creator</i> )</h3>
<p>Sets the name of the application that created the document to <i>creator</i>.</p>
<p>This function is only applicable to the X11 version of Qt. If no creator name is specified, the creator will be set to &quot;Qt&quot; followed by some version number.</p>
<p><b>See also </b><a href="qprinter.html#creator">creator</a>().</p>
<!-- @@@setCreator -->
<!-- $$$setDocName[overload1]$$$setDocNameconstQString& -->
<h3 class="fn"><a name="setDocName"></a><span class="type">void</span> QPrinter::<span class="name">setDocName</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>name</i> )</h3>
<p>Sets the document name to <i>name</i>.</p>
<p>On X11, the document name is for example used as the default output filename in <a href="qprintdialog.html">QPrintDialog</a>. Note that the document name does not affect the file name if the printer is printing to a file. Use the setOutputFile() function for this.</p>
<p><b>See also </b><a href="qprinter.html#docName">docName</a>() and <a href="qprintengine.html#PrintEnginePropertyKey-enum">QPrintEngine::PrintEnginePropertyKey</a>.</p>
<!-- @@@setDocName -->
<!-- $$$setDoubleSidedPrinting[overload1]$$$setDoubleSidedPrintingbool -->
<h3 class="fn"><a name="setDoubleSidedPrinting"></a><span class="type">void</span> QPrinter::<span class="name">setDoubleSidedPrinting</span> ( <span class="type">bool</span> <i>doubleSided</i> )</h3>
<p>Enables double sided printing if <i>doubleSided</i> is true; otherwise disables it.</p>
<p>Currently this option is only supported on X11.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="qprinter.html#doubleSidedPrinting">doubleSidedPrinting</a>().</p>
<!-- @@@setDoubleSidedPrinting -->
<!-- $$$setDuplex[overload1]$$$setDuplexDuplexMode -->
<h3 class="fn"><a name="setDuplex"></a><span class="type">void</span> QPrinter::<span class="name">setDuplex</span> ( <span class="type"><a href="qprinter.html#DuplexMode-enum">DuplexMode</a></span> <i>duplex</i> )</h3>
<p>Enables double sided printing based on the <i>duplex</i> mode.</p>
<p>Currently this option is only supported on X11.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also </b><a href="qprinter.html#duplex">duplex</a>().</p>
<!-- @@@setDuplex -->
<!-- $$$setEngines[overload1]$$$setEnginesQPrintEngine*QPaintEngine* -->
<h3 class="fn"><a name="setEngines"></a><span class="type">void</span> QPrinter::<span class="name">setEngines</span> ( <span class="type"><a href="qprintengine.html">QPrintEngine</a></span> * <i>printEngine</i>, <span class="type"><a href="qpaintengine.html">QPaintEngine</a></span> * <i>paintEngine</i> )<tt> [protected]</tt></h3>
<p>This function is used by subclasses of <a href="qprinter.html">QPrinter</a> to specify custom print and paint engines (<i>printEngine</i> and <i>paintEngine</i>, respectively).</p>
<p><a href="qprinter.html">QPrinter</a> does not take ownership of the engines, so you need to manage these engine instances yourself.</p>
<p>Note that changing the engines will reset the printer state and all its properties.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also </b><a href="qprinter.html#printEngine">printEngine</a>(), <a href="qprinter.html#paintEngine">paintEngine</a>(), and <a href="qprinter.html#setOutputFormat">setOutputFormat</a>().</p>
<!-- @@@setEngines -->
<!-- $$$setFontEmbeddingEnabled[overload1]$$$setFontEmbeddingEnabledbool -->
<h3 class="fn"><a name="setFontEmbeddingEnabled"></a><span class="type">void</span> QPrinter::<span class="name">setFontEmbeddingEnabled</span> ( <span class="type">bool</span> <i>enable</i> )</h3>
<p>Enabled or disables font embedding depending on <i>enable</i>.</p>
<p>Currently this option is only supported on X11.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also </b><a href="qprinter.html#fontEmbeddingEnabled">fontEmbeddingEnabled</a>().</p>
<!-- @@@setFontEmbeddingEnabled -->
<!-- $$$setFromTo[overload1]$$$setFromTointint -->
<h3 class="fn"><a name="setFromTo"></a><span class="type">void</span> QPrinter::<span class="name">setFromTo</span> ( <span class="type">int</span> <i>from</i>, <span class="type">int</span> <i>to</i> )</h3>
<p>Sets the range of pages to be printed to cover the pages with numbers specified by <i>from</i> and <i>to</i>, where <i>from</i> corresponds to the first page in the range and <i>to</i> corresponds to the last.</p>
<p><b>Note:</b> Pages in a document are numbered according to the convention that the first page is page 1. However, if <i>from</i> and <i>to</i> are both set to 0, the <i>whole document will be printed</i>.</p>
<p>This function is mostly used to set a default value that the user can override in the print dialog when you call <a href="qprinter-qt3.html#setup" class="compat">setup</a>().</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also </b><a href="qprinter.html#fromPage">fromPage</a>() and <a href="qprinter.html#toPage">toPage</a>().</p>
<!-- @@@setFromTo -->
<!-- $$$setFullPage[overload1]$$$setFullPagebool -->
<h3 class="fn"><a name="setFullPage"></a><span class="type">void</span> QPrinter::<span class="name">setFullPage</span> ( <span class="type">bool</span> <i>fp</i> )</h3>
<p>If <i>fp</i> is true, enables support for painting over the entire page; otherwise restricts painting to the printable area reported by the device.</p>
<p>By default, full page printing is disabled. In this case, the origin of the <a href="qprinter.html">QPrinter</a>'s coordinate system coincides with the top-left corner of the printable area.</p>
<p>If full page printing is enabled, the origin of the <a href="qprinter.html">QPrinter</a>'s coordinate system coincides with the top-left corner of the paper itself. In this case, the <a href="qpaintdevice.html#PaintDeviceMetric-enum">device metrics</a> will report the exact same dimensions as indicated by <a href="qprinter.html#PaperSize-enum">PaperSize</a>. It may not be possible to print on the entire physical page because of the printer's margins, so the application must account for the margins itself.</p>
<p><b>See also </b><a href="qprinter.html#fullPage">fullPage</a>(), <a href="qprinter.html#setPaperSize">setPaperSize</a>(), <a href="qpaintdevice.html#width">width</a>(), <a href="qpaintdevice.html#height">height</a>(), and <a href="printing.html">Printing with Qt</a>.</p>
<!-- @@@setFullPage -->
<!-- $$$setOrientation[overload1]$$$setOrientationOrientation -->
<h3 class="fn"><a name="setOrientation"></a><span class="type">void</span> QPrinter::<span class="name">setOrientation</span> ( <span class="type"><a href="qprinter.html#Orientation-enum">Orientation</a></span> <i>orientation</i> )</h3>
<p>Sets the print orientation to <i>orientation</i>.</p>
<p>The orientation can be either <a href="qprinter.html#Orientation-enum">QPrinter::Portrait</a> or <a href="qprinter.html#Orientation-enum">QPrinter::Landscape</a>.</p>
<p>The printer driver reads this setting and prints using the specified orientation.</p>
<p>On Windows, this option can be changed while printing and will take effect from the next call to <a href="qprinter.html#newPage">newPage</a>().</p>
<p>On Mac OS X, changing the orientation during a print job has no effect.</p>
<p><b>See also </b><a href="qprinter.html#orientation">orientation</a>().</p>
<!-- @@@setOrientation -->
<!-- $$$setOutputFileName[overload1]$$$setOutputFileNameconstQString& -->
<h3 class="fn"><a name="setOutputFileName"></a><span class="type">void</span> QPrinter::<span class="name">setOutputFileName</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>fileName</i> )</h3>
<p>Sets the name of the output file to <i>fileName</i>.</p>
<p>Setting a null or empty name (0 or &quot;&quot;) disables printing to a file. Setting a non-empty name enables printing to a file.</p>
<p>This can change the value of <a href="qprinter.html#outputFormat">outputFormat</a>(). If the file name has the suffix &quot;.ps&quot; then PostScript is automatically selected as output format. If the file name has the &quot;.pdf&quot; suffix PDF is generated. If the file name has a suffix other than &quot;.ps&quot; and &quot;.pdf&quot;, the output format used is the one set with <a href="qprinter.html#setOutputFormat">setOutputFormat</a>().</p>
<p><a href="qprinter.html">QPrinter</a> uses Qt's cross-platform PostScript or PDF print engines respectively. If you can produce this format natively, for example Mac OS X can generate PDF's from its print engine, set the output format back to <a href="qprinter.html#OutputFormat-enum">NativeFormat</a>.</p>
<p><b>See also </b><a href="qprinter.html#outputFileName">outputFileName</a>(), <a href="qprinter-qt3.html#setOutputToFile" class="compat">setOutputToFile</a>(), and <a href="qprinter.html#setOutputFormat">setOutputFormat</a>().</p>
<!-- @@@setOutputFileName -->
<!-- $$$setOutputFormat[overload1]$$$setOutputFormatOutputFormat -->
<h3 class="fn"><a name="setOutputFormat"></a><span class="type">void</span> QPrinter::<span class="name">setOutputFormat</span> ( <span class="type"><a href="qprinter.html#OutputFormat-enum">OutputFormat</a></span> <i>format</i> )</h3>
<p>Sets the output format for this printer to <i>format</i>.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also </b><a href="qprinter.html#outputFormat">outputFormat</a>().</p>
<!-- @@@setOutputFormat -->
<!-- $$$setPageMargins[overload1]$$$setPageMarginsqrealqrealqrealqrealUnit -->
<h3 class="fn"><a name="setPageMargins"></a><span class="type">void</span> QPrinter::<span class="name">setPageMargins</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>left</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>top</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>right</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>bottom</i>, <span class="type"><a href="qprinter.html#Unit-enum">Unit</a></span> <i>unit</i> )</h3>
<p>This function sets the <i>left</i>, <i>top</i>, <i>right</i> and <i>bottom</i> page margins for this printer. The unit of the margins are specified with the <i>unit</i> parameter.</p>
<p>This function was introduced in Qt 4.4.</p>
<!-- @@@setPageMargins -->
<!-- $$$setPageOrder[overload1]$$$setPageOrderPageOrder -->
<h3 class="fn"><a name="setPageOrder"></a><span class="type">void</span> QPrinter::<span class="name">setPageOrder</span> ( <span class="type"><a href="qprinter.html#PageOrder-enum">PageOrder</a></span> <i>pageOrder</i> )</h3>
<p>Sets the page order to <i>pageOrder</i>.</p>
<p>The page order can be <a href="qprinter.html#PageOrder-enum">QPrinter::FirstPageFirst</a> or <a href="qprinter.html#PageOrder-enum">QPrinter::LastPageFirst</a>. The application is responsible for reading the page order and printing accordingly.</p>
<p>This function is mostly useful for setting a default value that the user can override in the print dialog.</p>
<p>This function is only supported under X11.</p>
<p><b>See also </b><a href="qprinter.html#pageOrder">pageOrder</a>().</p>
<!-- @@@setPageOrder -->
<!-- $$$setPaperSize[overload1]$$$setPaperSizePaperSize -->
<h3 class="fn"><a name="setPaperSize"></a><span class="type">void</span> QPrinter::<span class="name">setPaperSize</span> ( <span class="type"><a href="qprinter.html#PaperSize-enum">PaperSize</a></span> <i>newPaperSize</i> )</h3>
<p>Sets the printer paper size to <i>newPaperSize</i> if that size is supported. The result is undefined if <i>newPaperSize</i> is not supported.</p>
<p>The default paper size is driver-dependent.</p>
<p>This function is useful mostly for setting a default value that the user can override in the print dialog.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also </b><a href="qprinter.html#paperSize">paperSize</a>(), <a href="qprinter.html#PaperSize-enum">PaperSize</a>, <a href="qprinter.html#setFullPage">setFullPage</a>(), <a href="qprinter.html#setResolution">setResolution</a>(), <a href="qprinter.html#pageRect">pageRect</a>(), and <a href="qprinter.html#paperRect">paperRect</a>().</p>
<!-- @@@setPaperSize -->
<!-- $$$setPaperSize$$$setPaperSizeconstQSizeF&Unit -->
<h3 class="fn"><a name="setPaperSize-2"></a><span class="type">void</span> QPrinter::<span class="name">setPaperSize</span> ( const <span class="type"><a href="qsizef.html">QSizeF</a></span> &amp; <i>paperSize</i>, <span class="type"><a href="qprinter.html#Unit-enum">Unit</a></span> <i>unit</i> )</h3>
<p>Sets the paper size based on <i>paperSize</i> in <i>unit</i>.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also </b><a href="qprinter.html#paperSize">paperSize</a>().</p>
<!-- @@@setPaperSize -->
<!-- $$$setPaperSource[overload1]$$$setPaperSourcePaperSource -->
<h3 class="fn"><a name="setPaperSource"></a><span class="type">void</span> QPrinter::<span class="name">setPaperSource</span> ( <span class="type"><a href="qprinter.html#PaperSource-enum">PaperSource</a></span> <i>source</i> )</h3>
<p>Sets the paper source setting to <i>source</i>.</p>
<p>Windows only: This option can be changed while printing and will take effect from the next call to <a href="qprinter.html#newPage">newPage</a>()</p>
<p><b>See also </b><a href="qprinter.html#paperSource">paperSource</a>().</p>
<!-- @@@setPaperSource -->
<!-- $$$setPrintProgram[overload1]$$$setPrintProgramconstQString& -->
<h3 class="fn"><a name="setPrintProgram"></a><span class="type">void</span> QPrinter::<span class="name">setPrintProgram</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>printProg</i> )</h3>
<p>Sets the name of the program that should do the print job to <i>printProg</i>.</p>
<p>On X11, this function sets the program to call with the PostScript output. On other platforms, it has no effect.</p>
<p><b>See also </b><a href="qprinter.html#printProgram">printProgram</a>().</p>
<!-- @@@setPrintProgram -->
<!-- $$$setPrintRange[overload1]$$$setPrintRangePrintRange -->
<h3 class="fn"><a name="setPrintRange"></a><span class="type">void</span> QPrinter::<span class="name">setPrintRange</span> ( <span class="type"><a href="qprinter.html#PrintRange-enum">PrintRange</a></span> <i>range</i> )</h3>
<p>Sets the print range option in to be <i>range</i>.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also </b><a href="qprinter.html#printRange">printRange</a>().</p>
<!-- @@@setPrintRange -->
<!-- $$$setPrinterName[overload1]$$$setPrinterNameconstQString& -->
<h3 class="fn"><a name="setPrinterName"></a><span class="type">void</span> QPrinter::<span class="name">setPrinterName</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>name</i> )</h3>
<p>Sets the printer name to <i>name</i>.</p>
<p><b>See also </b><a href="qprinter.html#printerName">printerName</a>() and <a href="qprinter.html#isValid">isValid</a>().</p>
<!-- @@@setPrinterName -->
<!-- $$$setPrinterSelectionOption[overload1]$$$setPrinterSelectionOptionconstQString& -->
<h3 class="fn"><a name="setPrinterSelectionOption"></a><span class="type">void</span> QPrinter::<span class="name">setPrinterSelectionOption</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>option</i> )</h3>
<p>Sets the printer to use <i>option</i> to select the printer. <i>option</i> is null by default (which implies that Qt should be smart enough to guess correctly), but it can be set to other values to use a specific printer selection option.</p>
<p>If the printer selection option is changed while the printer is active, the current print job may or may not be affected.</p>
<p><b>Warning:</b> This function is not available on Windows.</p>
<p><b>See also </b><a href="qprinter.html#printerSelectionOption">printerSelectionOption</a>().</p>
<!-- @@@setPrinterSelectionOption -->
<!-- $$$setResolution[overload1]$$$setResolutionint -->
<h3 class="fn"><a name="setResolution"></a><span class="type">void</span> QPrinter::<span class="name">setResolution</span> ( <span class="type">int</span> <i>dpi</i> )</h3>
<p>Requests that the printer prints at <i>dpi</i> or as near to <i>dpi</i> as possible.</p>
<p>This setting affects the coordinate system as returned by, for example <a href="qpainter.html#viewport">QPainter::viewport</a>().</p>
<p>This function must be called before <a href="qpainter.html#begin">QPainter::begin</a>() to have an effect on all platforms.</p>
<p><b>See also </b><a href="qprinter.html#resolution">resolution</a>() and <a href="qprinter.html#setPaperSize">setPaperSize</a>().</p>
<!-- @@@setResolution -->
<!-- $$$setWinPageSize[overload1]$$$setWinPageSizeint -->
<h3 class="fn"><a name="setWinPageSize"></a><span class="type">void</span> QPrinter::<span class="name">setWinPageSize</span> ( <span class="type">int</span> <i>pageSize</i> )</h3>
<p>Sets the page size to be used by the printer under Windows to <i>pageSize</i>.</p>
<p><b>Warning:</b> This function is not portable so you may prefer to use <a href="qprinter.html#setPaperSize">setPaperSize</a>() instead.</p>
<p><b>See also </b><a href="qprinter.html#winPageSize">winPageSize</a>().</p>
<!-- @@@setWinPageSize -->
<!-- $$$supportedPaperSources[overload1]$$$supportedPaperSources -->
<h3 class="fn"><a name="supportedPaperSources"></a><span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qprinter.html#PaperSource-enum">PaperSource</a></span>&gt; QPrinter::<span class="name">supportedPaperSources</span> () const</h3>
<p>Returns the supported paper sizes for this printer.</p>
<p>The values will be either a value that matches an entry in the <a href="qprinter.html#PaperSource-enum">QPrinter::PaperSource</a> enum or a driver spesific value. The driver spesific values are greater than the constant DMBIN_USER declared in wingdi.h&#x2e;</p>
<p><b>Warning:</b> This function is only available in windows.</p>
<!-- @@@supportedPaperSources -->
<!-- $$$supportedResolutions[overload1]$$$supportedResolutions -->
<h3 class="fn"><a name="supportedResolutions"></a><span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type">int</span>&gt; QPrinter::<span class="name">supportedResolutions</span> () const</h3>
<p>Returns a list of the resolutions (a list of dots-per-inch integers) that the printer says it supports.</p>
<p>For X11 where all printing is directly to postscript, this function will always return a one item list containing only the postscript resolution, i.e&#x2e;, 72 (72 dpi -- but see <a href="qprinter.html#PrinterMode-enum">PrinterMode</a>).</p>
<!-- @@@supportedResolutions -->
<!-- $$$supportsMultipleCopies[overload1]$$$supportsMultipleCopies -->
<h3 class="fn"><a name="supportsMultipleCopies"></a><span class="type">bool</span> QPrinter::<span class="name">supportsMultipleCopies</span> () const</h3>
<p>Returns true if the printer supports printing multiple copies of the same document in one job; otherwise false is returned.</p>
<p>On most systems this function will return true. However, on X11 systems that do not support CUPS, this function will return false. That means the application has to handle the number of copies by printing the same document the required number of times.</p>
<p>This function was introduced in Qt 4.7.</p>
<p><b>See also </b><a href="qprinter.html#setCopyCount">setCopyCount</a>() and <a href="qprinter.html#copyCount">copyCount</a>().</p>
<!-- @@@supportsMultipleCopies -->
<!-- $$$toPage[overload1]$$$toPage -->
<h3 class="fn"><a name="toPage"></a><span class="type">int</span> QPrinter::<span class="name">toPage</span> () const</h3>
<p>Returns the number of the last page in a range of pages to be printed (the &quot;to page&quot; setting). Pages in a document are numbered according to the convention that the first page is page 1.</p>
<p>By default, this function returns a special value of 0, meaning that the &quot;to page&quot; setting is unset.</p>
<p><b>Note:</b> If <a href="qprinter.html#fromPage">fromPage</a>() and toPage() both return 0, this indicates that <i>the whole document will be printed</i>.</p>
<p>The programmer is responsible for reading this setting and printing accordingly.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also </b><a href="qprinter.html#setFromTo">setFromTo</a>() and <a href="qprinter.html#fromPage">fromPage</a>().</p>
<!-- @@@toPage -->
<!-- $$$winPageSize[overload1]$$$winPageSize -->
<h3 class="fn"><a name="winPageSize"></a><span class="type">int</span> QPrinter::<span class="name">winPageSize</span> () const</h3>
<p>Returns the page size used by the printer under Windows.</p>
<p><b>Warning:</b> This function is not portable so you may prefer to use <a href="qprinter.html#paperSize">paperSize</a>() instead.</p>
<p><b>See also </b><a href="qprinter.html#setWinPageSize">setWinPageSize</a>().</p>
<!-- @@@winPageSize -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2015 The Qt Company Ltd.
      Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Qt and respective logos are trademarks of The Qt Company Ltd 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
  </div>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>