Class KeepSolidObjectsAlgorithm
Der Name: Aspose.Note.Saving Zusammensetzung: Aspose.Note.dll (25.4.0)
Sie wechseln das vollständige Objekt auf die nächste Seite, wenn es nicht in der ursprünglichen Seite passt.
public class KeepSolidObjectsAlgorithm : PageSplittingAlgorithm
Inheritance
object ← PageSplittingAlgorithm ← KeepSolidObjectsAlgorithm
Vererbte Mitglieder
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Examples
Zeigt, wie man das Notebook in PDF-Format mit angegebenen Optionen speichert.
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_NoteBook();
// Load a OneNote Notebook
var notebook = new Notebook(dataDir + "Notizbuch �ffnen.onetoc2");
var notebookSaveOptions = new NotebookPdfSaveOptions();
var documentSaveOptions = notebookSaveOptions.DocumentSaveOptions;
documentSaveOptions.PageSplittingAlgorithm = new KeepSolidObjectsAlgorithm();
dataDir = dataDir + "ConvertToPDF_out.pdf";
// Save the Notebook
notebook.Save(dataDir, notebookSaveOptions);
Zeigt, wie Sie ein Dokument an einen Drucker mit einem Standard-Windows-Dialog mit angegebenen Optionen senden können.
// 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"
});
Wenn lange OneNote-Seiten in PDF-Format gespeichert werden, werden sie über Seiten geteilt. Das Beispiel zeigt, wie man die getrennte Logik der Objekte auf den Seitenbrechen konfiguriert.
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
// Load the document into Aspose.Note.
Document doc = new Document(dataDir + "Aspose.one");
var pdfSaveOptions = new PdfSaveOptions();
pdfSaveOptions.PageSplittingAlgorithm = new AlwaysSplitObjectsAlgorithm();
// Or
pdfSaveOptions.PageSplittingAlgorithm = new KeepPartAndCloneSolidObjectToNextPageAlgorithm();
// Or
pdfSaveOptions.PageSplittingAlgorithm = new KeepSolidObjectsAlgorithm();
float heightLimitOfClonedPart = 500;
pdfSaveOptions.PageSplittingAlgorithm = new KeepPartAndCloneSolidObjectToNextPageAlgorithm(heightLimitOfClonedPart);
// Or
pdfSaveOptions.PageSplittingAlgorithm = new KeepSolidObjectsAlgorithm(heightLimitOfClonedPart);
pdfSaveOptions.PageSplittingAlgorithm = new KeepSolidObjectsAlgorithm(100);
// Or
pdfSaveOptions.PageSplittingAlgorithm = new KeepSolidObjectsAlgorithm(400);
dataDir = dataDir + "UsingKeepSOlidObjectsAlgorithm_out.pdf";
doc.Save(dataDir);
Constructors
KeepSolidObjectsAlgorithm()
Initialisiert eine neue Instanz der Aspose.Note.Saving.KeepSolidObjectsAlgorithmusklasse mit default-Höchtigkeitsgrenze des klonierten Teils.
public KeepSolidObjectsAlgorithm()
KeepSolidObjectsAlgorithm(Flotte)
Initialisiert eine neue Instanz der Aspose.Note.Saving.KeepSolidObjectsAlgorithmusklasse mit spezifischer Höhegrenze des klonierten Teils.
public KeepSolidObjectsAlgorithm(float heightLimitOfClonedPart)
Parameters
heightLimitOfClonedPart
float
Die maximale Höhe des klonierten Teils.
Fields
DefaultHeightLimitOfClonedPart
Die standardmäßige Maxgröße des klonierten Teils.
public const float DefaultHeightLimitOfClonedPart = 200
Feldwert
Properties
HeightLimitOfClonedPart
Erreicht die Höhegrenze des klonierten Teils.
public float HeightLimitOfClonedPart { get; }