Gambas Documentation
Application Repository
Code Snippets
Compilation & Installation from source code
Components
gb
gb.args
gb.cairo
gb.chart
gb.clipper
gb.complex
gb.compress
gb.crypt
gb.data
gb.db
gb.db.form
gb.db.mysql
gb.db.odbc
gb.db.postgresql
gb.db.sqlite2
gb.db.sqlite3
gb.db2
gb.dbus
gb.dbus.trayicon
gb.debug
gb.desktop
gb.desktop.gnome.keyring
gb.desktop.x11
gb.eval
gb.eval.highlight
gb.form
gb.form.dialog
gb.form.editor
gb.form.htmlview
gb.form.mdi
gb.form.print
Printer
_new
MarginBottom
MarginLeft
MarginRight
MarginTop
Preview
gb.form.stock
gb.form.terminal
gb.gmp
gb.gsl
gb.gtk
gb.gtk.opengl
gb.gtk3
gb.gtk3.opengl
gb.gtk3.webview
gb.gui
gb.gui.opengl
gb.gui.qt
gb.gui.qt.ext
gb.gui.qt.opengl
gb.gui.qt.webkit
gb.gui.trayicon
gb.gui.webview
gb.hash
gb.highlight
gb.image
gb.image.effect
gb.image.imlib
gb.image.io
gb.inotify
gb.jit
gb.libxml
gb.logging
gb.map
gb.markdown
gb.media
gb.media.form
gb.memcached
gb.mime
gb.mongodb
gb.mysql
gb.ncurses
gb.net
gb.net.curl
gb.net.pop3
gb.net.smtp
gb.openal
gb.opengl
gb.opengl.glsl
gb.opengl.glu
gb.opengl.sge
gb.openssl
gb.option
gb.pcre
gb.pdf
gb.poppler
gb.qt4
gb.qt4.ext
gb.qt4.opengl
gb.qt4.webkit
gb.qt4.webview
gb.qt5
gb.qt5.ext
gb.qt5.opengl
gb.qt5.webkit
gb.qt5.webview
gb.qt6
gb.qt6.ext
gb.qt6.opengl
gb.qt6.webview
gb.report
gb.report2
gb.scanner
gb.sdl
gb.sdl.sound
gb.sdl2
gb.sdl2.audio
gb.settings
gb.signal
gb.term
gb.test
gb.util
gb.util.web
gb.v4l
gb.vb
gb.web
gb.web.feed
gb.web.form
gb.web.gui
gb.xml
gb.xml.html
gb.xml.rpc
gb.xml.xslt
Controls pictures
Deprecated components
Developer Documentation
Development Environment Documentation
Documents
Error Messages
Gambas Playground
How To's
Language Index
Language Overviews
Last Changes
Lexicon
README
Search the wiki
To Do
Topics
Tutorials
Wiki License
Wiki Manual

Printer (gb.form.print)

This class allows to print documents on printers, or save them in a file.

This class reimplements Printer in gb.qt4.

This class is creatable.

Inherited constants
A3   Paper size of 297 × 420 mm.
A4   Paper size of 210 × 297 mm, 8.26 × 11.69 inches.
A5   Paper size of 148 × 210 mm.
B5   Paper size of 182 × 257 mm, 7.17 × 10.13 inches.
Custom   Custom paper size.
Executive   Paper size of 7.5 × 10 inches, 191 × 254 mm.
Horizontal   Both sides of each sheet of paper are used for printing. The paper is turned over its horizontal edge.
Landscape   The page's width is greater than its height.
Legal   Paper size of 8.5 × 14 inches, 216 × 356 mm.
Letter   Paper size of 8.5 × 11 inches, 216 × 279 mm.
Portrait   The page's height is greater than its width.
Simplex  
Vertical   Both sides of each sheet of paper are used for printing. The paper is turned over its vertical edge.

Inherited static properties
Default   Return the name of the default printer.
List   Return the list of printers.

Properties
MarginBottom   Return or set the default bottom margin in millimeters.
MarginLeft   Return or set the default left margin in millimeters.
MarginRight   Return or set the default right margin in millimeters.
MarginTop   Return or set the default top margin in millimeters.

Inherited properties
CollateCopies   Return or set if multiple copies are collated or not.
CopyCount   Return or set the number of copies that will be printed.
Count   Return or define the number of pages in the printed document.
Duplex   Return or set the printing duplex mode.
FirstPage   Return or set the first page that must be printed.
FullPage   Return or set if drawing page will be done inside the margins (FullPage is FALSE), or on the entire page (FullPage is TRUE).
GrayScale   Return or set if printing is done by using gray scale, or full colors.
LastPage   Return or set the last page that must be printed.
Name   Return or set the printer name.
NumCopies   Return or set the number of copies that will be printed.
Orientation   Return or set the printing orientation.
OutputFile   Return or set the path of the PDF or PostScript output file.
Page   Return the current page that must be printed.
Paper   Return or set the kind of paper used for printing.
PaperHeight   Return or set the custom paper height in millimeters.
PaperWidth   Return or set the custom paper width in millimeters.
Resolution   Return or set the printer resolution, in DPI (Dots Per Inches).
ReverseOrder   Return or set if the document pages will be printed in reverse order.

Methods
Preview   Open the print preview as a modal form.

Inherited methods
Cancel   Abort the current printing job.
Configure   Open the printer configuration dialog.
Print   Run the printing process.

Inherited events
Begin   This event is raised when the print starts.
Draw   This event is raised for each page that must be printed.
End   This event is raised when the print is finished.
Paginate   This event is raised so that you can paginate your document in the background.