string
static void Main(string[] args) { String InputPdf = @"test.pdf"; String OutputPdf = "out.pdf"; PdfDocument pdfDoc = new PdfDocument(new PdfReader(InputPdf), new PdfWriter(OutputPdf)); PdfOutline outlines = pdfDoc.GetOutlines(false); // first level foreach (var outline in outlines.GetAllChildren()) { // second level foreach (var second in outline.GetAllChildren()) { String title = second.GetTitle(); PdfDestination dest = second.GetDestination(); pdfDoc.AddNamedDestination(title, dest.GetPdfObject()); } } pdfDoc.Close(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)