83.7 Options for Building Print Support into Android Apps
The Printing framework provides a number of options for incorporating print support into Android applications. These options can be categorized as follows:
83.7.1 Image Printing
As the name suggests, this option allows image printing to be incorporated into Android applications. When adding this feature to an application, the first step is to create a new instance of the PrintHelper class:
val imagePrinter = PrintHelper(context)
Next, the scale mode for the printed image may be specified via a call to the setScaleMode() method of the PrintHelper instance. Options are as follows:
•SCALE_MODE_FIT – The image will be scaled to fit within the paper size without any cropping or changes to aspect ratio. This will typically result in white space appearing in one dimension.
•SCALE_MODE_FILL – The image will be scaled to fill the paper size with cropping performed where necessary to avoid...