Metadata and navigation

edit

Besides its pages, a document carries what describes it and what helps readers move in it. The members of PdfDocument read and write them, for a document you create as for a document you open:

ToUsePage
Give a title, an author, keywords, dates, a languageInformation, Language, the XMP metadataMetadata
Add bookmarksOutlinesOutline and links
Link to a page or a websitePdfPage.Annotations.AddLinkOutline and links
Attach files to the document or to a pageEmbeddedFiles, PdfPage.Annotations.AddFileAttachmentEmbedded files
Number the pages i, ii, iii, then 1, 2, 3PageLabelsPage labels
Add notes, highlights, shapes, ink, free texts and stampsPdfPage.Annotations.AddNote, AddTextMarkup, AddSquare, AddInk, ...Annotations
Read and change the annotations of a file, reply to themThe annotation classes, such as PdfLineAnnotationAnnotations
Draw the annotations into the content of the pagesFlattenAnnotationsAnnotations
Go to a page, open a URI or run a script on a click or an eventPdfAction, OpenAction, AdditionalActionsActions
Put content in layers the user can show or hideOptionalContentLayers
Choose the layout of the pages and the panels viewers showPageLayout, PageMode, ViewerPreferencesViewer preferences
Show the embedded files as a list with columnsCreatePortfolioPortfolios

The changes are written when the document is saved, by a full or an incremental save: see Modifying documents.

In this section

  • Metadata: the document information, the XMP metadata and the language.
  • Outline and links: bookmarks, destinations and link annotations.
  • Embedded files: attach files to a document or to a page, and read them back.
  • Page labels: the labels viewers show instead of the page numbers.
  • Annotations: notes, text markups, shapes, ink, free texts and stamps, the annotations of a file, replies and pop-ups, flattening, and the flags of the annotations.
  • Actions: what viewers do on a click, when the document or a page is opened, and on other events.
  • Layers: optional content groups and their configurations.
  • Viewer preferences: the page layout, the page mode, and the preferences of viewers and their print dialog.
  • Portfolios: show the embedded files as a list, with fields, sorted and in folders.