Class KeepPartAndCloneSolidObjectToNextPageAlgorithm

Class KeepPartAndCloneSolidObjectToNextPageAlgorithm

Namespace: Aspose.Note.Saving
Assembly: Aspose.Note.dll (24.12.0)

Adds object’s top part to the bottom of the page and clones full object to the next page in case it doesn’t fit in original page.

public class KeepPartAndCloneSolidObjectToNextPageAlgorithm : PageSplittingAlgorithm

Inheritance

objectPageSplittingAlgorithmKeepPartAndCloneSolidObjectToNextPageAlgorithm

Inherited Members

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Examples

When long OneNote pages are saved in pdf format they are split across pages. The sample shows how to configure the splitting logic of objects located on page’s breaks.```csharp // 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 KeepPartAndCloneSolidObjectToNextPageAlgorithm(100);
                                                                                                                                                                              // or
                                                                                                                                                                              pdfSaveOptions.PageSplittingAlgorithm = new KeepPartAndCloneSolidObjectToNextPageAlgorithm(400);

                                                                                                                                                                              dataDir = dataDir + "PageSplittUsingKeepPartAndCloneSolidObjectToNextPageAlgorithm_out.pdf";
                                                                                                                                                                              doc.Save(dataDir);

When long OneNote pages are saved in pdf format they are split across pages. The example shows how to configure the splitting logic of objects located on page's breaks.```csharp
// 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

KeepPartAndCloneSolidObjectToNextPageAlgorithm()

Initializes a new instance of the Aspose.Note.Saving.KeepPartAndCloneSolidObjectToNextPageAlgorithm class, using default height limit of cloned part.

public KeepPartAndCloneSolidObjectToNextPageAlgorithm()

KeepPartAndCloneSolidObjectToNextPageAlgorithm(float)

Initializes a new instance of the Aspose.Note.Saving.KeepPartAndCloneSolidObjectToNextPageAlgorithm class, using specific height limit of cloned part.

public KeepPartAndCloneSolidObjectToNextPageAlgorithm(float heightLimitOfClonedPart)

Parameters

heightLimitOfClonedPart float

The max height of cloned part.

Fields

DefaultHeightLimitOfClonedPart

The default max size of cloned part.

public const float DefaultHeightLimitOfClonedPart = 200

Field Value

float

Properties

HeightLimitOfClonedPart

Gets the height limit of cloned part.

public float HeightLimitOfClonedPart { get; }

Property Value

float