Class KeepSolidObjectsAlgorithm

Class KeepSolidObjectsAlgorithm

Nome do espaço: Aspose.Note.Saving Assembleia: Aspose.Note.dll (25.4.0)

Mude o objeto inteiro para a próxima página se não for adequado na página original.

public class KeepSolidObjectsAlgorithm : PageSplittingAlgorithm

Inheritance

object PageSplittingAlgorithm KeepSolidObjectsAlgorithm

Membros herdados

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

Examples

Mostra como salvar um notebook em formato PDF com opções 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 como enviar um documento para uma impressora usando o diálogo padrão do Windows com opções 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"
                                                                                                                       });

Quando longas páginas do OneNote são salvas em formato pdf, elas são divididas por páginas.O exemplo mostra como configurar a lógica de divisão dos objetos localizados nas pausas da 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 uma nova instância do Aspose.Note.Saving.KeepSolidObjectsClasse de algoritmo usando o limite de altura padrão da parte clonada.

public KeepSolidObjectsAlgorithm()

KeepSolidObjectsAlgorithm(Flotação)

Inicia uma nova instância do Aspose.Note.Saving.KeepSolidObjectsClasse de algoritmo usando um limite de altura específico da parte clonada.

public KeepSolidObjectsAlgorithm(float heightLimitOfClonedPart)

Parameters

heightLimitOfClonedPart float

A altura máxima da parte clonada.

Fields

DefaultHeightLimitOfClonedPart

O tamanho padrão max da parte clonada.

public const float DefaultHeightLimitOfClonedPart = 200

Valor de campo

float

Properties

HeightLimitOfClonedPart

Obter o limite de altura da parte clonada.

public float HeightLimitOfClonedPart { get; }

Valor da propriedade

float

 Português