goglhand.blogg.se

Gembox wings
Gembox wings





gembox wings gembox wings

For each TOC page, get its 'Annots' entry. If page was updated, it means that we passed TOC pages, so break from the loop. PageCloneMap.Add(pageIds, (PdfIndirectObject)kidsArray) Create a mapping from an ID of a empty (placeholder) page indirect object to an actual page indirect object.įor (int i = 0 i < kidsArray.Count ++i) * Update TOC links from placeholder pages to actual pages using GemBox.Pdf. Var pageIds = kidsArray.Cast().Select(obj => obj.Id).ToArray() Var kidsArray = (PdfArray)pagesDictionary Var pagesDictionary = (PdfDictionary)((PdfIndirectObject)rootDictionary).Value Var rootDictionary = (PdfDictionary)((PdfIndirectObject)pdfDocument.GetDictionary()).Value Var pdfDocument = PdfDocument.Load(pdfStream)

#GEMBOX WINGS PDF#

* Merge PDF files into PDF with TOC element using GemBox.Pdf. Update TOC element and save the document as PDF stream. (new Paragraph(tocDocument, new SpecialCharacter(tocDocument, SpecialCharacterType.PageBreak))) Source data for creating TOC entries with specified text and associated PDF files. However, this could be quite some work so perhaps it would be easier to just create the desired TOC element with GemBox.Document, save it as a PDF file, and then import it into the resulting PDF. Now one way would be to create text elements, outlines, and link annotations, position them appropriately, and set the link destinations to outlines. There is no such element in PDF files, so we need to create this content ourselves.







Gembox wings