Class PrintOptions
Pôvodný názov: Aspose.Note.Saving Zhromaždenie: Aspose.Note.dll (25.4.0)
Možnosti používané na tlač dokumentu.
public class PrintOptions
Inheritance
Z dedičných členov
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Examples
Ukáže, ako poslať dokument do tlačiarne pomocou štandardného dialógu systému Windows so špecifikovanými možnosťami.
// The path to the documents directory.
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
PrintOptions()
public PrintOptions()
Properties
DocumentName
Dostanete alebo nastavíte názov dokumentu, ktorý sa zobrazí (napríklad v dialógovom okne stavu tlače alebo tlačiareň) pri vytlačení dokumentu.
public string DocumentName { get; set; }
Hodnota nehnuteľnosti
Examples
Ukáže, ako poslať dokument do tlačiarne pomocou štandardného dialógu systému Windows so špecifikovanými možnosťami.
// The path to the documents directory.
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
Získajte alebo nastavíte algoritmus používaný na rozdelenie stránok.
public PageSplittingAlgorithm PageSplittingAlgorithm { get; set; }
Hodnota nehnuteľnosti
Examples
Ukáže, ako poslať dokument do tlačiarne pomocou štandardného dialógu systému Windows so špecifikovanými možnosťami.
// The path to the documents directory.
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
Dostane alebo nastaví nastavenia tlačiarne.
public PrinterSettings PrinterSettings { get; set; }
Hodnota nehnuteľnosti
Examples
Ukáže, ako poslať dokument do tlačiarne pomocou štandardného dialógu systému Windows so špecifikovanými možnosťami.
// The path to the documents directory.
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
Získať alebo nastaviť rozlíšenie pre generované obrázky, v bodoch na palec.
public float Resolution { get; set; }
Hodnota nehnuteľnosti
Examples
Ukáže, ako poslať dokument do tlačiarne pomocou štandardného dialógu systému Windows so špecifikovanými možnosťami.
// The path to the documents directory.
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
Predvolená hodnota je 96.