Class: UIPrintInfo

Inherits:
NSObject show all

Overview

A UIPrintInfo object encapsulates information about a print job, including printer identifier, job name, output type (photo, normal, grayscale), orientation (portrait or landscape), and any selected duplex mode. This information is used by the printing system when it prints.

Instance Attribute Summary (collapse)

Class Method Summary (collapse)

Instance Method Summary (collapse)

Methods inherited from NSObject

#!, #!=, #!~, #, #==, #===, #=~, #Rational, #__callee__, #__method__, #__send__, #__type__, `, alloc, allocWithZone:, #autoContentAccessingProxy, autoload, autoload?, autorelease_pool, #awakeAfterUsingCoder:, binding, block_given?, caller, cancelPreviousPerformRequestsWithTarget:, cancelPreviousPerformRequestsWithTarget:selector:object:, catch, class, classFallbacksForKeyedArchiver, #classForCoder, #classForKeyedArchiver, classForKeyedUnarchiver, #clone, conformsToProtocol:, #copy, copyWithZone:, #dealloc, #define_singleton_method, description, display, #doesNotRecognizeSelector:, #dup, #enum_for, #eql?, #equal?, #extend, fail, #finalize, format, #forwardInvocation:, #forwardingTargetForSelector:, framework, #freeze, #frozen?, getpass, gets, global_variables, #init, initialize, #initialize_clone, #initialize_copy, #initialize_dup, #inspect, instanceMethodForSelector:, instanceMethodSignatureForSelector:, #instance_eval, #instance_exec, #instance_of?, #instance_variable_defined?, #instance_variable_get, #instance_variable_set, #instance_variables, instancesRespondToSelector:, isSubclassOfClass:, #is_a?, iterator?, #kind_of?, lambda, load, load_bridge_support_file, load_plist, local_variables, loop, #method, #methodForSelector:, #methodSignatureForSelector:, #methods, #mutableCopy, mutableCopyWithZone:, new, #nil?, open, p, #performSelector:onThread:withObject:waitUntilDone:, #performSelector:onThread:withObject:waitUntilDone:modes:, #performSelector:withObject:afterDelay:, #performSelector:withObject:afterDelay:inModes:, #performSelectorInBackground:withObject:, #performSelectorOnMainThread:withObject:waitUntilDone:, #performSelectorOnMainThread:withObject:waitUntilDone:modes:, print, printf, #private_methods, proc, #protected_methods, #public_method, #public_methods, #public_send, putc, puts, raise, rand, readline, readlines, #replacementObjectForCoder:, #replacementObjectForKeyedArchiver:, require, resolveClassMethod:, resolveInstanceMethod:, #respond_to?, #respond_to_missing?, select, #send, setVersion:, #singleton_methods, sprintf, srand, superclass, #taint, #tainted?, #tap, test, throw, #to_plist, #to_s, trace_var, trap, #trust, #untaint, untrace_var, #untrust, #untrusted?, version

Constructor Details

This class inherits a constructor from NSObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class NSObject

Instance Attribute Details

- (UIPrintInfoDuplex) duplex

Specifies the duplex mode to use for the print job. Some printers can print either duplex (double-sided) or single-sided. If double-sided is selected, a printer can either print flipping the back page along the long edge of the paper or along the short edge. The default option for duplex-capable printers is based on document type: single-sided (none) for photos, double-sided and long edge for other documents. If a printer is capable of duplex printing, a switch in the printing options allows users to toggle between single-side and double-sided printing. See the description of the UIPrintInfoDuplex constants for more information.

Returns:

- (String) jobName

The name of the print job. The name of the print job is displayed in the Print Center when the job is printing. An application should set this property to a name appropriate to the content being printed. The default job name is the application name.

Returns:

- (UIPrintInfoOrientation) orientation

The orientation of the printed content, portrait or landscape. An application can set this property to a value thats appropriate to the printable content or it can put up a user interface that enables users to pick the printing orientation. The default value is UIPrintInfoOrientationPortrait. See the descriptions of the UIPrintInfoOrientation constants for more information.Note: UIKit ignores this property when printable content is assigned to the printingItem or printingItems properties of the shared UIPrintInteractionController object. It determines the orientation based on the type of content.

- (UIPrintInfoOutputType) outputType

The kind of printable content. The output type can be general, photo, or grayscale. An application can set this property to a value thats appropriate to the printable content. The default is UIPrintInfoOutputGeneral. See the descriptions of the UIPrintInfoOutputType constants for more information.The output type controls the quality and default paper size used in printing. For example, if your application only prints black text, setting this property to UIPrintInfoOutputGrayscale can result in better performance in many cases. See UIPrintPaper Class Reference for details.

- (String) printerID

An identifier of the printer to use for the print job. This property is set through user selection in the printing user interface. You may provide a printer ID as a hint (for example, the last printer used from a particular print job). The default value is nil.

Returns:

Class Method Details

+ (UIPrintInfo) printInfo

Returns a print-information object initialized with default values.

Returns:

+ (UIPrintInfo) printInfoWithDictionary(dictionary)

Returns a print-information object that is initialized with the data in the passed-in dictionary. You use the dictionary parameter to initialize a UIPrintInfo object with stored print-job information. Some applications might archive a previous UIPrintInfo object and use that for a future print job with this method.You can later access the dictionary by calling the dictionaryRepresentation method on the UIPrintInfo object.

Parameters:

  • dictionary (Hash)

    A dictionary that contains data to initialize the UIPrintInfo object with.

Returns:

Instance Method Details

- (Hash) dictionaryRepresentation

Returns a dictionary representation of a print-information object.

Returns:

  • (Hash)

    A dictionary representation of a UIPrintInfo object that can be archived and used to create a new UIPrintInfo object. Returns nil if no dictionary can be created.