Class AlwaysSplitObjectsAlgorithm
Class AlwaysSplitObjectsAlgorithm
Namn på plats: Aspose.Note.Saving Sammanfattning: Aspose.Note.dll (25.4.0)
Uppdelar ett objekt i flera delar om det inte passar den ursprungliga sidan.
public class AlwaysSplitObjectsAlgorithm : PageSplittingAlgorithm
Inheritance
object ← PageSplittingAlgorithm ← AlwaysSplitObjectsAlgorithm
Arvsmedlemmar
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Examples
När långa OneNote-sidor sparas i pdf-format splittras de över sidor. exemplet visar hur man konfigurerar splittringslogiken för objekt som ligger på sidans avbrott.
// 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
AlwaysSplitObjectsAlgorithm()
public AlwaysSplitObjectsAlgorithm()