PTPrintSettings
Settings to print on PT series.
Overview
You use this object to set parameters to your printer such as a paper size. The images or PDFs you passed to print functions in PrinterDriver
are converted to printable data for specified printer by using this settings. Therefore, you receive an error if the paper size you set to this object don't correspond with an actual paper size set in your printer.
This class also implements PrintImageSettings
, allowing you to configure image-specific print settings.
Instance methods
PTPrintSettings
Initialize this class with your printer model.
Declaration
public PTPrintSettings(PrinterModel printerModel);
Parameters
Name | Type | Description |
---|---|---|
printerModel | PrinterModel | the printer you use |
Return Value
An instance of this class.
copyPrintSettings
Create a new instance with a new printer model.
Declaration
public PTPrintSettings copyPrintSettings(PrinterModel printerModel);
Parameters
Name | Type | Description |
---|---|---|
printerModel | PrinterModel | the printer you use |
Return Value
An instance of this class.
Properties
labelSize
A label size set in your printer. You need to check/set this value before printing.
For allowed values, see LabelSize
.
Declaration
public LabelSize getLabelSize();
public void setLabelSize(LabelSize labelSize);
cutmarkPrint
Whether the cutmark-print is enabled or not. If true
, your printer prints cutmarks each page.
Declaration
public boolean isCutmarkPrint();
public void setCutmarkPrint(boolean cutmarkPrint);
cutPause
Whether the cut-pause is enabled or not. If true
, your printer pauses after each cut. This setting is only applicable to models that cannot perform auto-cut.
Declaration
public boolean isCutPause();
public void setCutPause(boolean cutPause);
autoCut
Whether the auto-cut is enabled or not. If true
, your printer cuts the paper each page.
Declaration
public boolean isAutoCut();
public void setAutoCut(boolean autoCut);
halfCut
Whether the half-cut is enabled or not. If true
, your printer cuts the label excluding the sheet.
Declaration
public boolean isHalfCut();
public void setHalfCut(boolean halfCut);
autoCutForEachPageCount
A number of pages to cut. Default value is 1. If set to 1, the printer cuts the paper each time a page is printed. If set to 3, the printer cuts the paper every three pages. This value is effective when autoCut
is true
.
Declaration
public int getAutoCutForEachPageCount();
public void setAutoCutForEachPageCount(int autoCutForEachPageCount);
chainPrint
Whether the chain-print is enabled or not. If true
, your printer does not feed and cut the last page. This prevents redundant initial feed when your next print operation.
Declaration
public boolean isChainPrint();
public void setChainPrint(boolean chainPrint);
specialTapePrint
Whether the special-tape-print is enabled or not. If true
, your printer always does not cut the paper.
Declaration
public boolean isSpecialTapePrint();
public void setSpecialTapePrint(boolean specialTapePrint);
resolution
A resolution of printing. Whether or not this has an effect depends on your printer.
For allowed values, see Resolution
.
Declaration
public Resolution getResolution();
public void setResolution(Resolution resolution);
forceVanishingMargin
Whether to force the margin to 0. If true
, a command that sets the margin to 0 will be sent to your printer.
Declaration
public boolean isForceVanishingMargin();
public void setForceVanishingMargin(boolean forceVanishingMargin);
feedDirectionMargins
The margins in the feed direction. Adds the same amount to the top and bottom in the feed direction. The unit is in dots.
Declaration
public int getFeedDirectionMargins();
public void setFeedDirectionMargins(int feedDirectionMargins);
Types
LabelSize
Declaration
public enum LabelSize {
Width3_5mm,
Width6mm,
Width9mm,
Width12mm,
Width18mm,
Width24mm,
Width36mm,
WidthHS_5_8mm,
WidthHS_8_8mm,
WidthHS_11_7mm,
WidthHS_17_7mm,
WidthHS_23_6mm,
WidthFL_21x45mm,
WidthHS_5_2mm,
WidthHS_9_0mm,
WidthHS_11_2mm,
WidthHS_21_0mm,
WidthHS_31_0mm,
}