Linux Mac OSX Windows
 Simplified graphics interface for JS rendering.

 @status UNDER_REVIEW
[scriptable, uuid(f1094df6-ce0e-42c9-9847-2f663172c38d)]
interface nsIPrintSettings : nsISupports

Constants

 PrintSettings to be Saved Navigation Constants
const unsigned long kInitSaveOddEvenPages = 1

        
const unsigned long kInitSaveHeaderLeft = 2

        
const unsigned long kInitSaveHeaderCenter = 4

        
const unsigned long kInitSaveHeaderRight = 8

        
const unsigned long kInitSaveFooterLeft = 16

        
const unsigned long kInitSaveFooterCenter = 32

        
const unsigned long kInitSaveFooterRight = 64

        
const unsigned long kInitSaveBGColors = 128

        
const unsigned long kInitSaveBGImages = 256

        
const unsigned long kInitSavePaperSize = 512

        
const unsigned long kInitSavePaperName = 1024

        
const unsigned long kInitSavePaperSizeUnit = 2048

        
const unsigned long kInitSavePaperSizeType = 4096

        
const unsigned long kInitSavePaperData = 8192

        
const unsigned long kInitSavePaperWidth = 16384

        
const unsigned long kInitSavePaperHeight = 32768

        
const unsigned long kInitSaveReversed = 65536

        
const unsigned long kInitSaveInColor = 131072

        
const unsigned long kInitSaveOrientation = 262144

        
const unsigned long kInitSavePrintCommand = 524288

        
const unsigned long kInitSavePrinterName = 1048576

        
const unsigned long kInitSavePrintToFile = 2097152

        
const unsigned long kInitSaveToFileName = 4194304

        
const unsigned long kInitSavePageDelay = 8388608

        
const unsigned long kInitSaveMargins = 16777216

        
const unsigned long kInitSaveNativeData = 33554432

        
const unsigned long kInitSavePlexName = 67108864

        
const unsigned long kInitSaveShrinkToFit = 134217728

        
const unsigned long kInitSaveScaling = 268435456

        
const unsigned long kInitSaveColorspace = 536870912

        
const unsigned long kInitSaveResolutionName = 1073741824

        
const unsigned long kInitSaveDownloadFonts = 2147483648

        
const unsigned long kInitSaveAll = 4294967295

        
const long kPrintOddPages = 1

        
const long kPrintEvenPages = 2

        
const long kEnableSelectionRB = 4

        
const long kRangeAllPages = 0

        
const long kRangeSpecifiedPageRange = 1

        
const long kRangeSelection = 2

        
const long kRangeFocusFrame = 3

        
const long kJustLeft = 0

        
const long kJustCenter = 1

        
const long kJustRight = 2
 FrameSet Default Type Constants
const short kUseInternalDefault = 0

        
const short kUseSettingWhenPossible = 1
 Page Size Type Constants
const short kPaperSizeNativeData = 0

        
const short kPaperSizeDefined = 1
 Page Size Unit Constants
const short kPaperSizeInches = 0

        
const short kPaperSizeMillimeters = 1
 Orientation Constants
const short kPortraitOrientation = 0

        
const short kLandscapeOrientation = 1
 Print Frame Constants
const short kNoFrames = 0

        
const short kFramesAsIs = 1

        
const short kSelectedFrame = 2

        
const short kEachFrameSep = 3
 How to Enable Frame Set Printing Constants
const short kFrameEnableNone = 0

        
const short kFrameEnableAll = 1

        
const short kFrameEnableAsIsAndEach = 2

Attributes


        
attribute wstring colorspace

        
attribute wstring docURL

        
attribute boolean downloadFonts

        
attribute long endPageRange

        
attribute wstring footerStrCenter

        
attribute wstring footerStrLeft

        
attribute wstring footerStrRight

        
attribute wstring headerStrCenter

        
attribute wstring headerStrLeft

        
attribute wstring headerStrRight

        
attribute short howToEnableFrameUI

        
attribute boolean isCancelled
 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.
attribute boolean isInitializedFromPrefs
 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.
attribute boolean isInitializedFromPrinter

        
attribute double marginBottom

        
attribute double marginLeft

        
attribute double marginRight

        
attribute double marginTop

        
attribute long numCopies

        
attribute long orientation

        
attribute short paperData

        
attribute double paperHeight

        
attribute wstring paperName

        
attribute long paperSize

        
attribute short paperSizeType

        
attribute short paperSizeUnit

        
attribute double paperWidth

        
attribute wstring plexName

        
attribute boolean printBGColors

        
attribute boolean printBGImages

        
attribute wstring printCommand

        
attribute wstring printerName

        
attribute short printFrameType

        
attribute short printFrameTypeUsage

        
attribute boolean printInColor

        
attribute long printPageDelay

        
attribute short printRange

        
attribute boolean printReversed
 Data Members
[noscript] attribute nsIPrintSession printSession

        
attribute boolean printSilent

        
attribute boolean printToFile

        
attribute wstring resolutionName

        
attribute double scaling

        
attribute boolean showPrintProgress

        
attribute boolean shrinkToFit

        
attribute long startPageRange

        
attribute wstring title

        
attribute wstring toFileName

Methods

 Assigns the internal values from the "in" arg to the current object
void assign(in nsIPrintSettings aPS)
 Makes a new copy
nsIPrintSettings clone()

        
[noscript] void GetMarginInTwips(in nsNativeMarginRef aMargin)
 Returns W/H in Twips from Paper Size H/W
void GetPageSizeInTwips(out long aWidth, out long aHeight)
 Get PrintOptions 
PRBool GetPrintOptions(in PRInt32 aType)
 Set PrintOptions Bit field
PRInt32 GetPrintOptionsBits()

        
[noscript] void SetMarginInTwips(in nsNativeMarginRef aMargin)
 Set PrintOptions 
void SetPrintOptions(in PRInt32 aType, in PRBool aTurnOnOff)