Commit 4b674b42e4c1b9b470dd4ca8b84ac4db1d430055

Authored by Jay Berkenbilt
1 parent 225cd9da

Mention name tokens in TokenFilter comments

include/qpdf/QPDFObjectHandle.hh
... ... @@ -98,7 +98,13 @@ class QPDFObjectHandle
98 98 // for being written to output, or calling writeToken with a
99 99 // string token will also work. The correct way to construct a
100 100 // string token that would write the literal value (str) is
101   - // QPDFTokenizer::Token(QPDFTokenizer::tt_string, "str").
  101 + // QPDFTokenizer::Token(QPDFTokenizer::tt_string, "str"). A
  102 + // similar situation exists with tt_name. token.getValue() returns
  103 + // a normalized name with # codes resolved into characters, and
  104 + // may not be suitable for writing. You can pass it to
  105 + // QPDF_Name::normalizeName first, or you can use writeToken with
  106 + // a name token. The correct way to create a name token is
  107 + // QPDFTokenizer::Token(QPDFTokenizer::tt_name, "/Name").
102 108 class QPDF_DLL_CLASS TokenFilter
103 109 {
104 110 public:
... ...