Click or drag to resize

PDFPrintManager Class

The print class is used to register a print contract and set the standard print options. All of the callbacks are implemented internally for ease of development. It uses the efficent vector-based XPS print path when available. Note: Printing in Windows Store Apps is typically invoked using the Charms Bar. If you wish to implement a button that opens the print bar, call
await Windows.Graphics.Printing.PrintManager.ShowPrintUIAsync();
[Not available for Windows Phone]
Inheritance Hierarchy
SystemObject
  pdftron.PDFPDFPrintManager

Namespace:  pdftron.PDF
Assembly:  pdftron (in pdftron.dll) Version: 255.255.255.255
Syntax
public sealed class PDFPrintManager

The PDFPrintManager type exposes the following members.

Methods
  NameDescription
Public methodCode exampleAddStandardPrintOption
Used to add standard print options (http://msdn.microsoft.com/en-us/library/windows/apps/windows.graphics.printing.standardprinttaskoptions.ASPx) that appear in the print window.
Public methodAddUserOptionAnnotations
Adds an option that allows the user to select if annotations and comments are printed.
Public methodAddUserOptionAutoRotate
Adds an option that allows the user to select if pages are automatically rotated to best fit the output pages
Public methodAddUserOptionBorder
Adds an option that allows the user to select if a page is printed with a thin border.
Public methodAddUserOptionNUp
Adds an option that allows the user to select if pages are printed per sheet. Use of this option is mutally exlusive with using the standard print option Windows.Graphics.Printing.StandardPrintTaskOptions.NUp, where this option may be preferred because it allows PDFNet to offer an accurate print preview, as well as offer the option for every printer and not just those who's drivers support NUp.
Public methodAddUserOptionPageRange
Adds an option that allows the user to select a subset of the document to print.
Public methodAddUserOptionScaleType
Adds an option that allows the user to select how the content is scaled to fit the page.
Public methodCancelPrinting
Cancels printing if called before the document is sent to the print spooler. This method can cancel the method PrintIPrintDocumentPackageTarget.
Public methodClearPrintOptions
Removes all of the options added via AddStandardPrintOption and AddPageRangeOption.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodStatic memberGetInstance
Gets the PDFPrintManager
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodRegisterForPrintingContract
Registers the current print contract for the current view and provides the document to be printed. This method should be called every time a new document is displayed so that the name can be updated. The name will appear in the system print job window, as well as be used for the file name by virtual printer drivers. You do not need to call
UnRegisterForPrintingContract()
when re-registering.
Public methodSetAnnotations
Programmatically set if annotations are printed
Public methodSetAutoRotate
Programmatically set if content should be automatically rotated to best fit the printed page.
Public methodSetBorder
Programmatically set if pages should have a thin outline.
Public methodSetNUp
Programmatically set how many pages to print per sheet, in rows and columns.
Public methodSetResourceLoader
Set a resource loader to change the names for the option strings used in the print bar. This can be used to add new languages. Please see the PDFVewCtrlDemo's file Resources.resw for a list of keys and English values. If no ResourceLoader is provided, the print bar will use keys as values.
Public methodSetScaleType
Programmatically set the scale type.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUnRegisterForPrintingContract
Unregisters the print contract. Explicitly calling this method should not normally be necessary as it will be automatically called by RegisterForPrintingContract when needed as well as the destructor.
Top
Events
  NameDescription
Public eventPrintingRequested
This event is raised when the users prints a document. When the PDFPrintManager gets a new print task, it is forwarded through this event so that progress and status can be monitored.
Top
See Also