nsIPrintSettings

IID:f1094df6-ce0e-42c9-9847-2f663172c38d
Inherits From:nsISupports
Status:UNDER_REVIEW

Simplified graphics interface for JS rendering.


Constants

PrintSettings to be Saved Navigation Constants
PRUint32 kInitSaveOddEvenPages = 1
PRUint32 kInitSaveHeaderLeft = 2
PRUint32 kInitSaveHeaderCenter = 4
PRUint32 kInitSaveHeaderRight = 8
PRUint32 kInitSaveFooterLeft = 16
PRUint32 kInitSaveFooterCenter = 32
PRUint32 kInitSaveFooterRight = 64
PRUint32 kInitSaveBGColors = 128
PRUint32 kInitSaveBGImages = 256
PRUint32 kInitSavePaperSize = 512
PRUint32 kInitSavePaperName = 1024
PRUint32 kInitSavePaperSizeUnit = 2048
PRUint32 kInitSavePaperSizeType = 4096
PRUint32 kInitSavePaperData = 8192
PRUint32 kInitSavePaperWidth = 16384
PRUint32 kInitSavePaperHeight = 32768
PRUint32 kInitSaveReversed = 65536
PRUint32 kInitSaveInColor = 131072
PRUint32 kInitSaveOrientation = 262144
PRUint32 kInitSavePrintCommand = 524288
PRUint32 kInitSavePrinterName = 1048576
PRUint32 kInitSavePrintToFile = 2097152
PRUint32 kInitSaveToFileName = 4194304
PRUint32 kInitSavePageDelay = 8388608
PRUint32 kInitSaveMargins = 16777216
PRUint32 kInitSaveNativeData = 33554432
PRUint32 kInitSavePlexName = 67108864
PRUint32 kInitSaveShrinkToFit = 134217728
PRUint32 kInitSaveScaling = 268435456
PRUint32 kInitSaveColorspace = 536870912
PRUint32 kInitSaveResolutionName = 1073741824
PRUint32 kInitSaveDownloadFonts = -2147483648
PRUint32 kInitSaveAll = -1
PRInt32 kPrintOddPages = 1
PRInt32 kPrintEvenPages = 2
PRInt32 kEnableSelectionRB = 4
PRInt32 kRangeAllPages = 0
PRInt32 kRangeSpecifiedPageRange = 1
PRInt32 kRangeSelection = 2
PRInt32 kRangeFocusFrame = 3
PRInt32 kJustLeft = 0
PRInt32 kJustCenter = 1
PRInt32 kJustRight = 2
FrameSet Default Type Constants
PRInt16 kUseInternalDefault = 0
PRInt16 kUseSettingWhenPossible = 1
Page Size Type Constants
PRInt16 kPaperSizeNativeData = 0
PRInt16 kPaperSizeDefined = 1
Page Size Unit Constants
PRInt16 kPaperSizeInches = 0
PRInt16 kPaperSizeMillimeters = 1
Orientation Constants
PRInt16 kPortraitOrientation = 0
PRInt16 kLandscapeOrientation = 1
Print Frame Constants
PRInt16 kNoFrames = 0
PRInt16 kFramesAsIs = 1
PRInt16 kSelectedFrame = 2
PRInt16 kEachFrameSep = 3
How to Enable Frame Set Printing Constants
PRInt16 kFrameEnableNone = 0
PRInt16 kFrameEnableAll = 1
PRInt16 kFrameEnableAsIsAndEach = 2

Properties

PRUnichar* colorspace

PRUnichar* docURL

PRBool downloadFonts

PRInt32 endPageRange

PRUnichar* footerStrCenter

PRUnichar* footerStrLeft

PRUnichar* footerStrRight

PRUnichar* headerStrCenter

PRUnichar* headerStrLeft

PRUnichar* headerStrRight

PRInt16 howToEnableFrameUI

PRBool isCancelled

PRBool isInitializedFromPrefs

This attribute tracks whether the PS has been initialized from prefs. If a different name is set into the "printerName" attribute than the one it was initialized with the PS will then get intialized from prefs again.

PRBool isInitializedFromPrinter

This attribute tracks whether the PS has been initialized from a printer specified by the "printerName" attr. If a different name is set into the "printerName" attribute than the one it was initialized with the PS will then get intialized from that printer.

double marginBottom

double marginLeft

double marginRight

double marginTop

PRInt32 numCopies

PRInt32 orientation

PRInt16 paperData

double paperHeight

PRUnichar* paperName

PRInt32 paperSize

PRInt16 paperSizeType

PRInt16 paperSizeUnit

double paperWidth

PRUnichar* plexName

PRBool printBGColors

PRBool printBGImages

PRUnichar* printCommand

PRUnichar* printerName

PRInt16 printFrameType

PRInt16 printFrameTypeUsage

PRBool printInColor

PRInt32 printPageDelay

PRInt16 printRange

PRBool printReversed

nsIPrintSession printSession

Data Members

PRBool printSilent

PRBool printToFile

PRUnichar* resolutionName

double scaling

PRBool showPrintProgress

PRBool shrinkToFit

PRInt32 startPageRange

PRUnichar* title

PRUnichar* toFileName


Methods

void assign ( nsIPrintSettings PS ) nsIPrintSettings clone ( ) [noscript] void GetMarginInTwips ( nsNativeMarginRef margin ) void GetPageSizeInTwips ( out PRInt32 width , out PRInt32 height ) PRBool GetPrintOptions ( PRInt32 type ) PRInt32 GetPrintOptionsBits ( ) [noscript] void SetMarginInTwips ( nsNativeMarginRef margin ) void SetPrintOptions ( PRInt32 type , PRBool turnOnOff )

void assign ( nsIPrintSettings PS )

Assigns the internal values from the "in" arg to the current object

Arguments:
PS

nsIPrintSettings clone ( )

Makes a new copy


void GetMarginInTwips ( nsNativeMarginRef margin )

Arguments:
margin

void GetPageSizeInTwips ( out PRInt32 width , out PRInt32 height )

Returns W/H in Twips from Paper Size H/W

Arguments:
width
height

PRBool GetPrintOptions ( PRInt32 type )

Get PrintOptions

Arguments:
type

PRInt32 GetPrintOptionsBits ( )

Set PrintOptions Bit field


void SetMarginInTwips ( nsNativeMarginRef margin )

Arguments:
margin

void SetPrintOptions ( PRInt32 type , PRBool turnOnOff )

Set PrintOptions

Arguments:
type
turnOnOff

References

This interface is the type of the following properties:

nsIPrintSettingsService.globalPrintSettings, nsIPrintSettingsService.newPrintSettings, nsIWebBrowserPrint.currentPrintSettings, nsIWebBrowserPrint.globalPrintSettings

This interface is passed as an argument to the following methods:

nsIContentViewerFile.print, nsIContentViewerFile.printWithParent, nsIMsgPrintEngine.startPrintOperation, nsIPrintOptions.ShowPrintSetupDialog, nsIPrintOptions.displayJobProperties, nsIPrintOptions.getPrinterPrefInt, nsIPrintSettings.assign, nsIPrintSettingsService.initPrintSettingsFromPrefs, nsIPrintSettingsService.initPrintSettingsFromPrinter, nsIPrintSettingsService.savePrintSettingsToPrefs, nsIPrinterEnumerator.displayPropertiesDlg, nsIPrinterEnumerator.initPrintSettingsFromPrinter, nsIPrintingPrompt.showPageSetup, nsIPrintingPrompt.showPrintDialog, nsIPrintingPrompt.showPrinterProperties, nsIPrintingPrompt.showProgress, nsIPrintingPromptService.showPageSetup, nsIPrintingPromptService.showPrintDialog, nsIPrintingPromptService.showPrinterProperties, nsIPrintingPromptService.showProgress, nsIWebBrowserPrint.print, nsIWebBrowserPrint.printPreview

This interface is returned from the following methods:

nsIPrintOptions.CreatePrintSettings, nsIPrintSettings.clone

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com