docinfo {xmpdf} | R Documentation |
PDF documentation info dictionary object
Description
docinfo()
creates a PDF documentation info dictionary object.
Such objects can be used with set_docinfo()
to edit PDF documentation info dictionary entries
and such objects are returned by get_docinfo()
.
Usage
docinfo(
author = NULL,
creation_date = NULL,
creator = NULL,
producer = NULL,
title = NULL,
subject = NULL,
keywords = NULL,
mod_date = NULL
)
Arguments
author |
The document's author. Matching xmp metadata tag is |
creation_date |
The date the document was created.
Will be coerced by |
creator |
The name of the application that originally created the document (if converted to pdf).
Matching xmp metadata tag is |
producer |
The name of the application that converted the document to pdf.
Matching xmp metadata tag is |
title |
The document's title. Matching xmp metadata tag is |
subject |
The document's subject. Matching xmp metadata tag is |
keywords |
Keywords for this document (for cross-document searching).
Matching xmp metadata tag is |
mod_date |
The date the document was last modified.
Will be coerced by |
Known limitations
Currently does not support arbitrary info dictionary entries.
docinfo
R6 Class Methods
get_item(key)
Get documentation info value for key
key
. Can also use the relevant active bindings to get documentation info values.set_item(key, value)
Set documentation info key
key
with valuevalue
. Can also use the relevant active bindings to set documentation info values.update(x)
Update documentation info key entries using non-
NULL
entries in objectx
coerced byas_docinfo()
.
docinfo
R6 Active Bindings
author
The document's author.
creation_date
The date the document was created.
creator
The name of the application that originally created the document (if converted to pdf).
producer
The name of the application that converted the document to pdf.
title
The document's title.
subject
The document's subject.
keywords
Keywords for this document (for cross-document searching).
mod_date
The date the document was last modified.
See Also
get_docinfo()
and set_docinfo()
for getting/setting such information from/to PDF files.
as_docinfo()
for coercing to this object.
as_xmp()
can be used to coerce docinfo()
objects into xmp()
objects.
Examples
if (supports_set_docinfo() && supports_get_docinfo() && require("grid", quietly = TRUE)) {
f <- tempfile(fileext = ".pdf")
pdf(f, onefile = TRUE)
grid.text("Page 1")
grid.newpage()
grid.text("Page 2")
invisible(dev.off())
cat("\nInitial documentation info\n")
d <- get_docinfo(f)[[1]]
print(d)
d <- update(d,
author = "John Doe",
title = "Two Boring Pages",
keywords = "R, xmpdf")
set_docinfo(d, f)
cat("\nDocumentation info after setting it\n")
print(get_docinfo(f)[[1]])
unlink(f)
}