summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-10-29 11:22:06 +0100
committerLaurenz <laurmaedje@gmail.com>2023-10-29 11:22:06 +0100
commit987e97cc2c01f44c41610d510eeaa8b115f7b04f (patch)
treec966746be92673728255b3adaef401b18cdd2c1e
parent500468fd05a6aa893c534344f85dcffb551dec5d (diff)
Clarify how `ident` is used in PDF export
-rw-r--r--crates/typst/src/export/pdf/mod.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/crates/typst/src/export/pdf/mod.rs b/crates/typst/src/export/pdf/mod.rs
index d18023cf..91fce588 100644
--- a/crates/typst/src/export/pdf/mod.rs
+++ b/crates/typst/src/export/pdf/mod.rs
@@ -39,14 +39,15 @@ use extg::ExtGState;
/// Returns the raw bytes making up the PDF file.
///
/// The `ident` parameter shall be a string that uniquely and stably identifies
-/// the document. It is used to write a PDF file identifier. It should not
-/// change between compilations of the same document. If it is `None`, a hash of
-/// the document is used instead (which means that it _will_ change across
+/// the document. It should not change between compilations of the same
+/// document. Its hash will be used to create a PDF document identifier (the
+/// identifier itself is not leaked). If `ident` is `None`, a hash of the
+/// document is used instead (which means that it _will_ change across
/// compilations).
///
/// The `timestamp`, if given, is expected to be the creation date of the
-/// document as a UTC datetime. It will be used as the PDFs creation date unless
-/// another date is given through `set document(date: ..)`.
+/// document as a UTC datetime. It will only be used if `set document(date: ..)`
+/// is `auto`.
#[tracing::instrument(skip_all)]
pub fn pdf(
document: &Document,