Printing in Qt is usually achieved using class QPrinter. Since this class is neither a subclass of QObject nor a value class suitable for storing into a Qt variant, the QtLua class QtLuaPrinter defines a Qt object that acts as a thin wrapper for class QPrinter.

Most usual printer settings are exposed by class qt.QtLuaPrinter as properties. Property printer.paperSize can be used to specify the size of the drawing in pixels. Printers can be selected using printer.printerName and PostScript and PDF files can be produced with properties printer.outputFileName and printer.outputFormat. Alternatively, function printer:setup() pops a print dialog that lets the user adjust these properties interactively.

Subsections

  1. qt.QtLuaPrinter([mode])
  2. printer:abort()
  3. printer.collateCopies
  4. printer.colorMode
  5. printer.creator
  6. printer.docName
  7. printer.doubleSidedPrinting
  8. printer.fontEmbeddingEnabled
  9. printer.fromPage
  10. printer.fullPage
  11. printer.landscape
  12. printer:newPage()
  13. printer.numCopies
  14. printer.outputFileName
  15. printer.outputFormat
  16. printer.pageRect
  17. printer.pageSize
  18. printer.paperRect
  19. printer.paperSize
  20. printer.printProgram
  21. printer.printerName
  22. printer.printerState
  23. printer.resolution
  24. printer:setFromTo(frompage,topage)
  25. printer:setup()
  26. printer.toPage