Commit 4b674b42e4c1b9b470dd4ca8b84ac4db1d430055
1 parent
225cd9da
Mention name tokens in TokenFilter comments
Showing
1 changed file
with
7 additions
and
1 deletions
include/qpdf/QPDFObjectHandle.hh
| @@ -98,7 +98,13 @@ class QPDFObjectHandle | @@ -98,7 +98,13 @@ class QPDFObjectHandle | ||
| 98 | // for being written to output, or calling writeToken with a | 98 | // for being written to output, or calling writeToken with a |
| 99 | // string token will also work. The correct way to construct a | 99 | // string token will also work. The correct way to construct a |
| 100 | // string token that would write the literal value (str) is | 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 | class QPDF_DLL_CLASS TokenFilter | 108 | class QPDF_DLL_CLASS TokenFilter |
| 103 | { | 109 | { |
| 104 | public: | 110 | public: |