Class PrintOptions
Nazwa przestrzeń: Aspose.Note.Saving Zgromadzenie: Aspose.Note.dll (25.4.0)
Opcje wykorzystywane do drukowania dokumentu.
public class PrintOptions
{
private bool _copies;
private int _from;
private int _to;
public bool Copies
{
get { return this._copies; }
set { this._copies = value; }
}
public int From
{
get { return this._from; }
set { this._from = value; }
}
public int To
{
get { return this._to; }
set { this._to = value; }
}
}
Inheritance
Dziedziczeni członkowie
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Examples
Pokaż, jak wysłać dokument do drukarki za pomocą standardowego dialogu systemu Windows z określonymi opcjami.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
var document = new Aspose.Note.Document(dataDir + "Aspose.one");
var printerSettings = new PrinterSettings()
{
FromPage = 0,
ToPage = 10
};
printerSettings.DefaultPageSettings.Landscape = true;
printerSettings.DefaultPageSettings.Margins = new System.Drawing.Printing.Margins(50, 50, 150, 50);
document.Print(new PrintOptions()
{
PrinterSettings = printerSettings,
Resolution = 1200,
PageSplittingAlgorithm = new KeepSolidObjectsAlgorithm(),
DocumentName = "Test.one"
});
Constructors
Opcje drukowania ()
public PrintOptions()
{
}
Properties
DocumentName
Otrzymuje lub ustawia nazwę dokumentu do wyświetlania (na przykład w polu dialogowym statusu drukowania lub kręgu drukarki) podczas drukacji dokumentu.
public string DocumentName
{
get;
set;
}
Wartość nieruchomości
Examples
Pokaż, jak wysłać dokument do drukarki za pomocą standardowego dialogu systemu Windows z określonymi opcjami.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
var document = new Aspose.Note.Document(dataDir + "Aspose.one");
var printerSettings = new PrinterSettings()
{
FromPage = 0,
ToPage = 10
};
printerSettings.DefaultPageSettings.Landscape = true;
printerSettings.DefaultPageSettings.Margins = new System.Drawing.Printing.Margins(50, 50, 150, 50);
document.Print(new PrintOptions()
{
PrinterSettings = printerSettings,
Resolution = 1200,
PageSplittingAlgorithm = new KeepSolidObjectsAlgorithm(),
DocumentName = "Test.one"
});
PageSplittingAlgorithm
Dostęp lub ustaw algorytm używany do podziału stron.
public PageSplittingAlgorithm PageSplittingAlgorithm
{
get;
set;
}
Wartość nieruchomości
Examples
Pokaż, jak wysłać dokument do drukarki za pomocą standardowego dialogu systemu Windows z określonymi opcjami.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
var document = new Aspose.Note.Document(dataDir + "Aspose.one");
var printerSettings = new PrinterSettings()
{
FromPage = 0,
ToPage = 10
};
printerSettings.DefaultPageSettings.Landscape = true;
printerSettings.DefaultPageSettings.Margins = new System.Drawing.Printing.Margins(50, 50, 150, 50);
document.Print(new PrintOptions()
{
PrinterSettings = printerSettings,
Resolution = 1200,
PageSplittingAlgorithm = new KeepSolidObjectsAlgorithm(),
DocumentName = "Test.one"
});
PrinterSettings
Pobierz lub ustawić ustawienia drukarki.
public PrinterSettings PrinterSettings
{
get;
set;
}
Wartość nieruchomości
Examples
Pokaż, jak wysłać dokument do drukarki za pomocą standardowego dialogu systemu Windows z określonymi opcjami.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
var document = new Aspose.Note.Document(dataDir + "Aspose.one");
var printerSettings = new PrinterSettings()
{
FromPage = 0,
ToPage = 10
};
printerSettings.DefaultPageSettings.Landscape = true;
printerSettings.DefaultPageSettings.Margins = new System.Drawing.Printing.Margins(50, 50, 150, 50);
document.Print(new PrintOptions()
{
PrinterSettings = printerSettings,
Resolution = 1200,
PageSplittingAlgorithm = new KeepSolidObjectsAlgorithm(),
DocumentName = "Test.one"
});
Resolution
Otrzymuje lub ustawia rozdzielczość dla generowanych obrazów, w punktach na cala.
public float Resolution
{
get;
set;
}
Wartość nieruchomości
Examples
Pokaż, jak wysłać dokument do drukarki za pomocą standardowego dialogu systemu Windows z określonymi opcjami.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
var document = new Aspose.Note.Document(dataDir + "Aspose.one");
var printerSettings = new PrinterSettings()
{
FromPage = 0,
ToPage = 10
};
printerSettings.DefaultPageSettings.Landscape = true;
printerSettings.DefaultPageSettings.Margins = new System.Drawing.Printing.Margins(50, 50, 150, 50);
document.Print(new PrintOptions()
{
PrinterSettings = printerSettings,
Resolution = 1200,
PageSplittingAlgorithm = new KeepSolidObjectsAlgorithm(),
DocumentName = "Test.one"
});
Remarks
Wartość zwykła wynosi 96.