Qt-Printing: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
=Qt Printing=
[[Category:Developing_Qt::Printing]]
 
= Qt Printing =


This is the hub page for the Qt Printing module. This page will link to developer documentation for the module.
This is the hub page for the Qt Printing module. This page will link to developer documentation for the module.


The Qt Printing module maintainer is John Layt (jlayt on Devnet or johnlayt on <span class="caps">JIRA</span>/Gerrit) &lt;jlayt@kde.org&gt;.
The Qt Printing module maintainer is John Layt (jlayt on Devnet or johnlayt on JIRA/Gerrit) &lt;jlayt<code>kde.org&amp;gt;.


==Qt 5.0 Status==
== Qt 5.0 Status ==


Status as at 2010-06-22
Status as at 2010-06-22


[https://bugreports.qt.io/browse/QTBUG-25381 Qt 5.0 Release Task] ''[bugreports.qt.io]''
&quot;Qt 5.0 Release Task&amp;quot;:https://bugreports.qt.io/browse/QTBUG-25381
 
Linux – In Testing, mostly works
 
Mac – In Testing, mostly works


* Fonts rendered incorrectly, see https://bugreports.qt.io/browse/QTBUG-25555
Linux - In Testing, mostly works


Windows – Untested by me.
Mac - In Testing, mostly works<br />* Fonts rendered incorrectly, see https://bugreports.qt.io/browse/QTBUG-25555


Todo:
Windows - Untested by me.


* Complete removal of QAbstractPageSetupWidget
Todo:<br />* Complete removal of QAbstractPageSetupWidget<br />* Still time for removal of QAbstractPrintDialog?<br />* Clean-ups and bug fixes in Linux print dialog<br />* Write a feature matrix for print support on different platforms<br />* Rewrite tst_qprinter to correctly test platform options per feature matrix, currently very broken<br />* Write manual printing test plan for features that cannot be auto tested<br />* Develop auto tests that add/delete printers to test QPrinterInfo<br />* Review platform specific code still in core
* Still time for removal of QAbstractPrintDialog?
* Clean-ups and bug fixes in Linux print dialog
* Write a feature matrix for print support on different platforms
* Rewrite tst_qprinter to correctly test platform options per feature matrix, currently very broken
* Write manual printing test plan for features that cannot be auto tested
* Develop auto tests that add/delete printers to test QPrinterInfo
* Review platform specific code still in core


===Release criteria===
=== Release criteria ===


The following criteria must be met on all 3 platforms for release:
The following criteria must be met on all 3 platforms for release:
Line 38: Line 29:
* Platform Plugin fully implemented for all required features
* Platform Plugin fully implemented for all required features
* Print to printer tested visually, no font or layout issues
* Print to printer tested visually, no font or layout issues
* Print to <span class="caps">PDF</span> tested visually, no font or layout issues
* Print to PDF tested visually, no font or layout issues
* Print dialog tested, all options function as expected
* Print dialog tested, all options function as expected


The following tasks also performed:
The following tasks also performed:<br />* API reviewed for any last clean-ups<br />* Build system reviewed<br />* Includes reviewed<br />* Documentation reviewed
 
* <span class="caps">API</span> reviewed for any last clean-ups
* Build system reviewed
* Includes reviewed
* Documentation reviewed


For testing painted output, use the example/richtext/textedit or Qt Assistant.
For testing painted output, use the example/richtext/textedit or Qt Assistant.


==Bugs==
== Bugs ==


Bugs are assigned to the [https://bugreports.qt.io/browse/QTBUG/component/19140 <span class="caps">GUI</span>: Printing] ''[bugreports.qt.io]'' component in <span class="caps">JIRA</span>.
Bugs are assigned to the &quot;GUI: Printing&amp;quot;:https://bugreports.qt.io/browse/QTBUG/component/19140 component in JIRA.


The following are Tasks to track specific areas within Qt Printing:
The following are Tasks to track specific areas within Qt Printing:


[https://bugreports.qt.io/browse/QTBUG-25385 <span class="caps">QTBUG</span>-25385 QPrinter – New Printing Module requested features] ''[bugreports.qt.io]''<br />[https://bugreports.qt.io/browse/QTBUG-25384 <span class="caps">QTBUG</span>-25384 QPrinter Windows related issues] ''[bugreports.qt.io]''<br />[https://bugreports.qt.io/browse/QTBUG-25383 <span class="caps">QTBUG</span>-25383 QPrinter Mac OS X related issues] ''[bugreports.qt.io]''<br />[https://bugreports.qt.io/browse/QTBUG-25381 <span class="caps">QTBUG</span>-25381 QPrinter Qt 5.0 Release Task] ''[bugreports.qt.io]''<br />[https://bugreports.qt.io/browse/QTBUG-25380 <span class="caps">QTBUG</span>-25380 QPrinter Page Size and Margin Related Issues] ''[bugreports.qt.io]''<br />[https://bugreports.qt.io/browse/QTBUG-25379 <span class="caps">QTBUG</span>-25379 QPrinter – <span class="caps">PDF</span> Generator Related Issues] ''[bugreports.qt.io]''<br />[https://bugreports.qt.io/browse/QTBUG-25378 <span class="caps">QTBUG</span>-25378 QPrinter Font Related Issues] ''[bugreports.qt.io]''<br />[https://bugreports.qt.io/browse/QTBUG-25377 <span class="caps">QTBUG</span>-25377 QPrinter Remote Printer Issues] ''[bugreports.qt.io]''<br />[https://bugreports.qt.io/browse/QTBUG-25372 <span class="caps">QTBUG</span>-25372 QPrinter – <span class="caps">CUPS</span> Settings In Linux Print Dialog] ''[bugreports.qt.io]''
&quot;QTBUG-25385 QPrinter - New Printing Module requested features&amp;quot;:https://bugreports.qt.io/browse/QTBUG-25385<br />&quot;QTBUG-25384 QPrinter - Windows related issues&amp;quot;:https://bugreports.qt.io/browse/QTBUG-25384<br />&quot;QTBUG-25383 QPrinter - Mac OS X related issues&amp;quot;:https://bugreports.qt.io/browse/QTBUG-25383<br />&quot;QTBUG-25381 QPrinter - Qt 5.0 Release Task&amp;quot;:https://bugreports.qt.io/browse/QTBUG-25381<br />&quot;QTBUG-25380 QPrinter - Page Size and Margin Related Issues&amp;quot;:https://bugreports.qt.io/browse/QTBUG-25380<br />&quot;QTBUG-25379 QPrinter - PDF Generator Related Issues&amp;quot;:https://bugreports.qt.io/browse/QTBUG-25379<br />&quot;QTBUG-25378 QPrinter - Font Related Issues&amp;quot;:https://bugreports.qt.io/browse/QTBUG-25378<br />&quot;QTBUG-25377 QPrinter - Remote Printer Issues&amp;quot;:https://bugreports.qt.io/browse/QTBUG-25377<br />&quot;QTBUG-25372 QPrinter - CUPS Settings In Linux Print Dialog&amp;quot;:https://bugreports.qt.io/browse/QTBUG-25372


==Qt 4 Printing Support in QtGui / QtWidgets==
== Qt 4 Printing Support in QtGui / QtWidgets ==


==Qt 5 QtPrintSupport Module==
== Qt 5 QtPrintSupport Module ==


The Qt 4 printing code was moved in a new library QtPrintingSupport and a new PrintSupport platform plugin. The code can be found in qtbase/src/printsupport and qtbase/plugins/printsupport
The Qt 4 printing code was moved in a new library QtPrintingSupport and a new PrintSupport platform plugin. The code can be found in qtbase/src/printsupport and qtbase/plugins/printsupport


===QPrintEngine Keys===
=== QPrintEngine Keys ===


{| class="infotable line"
{|
! Key
!Key
! Type
!Type
! Win Set
!Win Set
! Win Get
!Win Get
! Mac Set
!Mac Set
! Mac Get
!Mac Get
! <span class="caps">PDF</span> Set
!PDF Set
! <span class="caps">PDF</span> Get
!PDF Get
! <span class="caps">CUPS</span> Set
!CUPS Set
! <span class="caps">CUPS</span> Get
!CUPS Get
|-
|-
| <span class="caps">PPK</span>_CollateCopies
|PPK_CollateCopies
| Setting
|Setting
| y
|y
| <span class="caps">FALSE</span>
|FALSE
| n
|n
| <span class="caps">FALSE</span>
|FALSE
| y
|y
| y
|y
| y
|y
| y
|y
|-
|-
| <span class="caps">PPK</span>_ColorMode
|PPK_ColorMode
| Setting
|Setting
| y
|y
| y
|y
| n
|n
| Color
|Color
| y
|y
| y
|y
| y
|y
| y
|y
|-
|-
| <span class="caps">PPK</span>_Creator
|PPK_Creator
| Setting
|Setting
| n
|n
| <span class="caps">NULL</span>
|NULL
| n
|n
| <span class="caps">NULL</span>
|NULL
| y
|y
| y
|y
| y
|y
| y
|y
|-
|-
| <span class="caps">PPK</span>_DocumentName
|PPK_DocumentName
| Setting
|Setting
| y
|y
| y
|y
| n
|n
| <span class="caps">NULL</span>
|NULL
| y
|y
| y
|y
| y
|y
| y
|y
|-
|-
| <span class="caps">PPK</span>_FullPage
|PPK_FullPage
| Setting
|Setting
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
|-
|-
| <span class="caps">PPK</span>_NumberOfCopies
|PPK_NumberOfCopies
| Setting
|Setting
| y
|y
| 1
|1
| y
|y
| 1
|1
| y
|y
| y
|y
| y
|y
| 1
|1
|-
|-
| <span class="caps">PPK</span>_Orientation
|PPK_Orientation
| Setting
|Setting
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
|-
|-
| <span class="caps">PPK</span>_OutputFileName
|PPK_OutputFileName
| Setting
|Setting
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
|-
|-
| <span class="caps">PPK</span>_PageOrder
|PPK_PageOrder
| Setting
|Setting
| n
|n
| <span class="caps">NULL</span>
|NULL
| n
|n
| <span class="caps">NULL</span>
|NULL
| y
|y
| y
|y
| y
|y
| y
|y
|-
|-
| <span class="caps">PPK</span>_PageSize
|PPK_PageSize
| Setting
|Setting
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
|-
|-
| <span class="caps">PPK</span>_PaperSize = <span class="caps">PPK</span>_PageSize
|PPK_PaperSize = PPK_PageSize
| Setting
|Setting
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
|-
|-
| <span class="caps">PPK</span>_PaperSource
|PPK_PaperSource
| Setting
|Setting
| y
|y
| y
|y
| n
|n
| <span class="caps">NULL</span>
|NULL
| y
|y
| y
|y
| y
|y
| y
|y
|-
|-
| <span class="caps">PPK</span>_PrinterName
|PPK_PrinterName
| Setting
|Setting
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
|-
|-
| <span class="caps">PPK</span>_PrinterProgram
|PPK_PrinterProgram
| Setting
|Setting
| n
|n
| <span class="caps">NULL</span>
|NULL
| n
|n
| <span class="caps">NULL</span>
|NULL
| y
|y
| y
|y
| y
|y
| y
|y
|-
|-
| <span class="caps">PPK</span>_Resolution
|PPK_Resolution
| Setting
|Setting
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
|-
|-
| <span class="caps">PPK</span>_SelectionOption
|PPK_SelectionOption
| Setting
|Setting
| n
|n
| <span class="caps">NULL</span>
|NULL
| n
|n
| <span class="caps">NULL</span>
|NULL
| y
|y
| y
|y
| y
|y
| y
|y
|-
|-
| <span class="caps">PPK</span>_WindowsPageSize
|PPK_WindowsPageSize
| Setting
|Setting
| y
|y
| y
|y
| n
|n
| <span class="caps">NULL</span>
|NULL
| n
|n
| <span class="caps">NULL</span>
|NULL
| n
|n
| <span class="caps">NULL</span>
|NULL
|-
|-
| <span class="caps">PPK</span>_FontEmbedding
|PPK_FontEmbedding
| Setting
|Setting
| n
|n
| <span class="caps">NULL</span>
|NULL
| n
|n
| <span class="caps">NULL</span>
|NULL
| y
|y
| y
|y
| y
|y
| y
|y
|-
|-
| <span class="caps">PPK</span>_Duplex
|PPK_Duplex
| Setting
|Setting
| n
|n
| <span class="caps">NULL</span>
|NULL
| n
|n
| <span class="caps">NULL</span>
|NULL
| y
|y
| y
|y
| y
|y
| y
|y
|-
|-
| <span class="caps">PPK</span>_CustomPaperSize
|PPK_CustomPaperSize
| Setting
|Setting
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
|-
|-
| <span class="caps">PPK</span>_PageMargins
|PPK_PageMargins
| Setting
|Setting
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
|-
|-
| <span class="caps">PPK</span>_CopyCount
|PPK_CopyCount
| Setting
|Setting
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
| y
|y
|-
|-
| <span class="caps">PPK</span>_PageRect
|PPK_PageRect
| Derived
|Derived
| n
|n
| y
|y
| n
|n
| y
|y
| n
|n
| y
|y
| n
|n
| y
|y
|-
|-
| <span class="caps">PPK</span>_PaperRect
|PPK_PaperRect
| Derived
|Derived
| n
|n
| y
|y
| n
|n
| y
|y
| n
|n
| y
|y
| n
|n
| y
|y
|-
|-
| <span class="caps">PPK</span>_SupportedResolutions
|PPK_SupportedResolutions
| Feature
|Feature
| n
|n
| y
|y
| n
|n
| y
|y
| n
|n
| 72
|72
| n
|n
| 72
|72
|-
|-
| <span class="caps">PPK</span>_PaperSources
|PPK_PaperSources
| Feature
|Feature
| n
|n
| y
|y
| n
|n
| <span class="caps">NULL</span>
|NULL
| n
|n
| <span class="caps">NULL</span>
|NULL
| n
|n
| <span class="caps">NULL</span>
|NULL
|-
|-
| <span class="caps">PPK</span>_SupportsMultipleCopies
|PPK_SupportsMultipleCopies
| Feature
|Feature
| n
|n
| <span class="caps">TRUE</span>
|TRUE
| n
|n
| <span class="caps">TRUE</span>
|TRUE
| n
|n
| <span class="caps">FALSE</span>
|FALSE
| n
|n
| <span class="caps">TRUE</span>
|TRUE
|-
|-
| <span class="caps">PPK</span>_SuppressSystemPrintStatus
|PPK_SuppressSystemPrintStatus
| Unused?
|Unused?
| n
|n
| <span class="caps">NULL</span>
|NULL
| n
|n
| <span class="caps">NULL</span>
|NULL
| n
|n
| <span class="caps">NULL</span>
|NULL
| n
|n
| <span class="caps">NULL</span>
|NULL
|}
|}


===Architecture===
=== Architecture ===


===Mac <span class="caps">OSX</span> Differences===
=== Mac OSX Differences ===


The Mac paint engine, print engine and print support plugin actually live in the Cocoa Platform Plugin in qtbase/src/plugins/platform/cocoa due to dependencies between the code. It is hoped to clean these up in a future release.
The Mac paint engine, print engine and print support plugin actually live in the Cocoa Platform Plugin in qtbase/src/plugins/platform/cocoa due to dependencies between the code. It is hoped to clean these up in a future release.


==Qt 5 QtPrint Planning==
== Qt 5 QtPrint Planning ==
 
See very high level requirements definition at [[Qt-5-QtPrint|Qt 5 QtPrint]]
 
===Categories:===
 
* [[:Category:Developing Qt|Developing_Qt]]
** [[:Category:Developing Qt::Printing|Printing]]

Revision as of 09:47, 24 February 2015


Qt Printing

This is the hub page for the Qt Printing module. This page will link to developer documentation for the module.

The Qt Printing module maintainer is John Layt (jlayt on Devnet or johnlayt on JIRA/Gerrit) <jlaytkde.org&gt;.

Qt 5.0 Status

Status as at 2010-06-22

"Qt 5.0 Release Task&quot;:https://bugreports.qt.io/browse/QTBUG-25381

Linux - In Testing, mostly works

Mac - In Testing, mostly works
* Fonts rendered incorrectly, see https://bugreports.qt.io/browse/QTBUG-25555

Windows - Untested by me.

Todo:
* Complete removal of QAbstractPageSetupWidget
* Still time for removal of QAbstractPrintDialog?
* Clean-ups and bug fixes in Linux print dialog
* Write a feature matrix for print support on different platforms
* Rewrite tst_qprinter to correctly test platform options per feature matrix, currently very broken
* Write manual printing test plan for features that cannot be auto tested
* Develop auto tests that add/delete printers to test QPrinterInfo
* Review platform specific code still in core

Release criteria

The following criteria must be met on all 3 platforms for release:

  • No blocker bugs open
  • All unit tests not failing, i.e. passing or skipped for valid reasons
  • Platform Plugin fully implemented for all required features
  • Print to printer tested visually, no font or layout issues
  • Print to PDF tested visually, no font or layout issues
  • Print dialog tested, all options function as expected

The following tasks also performed:
* API reviewed for any last clean-ups
* Build system reviewed
* Includes reviewed
* Documentation reviewed

For testing painted output, use the example/richtext/textedit or Qt Assistant.

Bugs

Bugs are assigned to the "GUI: Printing&quot;:https://bugreports.qt.io/browse/QTBUG/component/19140 component in JIRA.

The following are Tasks to track specific areas within Qt Printing:

"QTBUG-25385 QPrinter - New Printing Module requested features&quot;:https://bugreports.qt.io/browse/QTBUG-25385
"QTBUG-25384 QPrinter - Windows related issues&quot;:https://bugreports.qt.io/browse/QTBUG-25384
"QTBUG-25383 QPrinter - Mac OS X related issues&quot;:https://bugreports.qt.io/browse/QTBUG-25383
"QTBUG-25381 QPrinter - Qt 5.0 Release Task&quot;:https://bugreports.qt.io/browse/QTBUG-25381
"QTBUG-25380 QPrinter - Page Size and Margin Related Issues&quot;:https://bugreports.qt.io/browse/QTBUG-25380
"QTBUG-25379 QPrinter - PDF Generator Related Issues&quot;:https://bugreports.qt.io/browse/QTBUG-25379
"QTBUG-25378 QPrinter - Font Related Issues&quot;:https://bugreports.qt.io/browse/QTBUG-25378
"QTBUG-25377 QPrinter - Remote Printer Issues&quot;:https://bugreports.qt.io/browse/QTBUG-25377
"QTBUG-25372 QPrinter - CUPS Settings In Linux Print Dialog&quot;:https://bugreports.qt.io/browse/QTBUG-25372

Qt 4 Printing Support in QtGui / QtWidgets

Qt 5 QtPrintSupport Module

The Qt 4 printing code was moved in a new library QtPrintingSupport and a new PrintSupport platform plugin. The code can be found in qtbase/src/printsupport and qtbase/plugins/printsupport

QPrintEngine Keys

Key Type Win Set Win Get Mac Set Mac Get PDF Set PDF Get CUPS Set CUPS Get
PPK_CollateCopies Setting y FALSE n FALSE y y y y
PPK_ColorMode Setting y y n Color y y y y
PPK_Creator Setting n NULL n NULL y y y y
PPK_DocumentName Setting y y n NULL y y y y
PPK_FullPage Setting y y y y y y y y
PPK_NumberOfCopies Setting y 1 y 1 y y y 1
PPK_Orientation Setting y y y y y y y y
PPK_OutputFileName Setting y y y y y y y y
PPK_PageOrder Setting n NULL n NULL y y y y
PPK_PageSize Setting y y y y y y y y
PPK_PaperSize = PPK_PageSize Setting y y y y y y y y
PPK_PaperSource Setting y y n NULL y y y y
PPK_PrinterName Setting y y y y y y y y
PPK_PrinterProgram Setting n NULL n NULL y y y y
PPK_Resolution Setting y y y y y y y y
PPK_SelectionOption Setting n NULL n NULL y y y y
PPK_WindowsPageSize Setting y y n NULL n NULL n NULL
PPK_FontEmbedding Setting n NULL n NULL y y y y
PPK_Duplex Setting n NULL n NULL y y y y
PPK_CustomPaperSize Setting y y y y y y y y
PPK_PageMargins Setting y y y y y y y y
PPK_CopyCount Setting y y y y y y y y
PPK_PageRect Derived n y n y n y n y
PPK_PaperRect Derived n y n y n y n y
PPK_SupportedResolutions Feature n y n y n 72 n 72
PPK_PaperSources Feature n y n NULL n NULL n NULL
PPK_SupportsMultipleCopies Feature n TRUE n TRUE n FALSE n TRUE
PPK_SuppressSystemPrintStatus Unused? n NULL n NULL n NULL n NULL

Architecture

Mac OSX Differences

The Mac paint engine, print engine and print support plugin actually live in the Cocoa Platform Plugin in qtbase/src/plugins/platform/cocoa due to dependencies between the code. It is hoped to clean these up in a future release.

Qt 5 QtPrint Planning