76.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:
76.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:
PrintHelper imagePrinter = new 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...