PrintJobSettings class
Class that represents the settings of a PlatformPrintJobController.
Officially Supported Platforms/Implementations:
- Android WebView
- iOS WKWebView
- macOS WKWebView
- Windows WebView2
Constructors
- PrintJobSettings({bool? animated = true, bool? canSpawnSeparateThread = true, bool? collate, PrintJobColorMode? colorMode, int? copies = 1, bool? detailedErrorReporting = false, PrintJobDuplexMode? duplexMode, String? faxNumber, int? firstPage, PrintJobRenderingQuality? forceRenderingQuality, bool? handledByClient = false, double? headerHeight, String? headerTitle, PrintJobPaginationMode? horizontalPagination, bool? isHorizontallyCentered = true, bool? isVerticallyCentered = true, PrintJobDisposition? jobDisposition, String? jobName, WebUri? jobSavingURL, int? lastPage, EdgeInsets? margins, double? maximumContentHeight, double? maximumContentWidth, PrintJobMediaSize? mediaSize, bool? mustCollate, int? numberOfPages, PrintJobOrientation? orientation, PrintJobOutputType? outputType, double? pageHeight, PrintJobPageOrder? pageOrder, String? pageRanges, double? pageWidth, int? pagesAcross, int? pagesDown, int? pagesPerSide, String? paperName, PrintJobDialogKind? printDialogKind, String? printerName, PrintJobResolution? resolution, double? scalingFactor, bool? shouldPrintBackgrounds, bool? shouldPrintSelectionOnly, bool? showUI = true, bool? showsNumberOfCopies = true, bool? showsPageRange = true, bool? showsPageSetupAccessory = true, bool? showsPaperOrientation = true, bool? showsPaperSelectionForLoadedPapers = false, bool? showsPaperSize = true, bool? showsPreview = true, bool? showsPrintPanel = true, bool? showsPrintSelection = true, bool? showsProgressPanel = true, bool? showsScaling = true, int? time, PrintJobPaginationMode? verticalPagination})
- Officially Supported Platforms/Implementations:
Properties
- animated ↔ bool?
-
trueto animate the display of the sheet,falseto display the sheet immediately.getter/setter pair - canSpawnSeparateThread ↔ bool?
-
Whether the print operation should spawn a separate thread in which to run itself.
The default value is
true.getter/setter pair - collate ↔ bool?
-
Whether printed pages should be collated.
The default value is
true.getter/setter pair - colorMode ↔ PrintJobColorMode?
-
The color mode.
getter/setter pair
- copies ↔ int?
-
How many copies to print.
The default value is
1.getter/setter pair - detailedErrorReporting ↔ bool?
-
If
true, produce detailed reports when an error occurs. The default value isfalse.getter/setter pair - duplexMode ↔ PrintJobDuplexMode?
-
The duplex mode to use for the print job.
getter/setter pair
- faxNumber ↔ String?
-
A fax number.
getter/setter pair
- firstPage ↔ int?
-
An integer value that specifies the first page in the print job.
getter/setter pair
-
The height of the page footer.
getter/setter pair
-
The URI in the footer when shouldPrintHeaderAndFooter is
true. The default value is the current URI.getter/setter pair - forceRenderingQuality ↔ PrintJobRenderingQuality?
-
Force rendering quality.
getter/setter pair
- handledByClient ↔ bool?
-
Set this to
trueto handle the PlatformPrintJobController. Otherwise, it will be handled and disposed automatically by the system. The default value isfalse.getter/setter pair - hashCode → int
-
The hash code for this object.
no setterinherited
-
If
true, a standard header and footer are added outside the margins of each page. The default value istrue.getter/setter pair - headerHeight ↔ double?
-
The height of the page header.
getter/setter pair
- headerTitle ↔ String?
-
The title in the header when shouldPrintHeaderAndFooter is
true. The default value is the title of the current document.getter/setter pair - horizontalPagination ↔ PrintJobPaginationMode?
-
The horizontal pagination mode.
getter/setter pair
- isHorizontallyCentered ↔ bool?
-
Indicates whether the image is centered horizontally.
The default value is
true.getter/setter pair - isVerticallyCentered ↔ bool?
-
Indicates whether the image is centered vertically.
The default value is
true.getter/setter pair - jobDisposition ↔ PrintJobDisposition?
-
The action specified for the job.
getter/setter pair
- jobName ↔ String?
-
The name of the print job.
An application should set this property to a name appropriate to the content being printed.
The default job name is the current webpage title concatenated with the "Document" word at the end.
getter/setter pair
- jobSavingURL ↔ WebUri?
-
An URL containing the location to which the job file will be saved when the jobDisposition is PrintJobDisposition.SAVE.
getter/setter pair
- lastPage ↔ int?
-
An integer value that specifies the last page in the print job.
getter/setter pair
- margins ↔ EdgeInsets?
-
The margins for each printed page.
Margins define the white space around the content where the left margin defines
the amount of white space on the left of the content and so on.
getter/setter pair
- maximumContentHeight ↔ double?
-
The maximum height of the content area.
getter/setter pair
- maximumContentWidth ↔ double?
-
The maximum width of the content area.
getter/setter pair
- mediaSize ↔ PrintJobMediaSize?
-
The media size.
getter/setter pair
- mustCollate ↔ bool?
-
If
true, collates output.getter/setter pair - numberOfPages ↔ int?
-
The number of pages to render.
getter/setter pair
- orientation ↔ PrintJobOrientation?
-
The orientation of the printed content, portrait or landscape.
getter/setter pair
- outputType ↔ PrintJobOutputType?
-
The kind of printable content.
getter/setter pair
- pageHeight ↔ double?
-
The page height in inches.
The default height is 11 inches.
getter/setter pair
- pageOrder ↔ PrintJobPageOrder?
-
The print order for the pages of the operation.
getter/setter pair
- pageRanges ↔ String?
-
The page ranges to print.
Pages are specified as a comma-separated list of page ranges where each page range specifies
a start and end inclusive page numbers. For example "1-5, 13, 17-19".
Use an empty string to specify printing all the pages.
The default value is empty string.
getter/setter pair
- pagesAcross ↔ int?
-
The number of logical pages to be tiled horizontally on a physical sheet of paper.
getter/setter pair
- pagesDown ↔ int?
-
The number of logical pages to be tiled vertically on a physical sheet of paper.
getter/setter pair
- pagesPerSide ↔ int?
-
The number of pages to print on each sheet.
The value must be 1, 2, 4, 6, 9, or 16.
The default value is
1.getter/setter pair - pageWidth ↔ double?
-
The page width in inches.
The default width is 8.5 inches.
getter/setter pair
- paperName ↔ String?
-
The name of the currently selected paper size.
getter/setter pair
- printDialogKind ↔ PrintJobDialogKind?
-
The print dialog kind to show when showUI is
true. The default value is PrintJobDialogKind.BROWSER.getter/setter pair - printerName ↔ String?
-
The name of the printer to use.
Defaults to the user default printer.
getter/setter pair
- resolution ↔ PrintJobResolution?
-
The supported resolution in DPI (dots per inch).
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scalingFactor ↔ double?
-
The current scaling factor. From
0.0to1.0.getter/setter pair - shouldPrintBackgrounds ↔ bool?
-
trueif background colors and images should be printed. The default isfalse.getter/setter pair -
trueif header and footer should be printed. The default isfalse.getter/setter pair - shouldPrintSelectionOnly ↔ bool?
-
trueif only the current selection of HTML in the document should be printed. The default isfalse.getter/setter pair - showsNumberOfCopies ↔ bool?
-
A Boolean value that determines whether the printing options include the number of copies.
The default value is
true.getter/setter pair - showsPageRange ↔ bool?
-
A Boolean value that determines whether the Print panel includes a set of fields for manipulating the range of pages being printed.
The default value is
true.getter/setter pair - showsPageSetupAccessory ↔ bool?
-
A Boolean value that determines whether the Print panel includes a separate accessory view for manipulating the paper size, orientation, and scaling attributes.
The default value is
true.getter/setter pair - showsPaperOrientation ↔ bool?
-
A Boolean value that determines whether the printing options include the paper orientation control when available.
The default value is
true.getter/setter pair - showsPaperSelectionForLoadedPapers ↔ bool?
-
A Boolean value that determines whether the paper selection menu displays.
The default value of this property is
false. Setting the value totrueenables a paper selection menu on printers that support different types of paper and have more than one paper type loaded. On printers where only one paper type is available, no paper selection menu is displayed, regardless of the value of this property.getter/setter pair - showsPaperSize ↔ bool?
-
A Boolean value that determines whether the print panel includes a control for manipulating the paper size of the printer.
The default value is
true.getter/setter pair - showsPreview ↔ bool?
-
A Boolean value that determines whether the Print panel displays a built-in preview of the document contents.
The default value is
true.getter/setter pair - showsPrintPanel ↔ bool?
-
A Boolean value that determines whether the print operation displays a print panel.
The default value is
true.getter/setter pair - showsPrintSelection ↔ bool?
-
A Boolean value that determines whether the Print panel includes an additional selection option for paper range.
The default value is
true.getter/setter pair - showsProgressPanel ↔ bool?
-
A Boolean value that determines whether the print operation displays a progress panel.
The default value is
true.getter/setter pair - showsScaling ↔ bool?
-
A Boolean value that determines whether the Print panel includes a control for scaling the printed output.
The default value is
true.getter/setter pair - showUI ↔ bool?
-
A Boolean value that determines whether the print UI should be shown.
The default value is
true.getter/setter pair - time ↔ int?
-
A timestamp that specifies the time at which printing should begin.
getter/setter pair
- verticalPagination ↔ PrintJobPaginationMode?
-
The vertical pagination to the specified mode.
getter/setter pair
Methods
-
copy(
) → PrintJobSettings - Returns a copy of PrintJobSettings.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts instance to a map.
-
toMap(
{EnumMethod? enumMethod}) → Map< String, dynamic> - Converts instance to a map.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromMap(
Map< String, dynamic> ? map, {EnumMethod? enumMethod}) → PrintJobSettings? - Gets a possible PrintJobSettings instance from a Map value.
-
isPropertySupported(
PrintJobSettingsProperty property, {TargetPlatform? platform}) → bool -
Check if the given
propertyis supported by the defaultTargetPlatform or a specificplatform.