Class KeepSolidObjectsAlgorithm

Class KeepSolidObjectsAlgorithm

نام ها : Aspose.Note.Saving جمع آوری: WL31_.dll (25.4.0)

کل موضوع را به صفحه بعدی منتقل کنید در صورتی که در صفحه اصلی مناسب نباشد.

public class KeepSolidObjectsAlgorithm : PageSplittingAlgorithm

Inheritance

object PageSplittingAlgorithm KeepSolidObjectsAlgorithm

اعضای ارثی

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

Examples

نشان می دهد که چگونه برای ذخیره نوت بوک در فرمت PDF با گزینه های مشخص شده.

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

نشان می دهد چگونه برای ارسال یک سند به یک چاپگر با استفاده از دیالوگ استاندارد ویندوز با گزینه های مشخص شده.

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

هنگامی که صفحات طولانی OneNote در فرمت pdf ذخیره می شوند، آنها به صفحات تقسیم می شود.این مثال نشان می دهد که چگونه می توان منطق تقسیم اشیاء را در شکاف های صفحه تنظیم کرد.

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

یک مثال جدید از Aspose.Note.Saving.KeepSolidObjects کلاس الگوریتم با استفاده از حد ارتفاع پیش فرض از قطعه کلون شده آغاز می شود.

public KeepSolidObjectsAlgorithm()

KeepSolidObjectsAlgorithm(کشتی)

شروع یک مثال جدید از Aspose.Note.Saving.KeepSolidObjects کلاس الگوریتم با استفاده از محدودیت ارتفاع خاص از قطعه کلون شده.

public KeepSolidObjectsAlgorithm(float heightLimitOfClonedPart)

Parameters

heightLimitOfClonedPart float

حداکثر ارتفاع قطعه کلون شده

Fields

DefaultHeightLimitOfClonedPart

حداکثر اندازه قطعه کلون شده

public const float DefaultHeightLimitOfClonedPart = 200

ارزش میدان

float

Properties

HeightLimitOfClonedPart

محدودیت ارتفاع قسمت کلون شده را به دست می آورد.

public float HeightLimitOfClonedPart { get; }

ارزش املاک

float

 فارسی