Class KeepSolidObjectsAlgorithm

Class KeepSolidObjectsAlgorithm

Tên không gian: Aspose.Note.Saving Tổng hợp: Aspose.Note.dll (25.4.0)

Chuyển đổi đối tượng đầy đủ sang trang tiếp theo nếu nó không phù hợp với trang ban đầu.

public class KeepSolidObjectsAlgorithm : PageSplittingAlgorithm

Inheritance

object PageSplittingAlgorithm KeepSolidObjectsAlgorithm

Thành viên thừa kế

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

Examples

Hiển thị cách lưu sổ tay trong định dạng PDF với các tùy chọn được chỉ định.

// 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);

Hiển thị cách gửi tài liệu đến một máy in bằng cách sử dụng đối thoại Windows tiêu chuẩn với các tùy chọn được chỉ định.

// 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"
                                                                                                                       });

Khi các trang dài của OneNote được lưu trữ trong định dạng pdf, chúng được chia thành mỗi trang. ví dụ này cho thấy cách thiết lập logic chia của các đối tượng nằm trên các khoảng trống của trang .

// 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()

Bắt đầu một trường hợp mới của lớp Aspose.Note.Saving.KeepSolidObjectsAlgorithm bằng cách sử dụng giới hạn chiều cao mặc định của bộ phận được clon.

public KeepSolidObjectsAlgorithm()

KeepSolidObjectsAlgorithm(Sông)

Bắt đầu một trường hợp mới của lớp Aspose.Note.Saving.KeepSolidObjectsAlgorithm bằng cách sử dụng giới hạn chiều cao cụ thể của các bộ phận được clon.

public KeepSolidObjectsAlgorithm(float heightLimitOfClonedPart)

Parameters

heightLimitOfClonedPart float

Độ cao tối đa của phần clone.

Fields

DefaultHeightLimitOfClonedPart

Kích thước mặc định max của phần clone.

public const float DefaultHeightLimitOfClonedPart = 200

Giá trị Field

float

Properties

HeightLimitOfClonedPart

Nó nhận được giới hạn chiều cao của phần clone.

public float HeightLimitOfClonedPart { get; }

Giá trị bất động sản

float

 Tiếng Việt