ZSDK_API
1.5.1049
|
This is an utility class for printing images on a printer. More...
#import <GraphicsUtil.h>
Instance Methods | |
(BOOL) | - printImageFromFile:atX:atY:error: |
Prints an image from the Apple® mobile digital device's file system to the connected printer as a monochrome image. | |
(BOOL) | - printImageFromFile:atX:atY:withWidth:withHeight:andIsInsideFormat:error: |
Prints an image from the Apple® mobile digital device's file system to the connected printer as a monochrome image. | |
(BOOL) | - printImage:atX:atY:withWidth:withHeight:andIsInsideFormat:error: |
Prints the given image to the connected printer as a monochrome image. | |
(BOOL) | - storeImage:withImage:withWidth:andWithHeight:error: |
Stores the specified image to the connected printer as a monochrome image. | |
(BOOL) | - storeImage:withPathOnDevice:withWidth:andWithHeight:error: |
Stores an image from the Apple® mobile digital device's file system to the connected printer as a monochrome image. | |
This is an utility class for printing images on a printer.
Print an image from the device to a printer.
- (BOOL) printImage: | (CGImageRef) | image | |
atX: | (NSInteger) | x | |
atY: | (NSInteger) | y | |
withWidth: | (NSInteger) | width | |
withHeight: | (NSInteger) | height | |
andIsInsideFormat: | (BOOL) | isInsideFormat | |
error: | (NSError **) | error | |
Prints the given image
to the connected printer as a monochrome image.
Note: if the image resolution is large (e.g. 1024x768) this method may take a long time to execute.
image | The image to print. |
x | Horizontal starting position in dots. |
y | Vertical starting position in dots. |
width | Desired width of the printed image. Passing -1 will preserve original width. |
height | Desired height of the printed image. Passing -1 will preserve original height. |
isInsideFormat | Boolean value indicating whether this image should be printed by itself (NO ), or is part of a format being written to the connection (YES ). |
error | Will be set to the error that occured. |
NO
if there was an error printing the image. - (BOOL) printImageFromFile: | (NSString *) | path | |
atX: | (NSInteger) | x | |
atY: | (NSInteger) | y | |
error: | (NSError **) | error | |
Prints an image from the Apple® mobile digital device's file system to the connected printer as a monochrome image.
Note: if the image resolution is large (e.g. 1024x768) this method may take a long time to execute.
path | Full path to image file. (The image must be either a PNG or JPG). |
x | Horizontal starting position in dots. |
y | Vertical starting position in dots. |
error | Will be set to the error that occured. |
NO
if there was an error printing the image. - (BOOL) printImageFromFile: | (NSString *) | path | |
atX: | (NSInteger) | x | |
atY: | (NSInteger) | y | |
withWidth: | (NSInteger) | width | |
withHeight: | (NSInteger) | height | |
andIsInsideFormat: | (BOOL) | isInsideFormat | |
error: | (NSError **) | error | |
Prints an image from the Apple® mobile digital device's file system to the connected printer as a monochrome image.
Note: if the image resolution is large (e.g. 1024x768) this method may take a long time to execute.
path | Full path to image file. (The image must be either a PNG or JPG). |
x | Horizontal starting position in dots. |
y | Vertical starting position in dots. |
width | Desired width of the printed image. Passing -1 will preserve original width. |
height | Desired height of the printed image. Passing -1 will preserve original height. |
isInsideFormat | Boolean value indicating whether this image should be printed by itself (NO ), or is part of a format being written to the connection (YES ). |
error | Will be set to the error that occured. |
NO
if there was an error printing the image. - (BOOL) storeImage: | (NSString *) | printerDriveAndFileName | |
withImage: | (CGImageRef) | image | |
withWidth: | (NSInteger) | width | |
andWithHeight: | (NSInteger) | height | |
error: | (NSError **) | error | |
Stores the specified image
to the connected printer as a monochrome image.
The image will be stored on the printer at printerDriveAndFileName
with the extension GRF. If a drive letter is not supplied, E will be used as the default (e.g. FILE becomes E:FILE.GRF). If an extension is supplied, it is ignored (E:FILE.BMP becomes E:FILE.GRF). Note: if the image resolution is large (e.g. 1024x768) this method may take a long time to execute.
printerDriveAndFileName | Path on the printer where the image will be stored. |
image | Bitmap image to print. |
width | Desired width of the printed image, in dots. Passing -1 will preserve original width. |
height | Desired height of the printed image, in dots. Passing -1 will preserve original height. |
error | Will be set to the error that occured. |
NO
if there was an error storing the image. - (BOOL) storeImage: | (NSString *) | printerDriveAndFileName | |
withPathOnDevice: | (NSString *) | imageFilePathOnDevice | |
withWidth: | (NSInteger) | width | |
andWithHeight: | (NSInteger) | height | |
error: | (NSError **) | error | |
Stores an image from the Apple® mobile digital device's file system to the connected printer as a monochrome image.
The image will be stored on the printer at printerDriveAndFileName
with the extension GRF. If a drive letter is not supplied, E will be used as the default (e.g. FILE becomes E:FILE.GRF). If an extension is supplied, it is ignored (E:FILE.BMP becomes E:FILE.GRF). Note: if the image resolution is large (e.g. 1024x768) this method may take a long time to execute.
printerDriveAndFileName | Path on the printer where the image will be stored. |
imageFilePathOnDevice | Path to the file containing the bitmap image to send. |
width | Desired width of the printed image, in dots. Passing -1 will preserve original width. |
height | Desired height of the printed image, in dots. Passing -1 will preserve original height. |
error | Will be set to the error that occured. |
NO
if there was an error storing the image.