Class KeepSolidObjectsAlgorithm
Nombre del espacio: Aspose.Note.Saving Asamblea: Aspose.Note.dll (25.4.0)
Cambiar el objeto completo a la siguiente página en caso de que no se ajuste en la página original.
public class KeepSolidObjectsAlgorithm : PageSplittingAlgorithm
Inheritance
object ← PageSplittingAlgorithm ← KeepSolidObjectsAlgorithm
Miembros heredados
object.GetType() ,y, object.MemberwiseClone() ,y, object.ToString() ,y, object.Equals(object?) ,y, object.Equals(object?, object?) ,y, object.ReferenceEquals(object?, object?) ,y, object.GetHashCode()
Examples
Mostra cómo guardar un notebook en formato pdf con opciones especificadas.
// 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);
Mostra cómo enviar un documento a una impresora utilizando el diálogo estándar de Windows con opciones especificadas.
// 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"
});
Cuando las largas páginas de OneNote se almacenan en formato pdf, se dividen entre páginas.El ejemplo muestra cómo configurar la lógica de división de los objetos ubicados en las brechas de la página.
// 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()
Inicia una nueva instancia del Aspose.Note.Saving.KeepSolidObjectsClasse de algoritmo utilizando el límite de altura de la parte clonada por defecto.
public KeepSolidObjectsAlgorithm()
KeepSolidObjectsAlgorithm(float)
Inicializa una nueva instancia del Aspose.Note.Saving.KeepSolidObjectsClasse de algoritmo utilizando un límite de altura específico de la parte clonada.
public KeepSolidObjectsAlgorithm(float heightLimitOfClonedPart)
Parameters
heightLimitOfClonedPart
float
La altura máxima de la parte clonada.
Fields
DefaultHeightLimitOfClonedPart
El tamaño máximo de la parte clonada.
public const float DefaultHeightLimitOfClonedPart = 200
Valor de campo
Properties
HeightLimitOfClonedPart
Tiene el límite de altura de la parte clonada.
public float HeightLimitOfClonedPart { get; }