MediaInfo
A class for media information.
Overview
You use this object to know about media in your printer.
Properties
getMediaType
A type of media in your printer.
Declaration
public MediaType getMediaType();
Return Value
See MediaType
.
getBackgroundColor
A label color of the media in your printer.
Declaration
public BackgroundColor getBackgroundColor();
Return Value
See BackgroundColor
.
getInkColor
A printing color of media in your printer.
Declaration
public InkColor getInkColor();
Return Value
See InkColor
.
getWidth_mm
The width of media of your printer in millimeters. Rounded to the nearest whole number. Some models cannot be obtained, in which case 0 is assigned.
Declaration
public int getWidth_mm();
getHeight_mm
The height of media of your printer in millimeters. Rounded to the nearest whole number. If the media is continuous length, it returns 0. Some models cannot be obtained, in which case 0 is assigned.
Declaration
public int getHeight_mm();
isHeightInfinite
Whether the the media is continuous length or not
Declaration
public boolean isHeightInfinite();
Instance Methods
getPTLabelSize
Get the size of label.
If the type of media is not for PT series, it returns null
.
Declaration
public @Nullable PTPrintSettings.LabelSize getPTLabelSize();
Return Value
See PTPrintSettings.LabelSize
.
getQLLabelSize
Get the size of label.
If the type of media is not for QL series, it returns null
.
Declaration
public @Nullable QLPrintSettings.LabelSize getQLLabelSize();
Return Value
See QLPrintSettings.LabelSize
.
Types
MediaType
Declaration
public enum MediaType {
PTLaminate,
PTNonLaminate,
PTFabric,
QLInfiniteLable,
QLDieCutLable,
PTHeatShrink,
PTFLe,
PTFlexibleID,
PTSatin,
PTSelfLaminate,
Incompatible,
Unknown,
};
BackgroundColor
Declaration
public enum BackgroundColor {
Standard,
White,
Others,
Clear,
Red,
Blue,
Yellow,
Green,
Black,
ClearWithWhiteInk,
PremiumGold,
PremiumSilver,
PremiumOthers,
MaskingOthers,
MatteWhite,
MatteClear,
MatteSilver,
SatinGold,
SatinSilver,
PastelPurple,
BlueWithWhiteInk,
RedWithWhiteInk,
FluorescentOrange,
FluorescentYellow,
BerryPink,
LightGray,
LimeGreen,
SatinNavyBlue,
SatinWineRed,
FabricYellow,
FabricPink,
FabricBlue,
TubeWhite,
SelfLaminatedWhite,
FlexibleWhite,
FlexibleYellow,
CleaningWhite,
StencilWhite,
LightBlue_Satin,
Mint_Satin,
Silver_Satin,
Incompatible,
Unknown,
};
InkColor
Declaration
public enum InkColor {
Standard,
White,
Others,
Red,
Blue,
Black,
Gold,
RedAndBlack,
FabricBlue,
CleaningBlack,
StencilBlack,
Incompatible,
Unknown,
};