type

  nsIPrintSettings = interface(nsISupports)
  ['{4404c94b-0506-4255-9e3c-4582dba6cfbb}']
    procedure SetPrintOptions(aType: PRInt32; aTurnOnOff: longbool); safecall;
    function GetPrintOptions(aType: PRInt32) : longbool; safecall;
    function GetPrintOptionsBits() : PRInt32; safecall;
    procedure GetEffectivePageSize(out aWidth: double; out aHeight: double); safecall;
    function clone() : nsIPrintSettings; safecall;
    procedure assign(aPS: nsIPrintSettings); safecall;
    function GetprintSession(): nsIPrintSession; safecall;
    procedure SetprintSession(aprintSession: nsIPrintSession); safecall;
    property printSession : nsIPrintSession read GetprintSession write SetprintSession;
    function GetstartPageRange(): idllong; safecall;
    procedure SetstartPageRange(astartPageRange: idllong); safecall;
    property startPageRange : idllong read GetstartPageRange write SetstartPageRange;
    function GetendPageRange(): idllong; safecall;
    procedure SetendPageRange(aendPageRange: idllong); safecall;
    property endPageRange : idllong read GetendPageRange write SetendPageRange;
    function GetedgeTop(): double; safecall;
    procedure SetedgeTop(aedgeTop: double); safecall;
    property edgeTop : double read GetedgeTop write SetedgeTop;
    function GetedgeLeft(): double; safecall;
    procedure SetedgeLeft(aedgeLeft: double); safecall;
    property edgeLeft : double read GetedgeLeft write SetedgeLeft;
    function GetedgeBottom(): double; safecall;
    procedure SetedgeBottom(aedgeBottom: double); safecall;
    property edgeBottom : double read GetedgeBottom write SetedgeBottom;
    function GetedgeRight(): double; safecall;
    procedure SetedgeRight(aedgeRight: double); safecall;
    property edgeRight : double read GetedgeRight write SetedgeRight;
    function GetmarginTop(): double; safecall;
    procedure SetmarginTop(amarginTop: double); safecall;
    property marginTop : double read GetmarginTop write SetmarginTop;
    function GetmarginLeft(): double; safecall;
    procedure SetmarginLeft(amarginLeft: double); safecall;
    property marginLeft : double read GetmarginLeft write SetmarginLeft;
    function GetmarginBottom(): double; safecall;
    procedure SetmarginBottom(amarginBottom: double); safecall;
    property marginBottom : double read GetmarginBottom write SetmarginBottom;
    function GetmarginRight(): double; safecall;
    procedure SetmarginRight(amarginRight: double); safecall;
    property marginRight : double read GetmarginRight write SetmarginRight;
    function GetunwriteableMarginTop(): double; safecall;
    procedure SetunwriteableMarginTop(aunwriteableMarginTop: double); safecall;
    property unwriteableMarginTop : double read GetunwriteableMarginTop write SetunwriteableMarginTop;
    function GetunwriteableMarginLeft(): double; safecall;
    procedure SetunwriteableMarginLeft(aunwriteableMarginLeft: double); safecall;
    property unwriteableMarginLeft : double read GetunwriteableMarginLeft write SetunwriteableMarginLeft;
    function GetunwriteableMarginBottom(): double; safecall;
    procedure SetunwriteableMarginBottom(aunwriteableMarginBottom: double); safecall;
    property unwriteableMarginBottom : double read GetunwriteableMarginBottom write SetunwriteableMarginBottom;
    function GetunwriteableMarginRight(): double; safecall;
    procedure SetunwriteableMarginRight(aunwriteableMarginRight: double); safecall;
    property unwriteableMarginRight : double read GetunwriteableMarginRight write SetunwriteableMarginRight;
    function Getscaling(): double; safecall;
    procedure Setscaling(ascaling: double); safecall;
    property scaling : double read Getscaling write Setscaling;
    function GetprintBGColors(): longbool; safecall;
    procedure SetprintBGColors(aprintBGColors: longbool); safecall;
    property printBGColors : longbool read GetprintBGColors write SetprintBGColors;
    function GetprintBGImages(): longbool; safecall;
    procedure SetprintBGImages(aprintBGImages: longbool); safecall;
    property printBGImages : longbool read GetprintBGImages write SetprintBGImages;
    function GetprintRange(): idlshort; safecall;
    procedure SetprintRange(aprintRange: idlshort); safecall;
    property printRange : idlshort read GetprintRange write SetprintRange;
    function Gettitle(): PWideChar; safecall;
    procedure Settitle(atitle: PWideChar); safecall;
    property title : PWideChar read Gettitle write Settitle;
    function GetdocURL(): PWideChar; safecall;
    procedure SetdocURL(adocURL: PWideChar); safecall;
    property docURL : PWideChar read GetdocURL write SetdocURL;
    function GetheaderStrLeft(): PWideChar; safecall;
    procedure SetheaderStrLeft(aheaderStrLeft: PWideChar); safecall;
    property headerStrLeft : PWideChar read GetheaderStrLeft write SetheaderStrLeft;
    function GetheaderStrCenter(): PWideChar; safecall;
    procedure SetheaderStrCenter(aheaderStrCenter: PWideChar); safecall;
    property headerStrCenter : PWideChar read GetheaderStrCenter write SetheaderStrCenter;
    function GetheaderStrRight(): PWideChar; safecall;
    procedure SetheaderStrRight(aheaderStrRight: PWideChar); safecall;
    property headerStrRight : PWideChar read GetheaderStrRight write SetheaderStrRight;
    function GetfooterStrLeft(): PWideChar; safecall;
    procedure SetfooterStrLeft(afooterStrLeft: PWideChar); safecall;
    property footerStrLeft : PWideChar read GetfooterStrLeft write SetfooterStrLeft;
    function GetfooterStrCenter(): PWideChar; safecall;
    procedure SetfooterStrCenter(afooterStrCenter: PWideChar); safecall;
    property footerStrCenter : PWideChar read GetfooterStrCenter write SetfooterStrCenter;
    function GetfooterStrRight(): PWideChar; safecall;
    procedure SetfooterStrRight(afooterStrRight: PWideChar); safecall;
    property footerStrRight : PWideChar read GetfooterStrRight write SetfooterStrRight;
    function GethowToEnableFrameUI(): idlshort; safecall;
    procedure SethowToEnableFrameUI(ahowToEnableFrameUI: idlshort); safecall;
    property howToEnableFrameUI : idlshort read GethowToEnableFrameUI write SethowToEnableFrameUI;
    function GetisCancelled(): longbool; safecall;
    procedure SetisCancelled(aisCancelled: longbool); safecall;
    property isCancelled : longbool read GetisCancelled write SetisCancelled;
    function GetprintFrameTypeUsage(): idlshort; safecall;
    procedure SetprintFrameTypeUsage(aprintFrameTypeUsage: idlshort); safecall;
    property printFrameTypeUsage : idlshort read GetprintFrameTypeUsage write SetprintFrameTypeUsage;
    function GetprintFrameType(): idlshort; safecall;
    procedure SetprintFrameType(aprintFrameType: idlshort); safecall;
    property printFrameType : idlshort read GetprintFrameType write SetprintFrameType;
    function GetprintSilent(): longbool; safecall;
    procedure SetprintSilent(aprintSilent: longbool); safecall;
    property printSilent : longbool read GetprintSilent write SetprintSilent;
    function GetshrinkToFit(): longbool; safecall;
    procedure SetshrinkToFit(ashrinkToFit: longbool); safecall;
    property shrinkToFit : longbool read GetshrinkToFit write SetshrinkToFit;
    function GetshowPrintProgress(): longbool; safecall;
    procedure SetshowPrintProgress(ashowPrintProgress: longbool); safecall;
    property showPrintProgress : longbool read GetshowPrintProgress write SetshowPrintProgress;
    function GetpaperName(): PWideChar; safecall;
    procedure SetpaperName(apaperName: PWideChar); safecall;
    property paperName : PWideChar read GetpaperName write SetpaperName;
    function GetpaperSizeType(): idlshort; safecall;
    procedure SetpaperSizeType(apaperSizeType: idlshort); safecall;
    property paperSizeType : idlshort read GetpaperSizeType write SetpaperSizeType;
    function GetpaperData(): idlshort; safecall;
    procedure SetpaperData(apaperData: idlshort); safecall;
    property paperData : idlshort read GetpaperData write SetpaperData;
    function GetpaperWidth(): double; safecall;
    procedure SetpaperWidth(apaperWidth: double); safecall;
    property paperWidth : double read GetpaperWidth write SetpaperWidth;
    function GetpaperHeight(): double; safecall;
    procedure SetpaperHeight(apaperHeight: double); safecall;
    property paperHeight : double read GetpaperHeight write SetpaperHeight;
    function GetpaperSizeUnit(): idlshort; safecall;
    procedure SetpaperSizeUnit(apaperSizeUnit: idlshort); safecall;
    property paperSizeUnit : idlshort read GetpaperSizeUnit write SetpaperSizeUnit;
    function GetplexName(): PWideChar; safecall;
    procedure SetplexName(aplexName: PWideChar); safecall;
    property plexName : PWideChar read GetplexName write SetplexName;
    function Getcolorspace(): PWideChar; safecall;
    procedure Setcolorspace(acolorspace: PWideChar); safecall;
    property colorspace : PWideChar read Getcolorspace write Setcolorspace;
    function GetresolutionName(): PWideChar; safecall;
    procedure SetresolutionName(aresolutionName: PWideChar); safecall;
    property resolutionName : PWideChar read GetresolutionName write SetresolutionName;
    function GetdownloadFonts(): longbool; safecall;
    procedure SetdownloadFonts(adownloadFonts: longbool); safecall;
    property downloadFonts : longbool read GetdownloadFonts write SetdownloadFonts;
    function GetprintReversed(): longbool; safecall;
    procedure SetprintReversed(aprintReversed: longbool); safecall;
    property printReversed : longbool read GetprintReversed write SetprintReversed;
    function GetprintInColor(): longbool; safecall;
    procedure SetprintInColor(aprintInColor: longbool); safecall;
    property printInColor : longbool read GetprintInColor write SetprintInColor;
    function Getorientation(): idllong; safecall;
    procedure Setorientation(aorientation: idllong); safecall;
    property orientation : idllong read Getorientation write Setorientation;
    function GetprintCommand(): PWideChar; safecall;
    procedure SetprintCommand(aprintCommand: PWideChar); safecall;
    property printCommand : PWideChar read GetprintCommand write SetprintCommand;
    function GetnumCopies(): idllong; safecall;
    procedure SetnumCopies(anumCopies: idllong); safecall;
    property numCopies : idllong read GetnumCopies write SetnumCopies;
    function GetprinterName(): PWideChar; safecall;
    procedure SetprinterName(aprinterName: PWideChar); safecall;
    property printerName : PWideChar read GetprinterName write SetprinterName;
    function GetprintToFile(): longbool; safecall;
    procedure SetprintToFile(aprintToFile: longbool); safecall;
    property printToFile : longbool read GetprintToFile write SetprintToFile;
    function GettoFileName(): PWideChar; safecall;
    procedure SettoFileName(atoFileName: PWideChar); safecall;
    property toFileName : PWideChar read GettoFileName write SettoFileName;
    function GetoutputFormat(): idlshort; safecall;
    procedure SetoutputFormat(aoutputFormat: idlshort); safecall;
    property outputFormat : idlshort read GetoutputFormat write SetoutputFormat;
    function GetprintPageDelay(): idllong; safecall;
    procedure SetprintPageDelay(aprintPageDelay: idllong); safecall;
    property printPageDelay : idllong read GetprintPageDelay write SetprintPageDelay;
    function GetisInitializedFromPrinter(): longbool; safecall;
    procedure SetisInitializedFromPrinter(aisInitializedFromPrinter: longbool); safecall;
    property isInitializedFromPrinter : longbool read GetisInitializedFromPrinter write SetisInitializedFromPrinter;
    function GetisInitializedFromPrefs(): longbool; safecall;
    procedure SetisInitializedFromPrefs(aisInitializedFromPrefs: longbool); safecall;
    property isInitializedFromPrefs : longbool read GetisInitializedFromPrefs write SetisInitializedFromPrefs;
{    procedure SetMarginInTwips(aMargin: nsNativeIntMarginRef); safecall;
    procedure SetEdgeInTwips(aEdge: nsNativeIntMarginRef); safecall;
    procedure GetMarginInTwips(aMargin: nsNativeIntMarginRef); safecall;
    procedure GetEdgeInTwips(aEdge: nsNativeIntMarginRef); safecall;
    procedure SetupSilentPrinting(); safecall;
    procedure SetUnwriteableMarginInTwips(aEdge: nsNativeIntMarginRef); safecall;
    procedure GetUnwriteableMarginInTwips(aEdge: nsNativeIntMarginRef); safecall;
    procedure GetPageRanges(aPages: IntegerArray); safecall;
}
  end;

const
  nsIPrintSettings_kInitSaveOddEvenPages=$00000001;
  nsIPrintSettings_kInitSaveHeaderLeft=$00000002;
  nsIPrintSettings_kInitSaveHeaderCenter=$00000004;
  nsIPrintSettings_kInitSaveHeaderRight=$00000008;
  nsIPrintSettings_kInitSaveFooterLeft=$00000010;
  nsIPrintSettings_kInitSaveFooterCenter=$00000020;
  nsIPrintSettings_kInitSaveFooterRight=$00000040;
  nsIPrintSettings_kInitSaveBGColors=$00000080;
  nsIPrintSettings_kInitSaveBGImages=$00000100;
  nsIPrintSettings_kInitSavePaperSize=$00000200;
  nsIPrintSettings_kInitSavePaperData=$00002000;
  nsIPrintSettings_kInitSaveUnwriteableMargins=$00004000;
  nsIPrintSettings_kInitSaveEdges=$00008000;
  nsIPrintSettings_kInitSaveReversed=$00010000;
  nsIPrintSettings_kInitSaveInColor=$00020000;
  nsIPrintSettings_kInitSaveOrientation=$00040000;
  nsIPrintSettings_kInitSavePrintCommand=$00080000;
  nsIPrintSettings_kInitSavePrinterName=$00100000;
  nsIPrintSettings_kInitSavePrintToFile=$00200000;
  nsIPrintSettings_kInitSaveToFileName=$00400000;
  nsIPrintSettings_kInitSavePageDelay=$00800000;
  nsIPrintSettings_kInitSaveMargins=$01000000;
  nsIPrintSettings_kInitSaveNativeData=$02000000;
  nsIPrintSettings_kInitSavePlexName=$04000000;
  nsIPrintSettings_kInitSaveShrinkToFit=$08000000;
  nsIPrintSettings_kInitSaveScaling=$10000000;
  nsIPrintSettings_kInitSaveColorspace=$20000000;
  nsIPrintSettings_kInitSaveResolutionName=$40000000;
  nsIPrintSettings_kInitSaveDownloadFonts=$80000000;
  nsIPrintSettings_kInitSaveAll=$FFFFFFFF;
  nsIPrintSettings_kPrintOddPages=$00000001;
  nsIPrintSettings_kPrintEvenPages=$00000002;
  nsIPrintSettings_kEnableSelectionRB=$00000004;
  nsIPrintSettings_kRangeAllPages=0;
  nsIPrintSettings_kRangeSpecifiedPageRange=1;
  nsIPrintSettings_kRangeSelection=2;
  nsIPrintSettings_kRangeFocusFrame=3;
  nsIPrintSettings_kJustLeft=0;
  nsIPrintSettings_kJustCenter=1;
  nsIPrintSettings_kJustRight=2;
  nsIPrintSettings_kUseInternalDefault=0;
  nsIPrintSettings_kUseSettingWhenPossible=1;
  nsIPrintSettings_kPaperSizeNativeData=0;
  nsIPrintSettings_kPaperSizeDefined=1;
  nsIPrintSettings_kPaperSizeInches=0;
  nsIPrintSettings_kPaperSizeMillimeters=1;
  nsIPrintSettings_kPortraitOrientation=0;
  nsIPrintSettings_kLandscapeOrientation=1;
  nsIPrintSettings_kNoFrames=0;
  nsIPrintSettings_kFramesAsIs=1;
  nsIPrintSettings_kSelectedFrame=2;
  nsIPrintSettings_kEachFrameSep=3;
  nsIPrintSettings_kFrameEnableNone=0;
  nsIPrintSettings_kFrameEnableAll=1;
  nsIPrintSettings_kFrameEnableAsIsAndEach=2;
  nsIPrintSettings_kOutputFormatNative=0;
  nsIPrintSettings_kOutputFormatPS=1;
  nsIPrintSettings_kOutputFormatPDF=2;

