PdfDocumentProperties class
Reading and writing of the document-level properties: metadata, navigation and viewer preferences.
Works both on a new document and on a loaded one. On a loaded one, what still lives in the original bytes is read through the parser; what is changed enters the incremental update, without touching the rest of the file.
Does not touch /Names /Dests: the named destination tree belongs to the
PdfNames model, which rewrites it on save.
Constructors
- PdfDocumentProperties(PdfDocument document)
Properties
- document → PdfDocument
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- language ↔ String?
-
Declared document language (
/Lang).getter/setter pair - openAtPageIndex → int?
-
Index of the page the document opens at, when the destination is
explicit.
no setter
- pageLayout ↔ PdfPageLayout?
-
Page arrangement (
/PageLayout).getter/setter pair - pageMode ↔ PdfPageMode?
-
Open mode (
/PageMode).getter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clearOpenAction(
) → void - Removes the open action.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
openAt(
PdfPage page, {PdfOpenActionView view = PdfOpenActionView.fit, double? left, double? top, double? zoom}) → void -
Makes the document open at
page, with the chosen view. -
readInfo(
) → Map< String, String> -
Metadata from the document
/Info, when there is any. -
readXmp(
) → String? -
Document XMP (
/Metadata), as text, when there is any. -
setInfo(
{String? title, String? author, String? creator, String? subject, String? keywords, String? producer}) → void -
Writes the
/Info, preserving whatever is not given. -
setViewerPreference(
String key, bool? value) → void - Sets a boolean viewer preference.
-
toString(
) → String -
A string representation of this object.
inherited
-
viewerPreference(
String key) → bool? -
Boolean
/ViewerPreferences, by key name.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited