Class PdfImporter

Class PdfImporter

Il nome: Aspose.Note.Importing Assemblea: Aspose.Note.dll (25.4.0)

La classe fornisce API per importare contenuti da documenti in formato PDF.L’API consente di importare dal documento PDF situato sia in un file che in uno strumento utilizzando le opzioni specificate.Le opzioni di importazione vengono passate utilizzando Aspose.Note.Importing.PdfImporteOptions.

public static class PdfImporter

Inheritance

object PdfImporter

I membri ereditari

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

Examples

Visualizza come importare tutte le pagine dal documento PDF, gruppiando ogni 5 Pagine a una sola pagina OneNote.

string dataDir = RunExamples.GetDataDir_Import();

                                                                                                           var d = new Document();

                                                                                                           var mergeOptions = new MergeOptions() { ImportAsSinglePage = true, PageSpacing = 100 };

                                                                                                           IEnumerable<page> pages = PdfImporter.Import(Path.Combine(dataDir, "SampleGrouping.pdf"));
                                                                                                           while (pages.Any())
                                                                                                           {
                                                                                                               d.Merge(pages.Take(5), mergeOptions);
                                                                                                               pages = pages.Skip(5);
                                                                                                           }

                                                                                                           d.Save(Path.Combine(dataDir, "sample_CustomMerge.one"));</page>

Methods

Import(Strumento, PdfImportOptions)

Importare il contenuto del documento PDF da un flusso fornito.

public static List<page> Import(Stream stream, PdfImportOptions options = null)

Parameters

stream Stream

Il flusso .

options PdfImportOptions

Le opzioni .

Returns

List di < Page >

Il Aspose.Note.Importare.PdfImporter.

Import(String, PdfImportOptions)

Importare il contenuto del documento PDF da un file specifico.

public static List<page> Import(string file, PdfImportOptions options = null)

Parameters

file string

Il file PDF.

options PdfImportOptions

Le opzioni .

Returns

List di < Page >

Il Aspose.Note.Importare.PdfImporter.

Examples

Visualizza come importare tutte le pagine dal documento PDF, gruppiando ogni 5 Pagine a una sola pagina OneNote.

string dataDir = RunExamples.GetDataDir_Import();

                                                                                                           var d = new Document();

                                                                                                           var mergeOptions = new MergeOptions() { ImportAsSinglePage = true, PageSpacing = 100 };

                                                                                                           IEnumerable<page> pages = PdfImporter.Import(Path.Combine(dataDir, "SampleGrouping.pdf"));
                                                                                                           while (pages.Any())
                                                                                                           {
                                                                                                               d.Merge(pages.Take(5), mergeOptions);
                                                                                                               pages = pages.Skip(5);
                                                                                                           }

                                                                                                           d.Save(Path.Combine(dataDir, "sample_CustomMerge.one"));</page>

 Italiano