FAQ: TFORMer SDK
How Can I Change the Orientation for ZPL Printers?
How Can I Change the Orientation for ZPL Printers?
The orientation is defined in the page settings in the layout. If your printer does not support the original media settings from the layout, you can override them with SDK options (print options). SDK options can be specified for each job either programmatically or via command line.
Below we discuss the required print options for two cases:
Case A
TFORMer Page Settings
- Media=A6
- Orientation=Landscape
Applying Page Settings to Media in the Printer
- Media (Printer) = A6 Portrait
- Print with Media=A6 Orientation=Landscape ⇒ output will be rotated to fit
- Page settings can be applied without modification. - Media (Printer) = A6 Landscape
- Set media size to A6 Landscape ⇒ Custom.148mmx105mm
- Set orientation to Portrait ⇒ no rotation
media=Custom.148mmx105mm orientation=portrait
Case B
TFORMer Page Settings
- Media=A6
- Orientation=Portrait
Applying Page Settings to Media in the Printer
- Media (Printer) = A6 Portrait
- Print with Media=A6 Orientation=Portrait ⇒ no rotation
- Page settings can be applied without modification. - Media (Printer) = A6 Landscape
- Set media size to A6 Landscape ⇒ Custom.148mmx105mm
- Set orientation to landscape ⇒ output will be rotated to fit
media=Custom.148mmx105mm orientation=landscape
Instead of specifying a custom media size for A6 Landscape, you can also add A6LS with the size of A6 Landscape to TFORMer.xml and reference A6LS in the media print option.