Class PdfImporter

Class PdfImporter

Numele spaţiului: Aspose.Note.Importing Asamblare: Aspose.Note.dll (25.4.0)

Clasa care oferă API pentru a importa conținut din documente în format PDF.API vă permite să importați din documentul PDF situat fie într-un fișier, fie în flux, folosind opțiuni specificate.Opțiunile de import sunt depuse folosind Aspose.Note.Importing.PdfImortOptions.

public static class PdfImporter

Inheritance

object PdfImporter

Membrii moștenitori

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

Examples

Află cum să importați toate paginile din documentul PDF grupând fiecare 5 pagini într-o singură pagină 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(Cuvânt cheie, PdfImportOptions)

Importă conținutul documentului PDF dintr-un flux furnizat.

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

Parameters

stream Stream

şi fluxul .

options PdfImportOptions

ale opţiunilor .

Returns

List < Page >

Cuvânt cheie Aspose.Note.Importing.PdfImporter.

Import(Cuvânt cheie, PdfImportOptions)

Importă conținutul documentului PDF dintr-un fișier specificat.

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

Parameters

file string

Fișierul PDF.

options PdfImportOptions

ale opţiunilor .

Returns

List < Page >

Cuvânt cheie Aspose.Note.Importing.PdfImporter.

Examples

Află cum să importați toate paginile din documentul PDF grupând fiecare 5 pagini într-o singură pagină 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>

 Română