MergeOptions.InsertAsChild

MergeOptions.InsertAsChild property

挿入されたページを前のページの子として追加する必要があるかどうかを示す値を取得または設定します.

public bool InsertAsChild { get; set; }

すべての PDF ドキュメントのページをトップ レベルの OneNote ページの子として挿入しながら、一連の PDF ドキュメントからすべてのページをインポートする方法を示します。

string dataDir = RunExamples.GetDataDir_Import();

var d = new Document();

foreach (var file in new[] { "sampleText.pdf", "sampleImage.pdf", "sampleTable.pdf" })
{
    d.AppendChildLast(new Page()).Title = new Title() { TitleText = new RichText() { ParagraphStyle = ParagraphStyle.Default }.Append(file) };
    d.Import(Path.Combine(dataDir, file), new PdfImportOptions(), new MergeOptions() { InsertAt = int.MaxValue, InsertAsChild = true });
}

d.Save(Path.Combine(dataDir, "sample_StructuredMerge.one"));

関連項目