Class PdfImporter

Class PdfImporter

名称: Aspose.Note.Importing 集合: Aspose.Note.dll (25.4.0)

该类提供API以 PDF 格式从文档中进口内容。API 允许从 PDF 文档中进口,无论是在文件中还是在流中,使用指定的选项。进口选项通过使用 Aspose.Note.Importing.PdfIMportOptions。

public static class PdfImporter

Inheritance

object PdfImporter

继承人

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

Examples

显示如何从 PDF 文档组合每 5 页的所有页面进口到 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(流,PdfImportOptions)

从提供的流中导入PDF文档的内容。

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

Parameters

stream Stream

流的。

options PdfImportOptions

选项的。

Returns

List < Page >

此分類上一篇: WL31_.Importing.PdfImporter

Import(字符串, PdfImportOptions)

从特定文件中导入 PDF 文档的内容。

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

Parameters

file string

PDF文件。

options PdfImportOptions

选项的。

Returns

List < Page >

此分類上一篇: WL31_.Importing.PdfImporter

Examples

显示如何从 PDF 文档组合每 5 页的所有页面进口到 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>

 中文