Writes bookmarks (TOC) to an existing PDF file.
public void WriteBookmarks(
IList<PDFBookmark> bookmarks,
string destinationFileName
)
Public Sub WriteBookmarks( _
ByVal bookmarks As IList(Of PDFBookmark), _
ByVal destinationFileName As String _
)
public:
void WriteBookmarks(
IList<PDFBookmark>^ bookmarks,
String^ destinationFileName
)
bookmarks
A list of PDFBookmark objects to write. This must not be null and must be a list of 1 or more items. An empty list (count is zero) will throw an exception.
destinationFileName
Name of the destination PDF file to be created. If the value of this parameter is null then the filename set in FileName will be updated.
You can use WriteBookmarks method to create a Table of Contents (TOC) for a PDF file. For more information, refer to PDFBookmark.
You can create a bookmarks list from scratch and populate with the bookmarks required, or you can read the bookmarks of a PDF file using PDFDocument.ParseDocumentStructure with the PDFParseDocumentStructureOptions.Bookmarks included in the options parameter. Modify these bookmarks then write them back to the file.
WriteBookmarks does not clear the existing bookmarks, only adds the new objects. To replace the bookmarks in an existing file with new ones, use ClearBookmarks first to delete any existing objects and then WriteBookmarks to add the new objects.
Note that ClearBookmarks will delete all existing bookmarks and any internal links found in the document.
For an example, refer to PDFDocument.ParseDocumentStructure.
Products |
Support |
Feedback: WriteBookmarks Method - Leadtools.Pdf |
Introduction |
Help Version 19.0.2017.3.22
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.