aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2019-08-20 00:34:14 +0200
committerJay Berkenbilt <ejb@ql.org>2019-08-20 01:48:27 +0200
commit43f91f58b8e1be986646129c2fb3229de67ba42f (patch)
tree2caa26865659fbc9b9b56d16da37bb5ad4dac740
parent42d396f1dd8d38294e45b14021cd72c13850a53b (diff)
downloadqpdf-43f91f58b8e1be986646129c2fb3229de67ba42f.tar.zst
Improve invalid name token warning message
This message used to only appear for PDF >= 1.2. The invalid name is valid for PDF 1.0 and 1.1. However, since QPDFWriter may write a newer version, it's better to detect and warn in all cases. Therefore make the warning more informative.
-rw-r--r--libqpdf/QPDFTokenizer.cc3
-rw-r--r--qpdf/qtest/qpdf/bad21-recover.out2
-rw-r--r--qpdf/qtest/qpdf/bad21.out2
-rw-r--r--qpdf/qtest/qpdf/issue-335a.out128
-rw-r--r--qpdf/qtest/qpdf/name-pound-images-qdf.out4
-rw-r--r--qpdf/qtest/qpdf/name-pound-images.out8
-rw-r--r--qpdf/qtest/qpdf/pound-in-name-qdf.out14
-rw-r--r--qpdf/qtest/qpdf/pound-in-name.outbin597 -> 800 bytes
-rw-r--r--qpdf/qtest/qpdf/tokens-maxlen.out2
-rw-r--r--qpdf/qtest/qpdf/tokens-no-ignorable.out2
-rw-r--r--qpdf/qtest/qpdf/tokens.out2
11 files changed, 84 insertions, 83 deletions
diff --git a/libqpdf/QPDFTokenizer.cc b/libqpdf/QPDFTokenizer.cc
index 18af12e0..207d62d8 100644
--- a/libqpdf/QPDFTokenizer.cc
+++ b/libqpdf/QPDFTokenizer.cc
@@ -193,7 +193,8 @@ QPDFTokenizer::resolveLiteral()
else
{
QTC::TC("qpdf", "QPDFTokenizer bad name");
- this->m->error_message = "invalid name token";
+ this->m->error_message =
+ "name with stray # will not work with PDF >= 1.2";
// Use null to encode a bad # -- this is reversed
// in QPDF_Name::normalizeName.
nval += '\0';
diff --git a/qpdf/qtest/qpdf/bad21-recover.out b/qpdf/qtest/qpdf/bad21-recover.out
index c632da9d..c0d87e43 100644
--- a/qpdf/qtest/qpdf/bad21-recover.out
+++ b/qpdf/qtest/qpdf/bad21-recover.out
@@ -1,4 +1,4 @@
-WARNING: bad21.pdf (trailer, offset 742): invalid name token
+WARNING: bad21.pdf (trailer, offset 742): name with stray # will not work with PDF >= 1.2
/QTest is implicit
/QTest is direct and has type null (2)
/QTest is null
diff --git a/qpdf/qtest/qpdf/bad21.out b/qpdf/qtest/qpdf/bad21.out
index 005bd60a..c14e96fd 100644
--- a/qpdf/qtest/qpdf/bad21.out
+++ b/qpdf/qtest/qpdf/bad21.out
@@ -1,4 +1,4 @@
-WARNING: bad21.pdf (trailer, offset 742): invalid name token
+WARNING: bad21.pdf (trailer, offset 742): name with stray # will not work with PDF >= 1.2
/QTest is implicit
/QTest is direct and has type null (2)
/QTest is null
diff --git a/qpdf/qtest/qpdf/issue-335a.out b/qpdf/qtest/qpdf/issue-335a.out
index c2d86e58..19172a04 100644
--- a/qpdf/qtest/qpdf/issue-335a.out
+++ b/qpdf/qtest/qpdf/issue-335a.out
@@ -13,7 +13,7 @@ WARNING: issue-335a.pdf (trailer, offset 44): unknown token while reading object
WARNING: issue-335a.pdf (trailer, offset 61): unknown token while reading object; treating as string
WARNING: issue-335a.pdf (trailer, offset 62): unexpected )
WARNING: issue-335a.pdf (trailer, offset 63): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 64): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 64): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 67): unexpected )
WARNING: issue-335a.pdf (trailer, offset 68): unexpected )
WARNING: issue-335a.pdf (trailer, offset 68): too many errors; giving up on reading object
@@ -22,14 +22,14 @@ WARNING: issue-335a.pdf (trailer, offset 60): unexpected )
WARNING: issue-335a.pdf (trailer, offset 61): unknown token while reading object; treating as string
WARNING: issue-335a.pdf (trailer, offset 62): unexpected )
WARNING: issue-335a.pdf (trailer, offset 63): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 64): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 64): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 67): unexpected )
WARNING: issue-335a.pdf (trailer, offset 67): too many errors; giving up on reading object
WARNING: issue-335a.pdf (trailer, offset 96): unknown token while reading object; treating as string
WARNING: issue-335a.pdf (trailer, offset 113): unknown token while reading object; treating as string
WARNING: issue-335a.pdf (trailer, offset 114): unexpected )
WARNING: issue-335a.pdf (trailer, offset 115): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 116): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 116): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 119): unexpected )
WARNING: issue-335a.pdf (trailer, offset 120): unexpected )
WARNING: issue-335a.pdf (trailer, offset 120): too many errors; giving up on reading object
@@ -38,45 +38,45 @@ WARNING: issue-335a.pdf (trailer, offset 112): unexpected )
WARNING: issue-335a.pdf (trailer, offset 113): unknown token while reading object; treating as string
WARNING: issue-335a.pdf (trailer, offset 114): unexpected )
WARNING: issue-335a.pdf (trailer, offset 115): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 116): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 116): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 119): unexpected )
WARNING: issue-335a.pdf (trailer, offset 119): too many errors; giving up on reading object
WARNING: issue-335a.pdf (trailer, offset 134): unknown token while reading object; treating as string
WARNING: issue-335a.pdf (trailer, offset 150): unexpected )
WARNING: issue-335a.pdf (trailer, offset 280): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 281): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 281): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 284): unexpected )
WARNING: issue-335a.pdf (trailer, offset 285): unexpected )
WARNING: issue-335a.pdf (trailer, offset 563): unexpected )
WARNING: issue-335a.pdf (trailer, offset 596): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 597): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 597): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 600): unexpected )
WARNING: issue-335a.pdf (trailer, offset 601): unexpected )
WARNING: issue-335a.pdf (trailer, offset 648): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 649): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 649): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 652): unexpected )
WARNING: issue-335a.pdf (trailer, offset 652): too many errors; giving up on reading object
WARNING: issue-335a.pdf (trailer, offset 148): treating unexpected brace token as null
WARNING: issue-335a.pdf (trailer, offset 149): unexpected )
WARNING: issue-335a.pdf (trailer, offset 150): unexpected )
WARNING: issue-335a.pdf (trailer, offset 280): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 281): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 281): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 284): unexpected )
WARNING: issue-335a.pdf (trailer, offset 285): unexpected )
WARNING: issue-335a.pdf (trailer, offset 285): too many errors; giving up on reading object
WARNING: issue-335a.pdf (trailer, offset 164): unknown token while reading object; treating as string
WARNING: issue-335a.pdf (trailer, offset 217): unexpected )
WARNING: issue-335a.pdf (trailer, offset 280): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 281): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 281): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 284): unexpected )
WARNING: issue-335a.pdf (trailer, offset 285): unexpected )
WARNING: issue-335a.pdf (trailer, offset 563): unexpected )
WARNING: issue-335a.pdf (trailer, offset 596): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 597): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 597): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 600): unexpected )
WARNING: issue-335a.pdf (trailer, offset 601): unexpected )
WARNING: issue-335a.pdf (trailer, offset 648): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 649): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 649): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 652): unexpected )
WARNING: issue-335a.pdf (trailer, offset 652): too many errors; giving up on reading object
WARNING: issue-335a.pdf (trailer, offset 178): invalid character (<) in hexstring
@@ -90,23 +90,23 @@ WARNING: issue-335a.pdf (trailer, offset 217): too many errors; giving up on rea
WARNING: issue-335a.pdf (trailer, offset 231): unknown token while reading object; treating as string
WARNING: issue-335a.pdf (trailer, offset 247): unexpected )
WARNING: issue-335a.pdf (trailer, offset 280): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 281): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 281): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 284): unexpected )
WARNING: issue-335a.pdf (trailer, offset 285): unexpected )
WARNING: issue-335a.pdf (trailer, offset 563): unexpected )
WARNING: issue-335a.pdf (trailer, offset 596): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 597): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 597): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 600): unexpected )
WARNING: issue-335a.pdf (trailer, offset 601): unexpected )
WARNING: issue-335a.pdf (trailer, offset 648): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 649): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 649): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 652): unexpected )
WARNING: issue-335a.pdf (trailer, offset 652): too many errors; giving up on reading object
WARNING: issue-335a.pdf (trailer, offset 245): treating unexpected brace token as null
WARNING: issue-335a.pdf (trailer, offset 246): unexpected )
WARNING: issue-335a.pdf (trailer, offset 247): unexpected )
WARNING: issue-335a.pdf (trailer, offset 280): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 281): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 281): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 284): unexpected )
WARNING: issue-335a.pdf (trailer, offset 285): unexpected )
WARNING: issue-335a.pdf (trailer, offset 285): too many errors; giving up on reading object
@@ -114,7 +114,7 @@ WARNING: issue-335a.pdf (trailer, offset 261): unknown token while reading objec
WARNING: issue-335a.pdf (trailer, offset 278): unknown token while reading object; treating as string
WARNING: issue-335a.pdf (trailer, offset 279): unexpected )
WARNING: issue-335a.pdf (trailer, offset 280): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 281): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 281): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 284): unexpected )
WARNING: issue-335a.pdf (trailer, offset 285): unexpected )
WARNING: issue-335a.pdf (trailer, offset 285): too many errors; giving up on reading object
@@ -123,18 +123,18 @@ WARNING: issue-335a.pdf (trailer, offset 277): unexpected )
WARNING: issue-335a.pdf (trailer, offset 278): unknown token while reading object; treating as string
WARNING: issue-335a.pdf (trailer, offset 279): unexpected )
WARNING: issue-335a.pdf (trailer, offset 280): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 281): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 281): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 284): unexpected )
WARNING: issue-335a.pdf (trailer, offset 284): too many errors; giving up on reading object
WARNING: issue-335a.pdf (trailer, offset 299): unknown token while reading object; treating as string
WARNING: issue-335a.pdf (trailer, offset 315): unexpected )
WARNING: issue-335a.pdf (trailer, offset 563): unexpected )
WARNING: issue-335a.pdf (trailer, offset 596): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 597): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 597): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 600): unexpected )
WARNING: issue-335a.pdf (trailer, offset 601): unexpected )
WARNING: issue-335a.pdf (trailer, offset 648): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 649): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 649): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 652): unexpected )
WARNING: issue-335a.pdf (trailer, offset 652): too many errors; giving up on reading object
WARNING: issue-335a.pdf (trailer, offset 313): treating unexpected brace token as null
@@ -142,22 +142,22 @@ WARNING: issue-335a.pdf (trailer, offset 314): unexpected )
WARNING: issue-335a.pdf (trailer, offset 315): unexpected )
WARNING: issue-335a.pdf (trailer, offset 563): unexpected )
WARNING: issue-335a.pdf (trailer, offset 596): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 597): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 597): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 600): unexpected )
WARNING: issue-335a.pdf (trailer, offset 601): unexpected )
WARNING: issue-335a.pdf (trailer, offset 648): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 649): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 649): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 652): unexpected )
WARNING: issue-335a.pdf (trailer, offset 652): too many errors; giving up on reading object
WARNING: issue-335a.pdf (trailer, offset 329): unknown token while reading object; treating as string
WARNING: issue-335a.pdf (trailer, offset 403): unexpected )
WARNING: issue-335a.pdf (trailer, offset 563): unexpected )
WARNING: issue-335a.pdf (trailer, offset 596): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 597): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 597): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 600): unexpected )
WARNING: issue-335a.pdf (trailer, offset 601): unexpected )
WARNING: issue-335a.pdf (trailer, offset 648): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 649): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 649): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 652): unexpected )
WARNING: issue-335a.pdf (trailer, offset 652): too many errors; giving up on reading object
WARNING: issue-335a.pdf (trailer, offset 361): unknown token while reading object; treating as string
@@ -167,11 +167,11 @@ WARNING: issue-335a.pdf (trailer, offset 381): unexpected )
WARNING: issue-335a.pdf (trailer, offset 403): unexpected )
WARNING: issue-335a.pdf (trailer, offset 563): unexpected )
WARNING: issue-335a.pdf (trailer, offset 596): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 597): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 597): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 600): unexpected )
WARNING: issue-335a.pdf (trailer, offset 601): unexpected )
WARNING: issue-335a.pdf (trailer, offset 648): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 649): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 649): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 652): unexpected )
WARNING: issue-335a.pdf (trailer, offset 652): too many errors; giving up on reading object
WARNING: issue-335a.pdf (trailer, offset 377): treating unexpected brace token as null
@@ -187,18 +187,18 @@ WARNING: issue-335a.pdf (trailer, offset 402): unexpected )
WARNING: issue-335a.pdf (trailer, offset 403): unexpected )
WARNING: issue-335a.pdf (trailer, offset 563): unexpected )
WARNING: issue-335a.pdf (trailer, offset 596): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 597): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 597): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 600): unexpected )
WARNING: issue-335a.pdf (trailer, offset 601): unexpected )
WARNING: issue-335a.pdf (trailer, offset 648): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 649): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 649): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 652): unexpected )
WARNING: issue-335a.pdf (trailer, offset 652): too many errors; giving up on reading object
WARNING: issue-335a.pdf (trailer, offset 417): unknown token while reading object; treating as string
WARNING: issue-335a.pdf (trailer, offset 433): unexpected )
WARNING: issue-335a.pdf (trailer, offset 563): unexpected )
WARNING: issue-335a.pdf (trailer, offset 596): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 597): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 597): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 600): unexpected )
WARNING: issue-335a.pdf (trailer, offset 601): unexpected )
WARNING: issue-335a.pdf (trailer, offset 601): too many errors; giving up on reading object
@@ -207,7 +207,7 @@ WARNING: issue-335a.pdf (trailer, offset 432): unexpected )
WARNING: issue-335a.pdf (trailer, offset 433): unexpected )
WARNING: issue-335a.pdf (trailer, offset 563): unexpected )
WARNING: issue-335a.pdf (trailer, offset 596): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 597): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 597): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 600): unexpected )
WARNING: issue-335a.pdf (trailer, offset 600): too many errors; giving up on reading object
WARNING: issue-335a.pdf (trailer, offset 447): unknown token while reading object; treating as string
@@ -236,7 +236,7 @@ WARNING: issue-335a.pdf (trailer, offset 513): unknown token while reading objec
WARNING: issue-335a.pdf (trailer, offset 529): unexpected )
WARNING: issue-335a.pdf (trailer, offset 563): unexpected )
WARNING: issue-335a.pdf (trailer, offset 596): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 597): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 597): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 600): unexpected )
WARNING: issue-335a.pdf (trailer, offset 601): unexpected )
WARNING: issue-335a.pdf (trailer, offset 601): too many errors; giving up on reading object
@@ -245,7 +245,7 @@ WARNING: issue-335a.pdf (trailer, offset 528): unexpected )
WARNING: issue-335a.pdf (trailer, offset 529): unexpected )
WARNING: issue-335a.pdf (trailer, offset 563): unexpected )
WARNING: issue-335a.pdf (trailer, offset 596): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 597): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 597): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 600): unexpected )
WARNING: issue-335a.pdf (trailer, offset 600): too many errors; giving up on reading object
WARNING: issue-335a.pdf (trailer, offset 543): unknown token while reading object; treating as string
@@ -253,7 +253,7 @@ WARNING: issue-335a.pdf (trailer, offset 561): unknown token while reading objec
WARNING: issue-335a.pdf (trailer, offset 562): unexpected )
WARNING: issue-335a.pdf (trailer, offset 563): unexpected )
WARNING: issue-335a.pdf (trailer, offset 596): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 597): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 597): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 600): unexpected )
WARNING: issue-335a.pdf (trailer, offset 600): too many errors; giving up on reading object
WARNING: issue-335a.pdf (trailer, offset 559): treating unexpected brace token as null
@@ -267,7 +267,7 @@ WARNING: issue-335a.pdf (trailer, offset 577): unknown token while reading objec
WARNING: issue-335a.pdf (trailer, offset 594): unknown token while reading object; treating as string
WARNING: issue-335a.pdf (trailer, offset 595): unexpected )
WARNING: issue-335a.pdf (trailer, offset 596): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 597): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 597): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 600): unexpected )
WARNING: issue-335a.pdf (trailer, offset 601): unexpected )
WARNING: issue-335a.pdf (trailer, offset 601): too many errors; giving up on reading object
@@ -276,14 +276,14 @@ WARNING: issue-335a.pdf (trailer, offset 593): unexpected )
WARNING: issue-335a.pdf (trailer, offset 594): unknown token while reading object; treating as string
WARNING: issue-335a.pdf (trailer, offset 595): unexpected )
WARNING: issue-335a.pdf (trailer, offset 596): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 597): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 597): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 600): unexpected )
WARNING: issue-335a.pdf (trailer, offset 600): too many errors; giving up on reading object
WARNING: issue-335a.pdf (trailer, offset 629): unknown token while reading object; treating as string
WARNING: issue-335a.pdf (trailer, offset 646): unknown token while reading object; treating as string
WARNING: issue-335a.pdf (trailer, offset 647): unexpected )
WARNING: issue-335a.pdf (trailer, offset 648): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 649): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 649): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 652): unexpected )
WARNING: issue-335a.pdf (trailer, offset 653): unexpected )
WARNING: issue-335a.pdf (trailer, offset 653): too many errors; giving up on reading object
@@ -292,13 +292,13 @@ WARNING: issue-335a.pdf (trailer, offset 645): unexpected )
WARNING: issue-335a.pdf (trailer, offset 646): unknown token while reading object; treating as string
WARNING: issue-335a.pdf (trailer, offset 647): unexpected )
WARNING: issue-335a.pdf (trailer, offset 648): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 649): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 649): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 652): unexpected )
WARNING: issue-335a.pdf (trailer, offset 652): too many errors; giving up on reading object
WARNING: issue-335a.pdf (trailer, offset 667): unknown token while reading object; treating as string
WARNING: issue-335a.pdf (trailer, offset 683): unexpected )
WARNING: issue-335a.pdf (trailer, offset 821): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 822): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 822): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 825): unexpected )
WARNING: issue-335a.pdf (trailer, offset 826): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1019): unexpected )
@@ -307,14 +307,14 @@ WARNING: issue-335a.pdf (trailer, offset 681): treating unexpected brace token a
WARNING: issue-335a.pdf (trailer, offset 682): unexpected )
WARNING: issue-335a.pdf (trailer, offset 683): unexpected )
WARNING: issue-335a.pdf (trailer, offset 821): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 822): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 822): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 825): unexpected )
WARNING: issue-335a.pdf (trailer, offset 826): unexpected )
WARNING: issue-335a.pdf (trailer, offset 826): too many errors; giving up on reading object
WARNING: issue-335a.pdf (trailer, offset 697): unknown token while reading object; treating as string
WARNING: issue-335a.pdf (trailer, offset 758): unexpected )
WARNING: issue-335a.pdf (trailer, offset 821): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 822): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 822): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 825): unexpected )
WARNING: issue-335a.pdf (trailer, offset 826): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1019): unexpected )
@@ -330,7 +330,7 @@ WARNING: issue-335a.pdf (trailer, offset 758): too many errors; giving up on rea
WARNING: issue-335a.pdf (trailer, offset 772): unknown token while reading object; treating as string
WARNING: issue-335a.pdf (trailer, offset 788): unexpected )
WARNING: issue-335a.pdf (trailer, offset 821): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 822): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 822): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 825): unexpected )
WARNING: issue-335a.pdf (trailer, offset 826): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1019): unexpected )
@@ -339,7 +339,7 @@ WARNING: issue-335a.pdf (trailer, offset 786): treating unexpected brace token a
WARNING: issue-335a.pdf (trailer, offset 787): unexpected )
WARNING: issue-335a.pdf (trailer, offset 788): unexpected )
WARNING: issue-335a.pdf (trailer, offset 821): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 822): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 822): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 825): unexpected )
WARNING: issue-335a.pdf (trailer, offset 826): unexpected )
WARNING: issue-335a.pdf (trailer, offset 826): too many errors; giving up on reading object
@@ -347,7 +347,7 @@ WARNING: issue-335a.pdf (trailer, offset 802): unknown token while reading objec
WARNING: issue-335a.pdf (trailer, offset 819): unknown token while reading object; treating as string
WARNING: issue-335a.pdf (trailer, offset 820): unexpected )
WARNING: issue-335a.pdf (trailer, offset 821): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 822): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 822): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 825): unexpected )
WARNING: issue-335a.pdf (trailer, offset 826): unexpected )
WARNING: issue-335a.pdf (trailer, offset 826): too many errors; giving up on reading object
@@ -356,14 +356,14 @@ WARNING: issue-335a.pdf (trailer, offset 818): unexpected )
WARNING: issue-335a.pdf (trailer, offset 819): unknown token while reading object; treating as string
WARNING: issue-335a.pdf (trailer, offset 820): unexpected )
WARNING: issue-335a.pdf (trailer, offset 821): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 822): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 822): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 825): unexpected )
WARNING: issue-335a.pdf (trailer, offset 825): too many errors; giving up on reading object
WARNING: issue-335a.pdf (trailer, offset 840): unknown token while reading object; treating as string
WARNING: issue-335a.pdf (trailer, offset 856): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1019): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1163): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 1164): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 1164): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 1167): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1168): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1168): too many errors; giving up on reading object
@@ -372,16 +372,16 @@ WARNING: issue-335a.pdf (trailer, offset 855): unexpected )
WARNING: issue-335a.pdf (trailer, offset 856): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1019): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1163): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 1164): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 1164): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 1167): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1167): too many errors; giving up on reading object
WARNING: issue-335a.pdf (trailer, offset 870): unknown token while reading object; treating as string
WARNING: issue-335a.pdf (trailer, offset 953): unknown token while reading object; treating as string
-WARNING: issue-335a.pdf (trailer, offset 1015): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 1015): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 1018): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1019): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1163): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 1164): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 1164): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 1167): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1167): too many errors; giving up on reading object
WARNING: issue-335a.pdf (trailer, offset 902): unknown token while reading object; treating as string
@@ -389,7 +389,7 @@ WARNING: issue-335a.pdf (trailer, offset 920): unknown token while reading objec
WARNING: issue-335a.pdf (trailer, offset 921): unexpected )
WARNING: issue-335a.pdf (trailer, offset 922): unexpected )
WARNING: issue-335a.pdf (trailer, offset 953): unknown token while reading object; treating as string
-WARNING: issue-335a.pdf (trailer, offset 1015): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 1015): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 1018): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1018): too many errors; giving up on reading object
WARNING: issue-335a.pdf (trailer, offset 918): treating unexpected brace token as null
@@ -402,7 +402,7 @@ WARNING: issue-335a.pdf (trailer, offset 953): too many errors; giving up on rea
WARNING: issue-335a.pdf (trailer, offset 936): unknown token while reading object; treating as string
WARNING: issue-335a.pdf (trailer, offset 952): unexpected )
WARNING: issue-335a.pdf (trailer, offset 953): unknown token while reading object; treating as string
-WARNING: issue-335a.pdf (trailer, offset 1015): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 1015): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 1018): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1019): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1163): unexpected )
@@ -411,14 +411,14 @@ WARNING: issue-335a.pdf (trailer, offset 950): treating unexpected brace token a
WARNING: issue-335a.pdf (trailer, offset 951): unexpected )
WARNING: issue-335a.pdf (trailer, offset 952): unexpected )
WARNING: issue-335a.pdf (trailer, offset 953): unknown token while reading object; treating as string
-WARNING: issue-335a.pdf (trailer, offset 1015): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 1015): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 1018): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1019): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1019): too many errors; giving up on reading object
WARNING: issue-335a.pdf (trailer, offset 980): treating unexpected brace token as null
WARNING: issue-335a.pdf (trailer, offset 981): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1014): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 1015): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 1015): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 1018): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1019): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1163): unexpected )
@@ -427,7 +427,7 @@ WARNING: issue-335a.pdf (trailer, offset 995): unknown token while reading objec
WARNING: issue-335a.pdf (trailer, offset 1012): unknown token while reading object; treating as string
WARNING: issue-335a.pdf (trailer, offset 1013): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1014): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 1015): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 1015): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 1018): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1019): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1019): too many errors; giving up on reading object
@@ -436,17 +436,17 @@ WARNING: issue-335a.pdf (trailer, offset 1011): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1012): unknown token while reading object; treating as string
WARNING: issue-335a.pdf (trailer, offset 1013): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1014): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 1015): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 1015): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 1018): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1018): too many errors; giving up on reading object
WARNING: issue-335a.pdf (trailer, offset 1033): unknown token while reading object; treating as string
WARNING: issue-335a.pdf (trailer, offset 1049): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1163): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 1164): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 1164): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 1167): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1168): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1328): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 1329): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 1329): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 1332): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1333): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1344): unexpected )
@@ -457,7 +457,7 @@ WARNING: issue-335a.pdf (trailer, offset 1047): treating unexpected brace token
WARNING: issue-335a.pdf (trailer, offset 1048): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1049): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1163): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 1164): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 1164): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 1167): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1168): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1168): too many errors; giving up on reading object
@@ -466,13 +466,13 @@ WARNING: issue-335a.pdf (trailer, offset 1160): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1161): unknown token while reading object; treating as string
WARNING: issue-335a.pdf (trailer, offset 1162): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1163): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 1164): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 1164): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 1167): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1167): too many errors; giving up on reading object
WARNING: issue-335a.pdf (trailer, offset 1182): unknown token while reading object; treating as string
WARNING: issue-335a.pdf (trailer, offset 1198): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1328): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 1329): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 1329): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 1332): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1333): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1344): unexpected )
@@ -481,14 +481,14 @@ WARNING: issue-335a.pdf (trailer, offset 1196): treating unexpected brace token
WARNING: issue-335a.pdf (trailer, offset 1197): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1198): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1328): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 1329): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 1329): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 1332): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1333): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1333): too many errors; giving up on reading object
WARNING: issue-335a.pdf (trailer, offset 1212): unknown token while reading object; treating as string
WARNING: issue-335a.pdf (trailer, offset 1265): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1328): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 1329): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 1329): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 1332): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1333): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1344): unexpected )
@@ -511,7 +511,7 @@ WARNING: issue-335a.pdf (trailer, offset 1265): too many errors; giving up on re
WARNING: issue-335a.pdf (trailer, offset 1279): unknown token while reading object; treating as string
WARNING: issue-335a.pdf (trailer, offset 1295): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1328): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 1329): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 1329): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 1332): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1333): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1344): unexpected )
@@ -520,7 +520,7 @@ WARNING: issue-335a.pdf (trailer, offset 1293): treating unexpected brace token
WARNING: issue-335a.pdf (trailer, offset 1294): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1295): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1328): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 1329): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 1329): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 1332): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1333): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1333): too many errors; giving up on reading object
@@ -528,7 +528,7 @@ WARNING: issue-335a.pdf (trailer, offset 1309): unknown token while reading obje
WARNING: issue-335a.pdf (trailer, offset 1326): unknown token while reading object; treating as string
WARNING: issue-335a.pdf (trailer, offset 1327): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1328): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 1329): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 1329): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 1332): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1333): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1333): too many errors; giving up on reading object
@@ -537,7 +537,7 @@ WARNING: issue-335a.pdf (trailer, offset 1325): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1326): unknown token while reading object; treating as string
WARNING: issue-335a.pdf (trailer, offset 1327): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1328): unexpected )
-WARNING: issue-335a.pdf (trailer, offset 1329): invalid name token
+WARNING: issue-335a.pdf (trailer, offset 1329): name with stray # will not work with PDF >= 1.2
WARNING: issue-335a.pdf (trailer, offset 1332): unexpected )
WARNING: issue-335a.pdf (trailer, offset 1332): too many errors; giving up on reading object
WARNING: issue-335a.pdf (trailer, offset 1358): unknown token while reading object; treating as string
diff --git a/qpdf/qtest/qpdf/name-pound-images-qdf.out b/qpdf/qtest/qpdf/name-pound-images-qdf.out
index 5a0a8f3c..7a222f87 100644
--- a/qpdf/qtest/qpdf/name-pound-images-qdf.out
+++ b/qpdf/qtest/qpdf/name-pound-images-qdf.out
@@ -1,3 +1,3 @@
-WARNING: name-pound-images.pdf (object 3 0, offset 471): invalid name token
-WARNING: name-pound-images.pdf (object 3 0, offset 508): invalid name token
+WARNING: name-pound-images.pdf (object 3 0, offset 471): name with stray # will not work with PDF >= 1.2
+WARNING: name-pound-images.pdf (object 3 0, offset 508): name with stray # will not work with PDF >= 1.2
qpdf: operation succeeded with warnings; resulting file may have some problems
diff --git a/qpdf/qtest/qpdf/name-pound-images.out b/qpdf/qtest/qpdf/name-pound-images.out
index 1994cf29..4ceadc35 100644
--- a/qpdf/qtest/qpdf/name-pound-images.out
+++ b/qpdf/qtest/qpdf/name-pound-images.out
@@ -2,7 +2,7 @@ checking name-pound-images.pdf
PDF Version: 1.0
File is not encrypted
File is not linearized
-WARNING: name-pound-images.pdf (object 3 0, offset 471): invalid name token
-WARNING: name-pound-images.pdf (object 3 0, offset 508): invalid name token
-WARNING: page object 3 0 stream 4 0 (content, offset 59): invalid name token
-WARNING: page object 3 0 stream 4 0 (content, offset 131): invalid name token
+WARNING: name-pound-images.pdf (object 3 0, offset 471): name with stray # will not work with PDF >= 1.2
+WARNING: name-pound-images.pdf (object 3 0, offset 508): name with stray # will not work with PDF >= 1.2
+WARNING: page object 3 0 stream 4 0 (content, offset 59): name with stray # will not work with PDF >= 1.2
+WARNING: page object 3 0 stream 4 0 (content, offset 131): name with stray # will not work with PDF >= 1.2
diff --git a/qpdf/qtest/qpdf/pound-in-name-qdf.out b/qpdf/qtest/qpdf/pound-in-name-qdf.out
index d881d7cd..f6e36b6c 100644
--- a/qpdf/qtest/qpdf/pound-in-name-qdf.out
+++ b/qpdf/qtest/qpdf/pound-in-name-qdf.out
@@ -1,8 +1,8 @@
-WARNING: pound-in-name.pdf (trailer, offset 749): invalid name token
-WARNING: pound-in-name.pdf (trailer, offset 776): invalid name token
-WARNING: pound-in-name.pdf (trailer, offset 786): invalid name token
-WARNING: pound-in-name.pdf (trailer, offset 809): invalid name token
-WARNING: pound-in-name.pdf (trailer, offset 818): invalid name token
-WARNING: pound-in-name.pdf (trailer, offset 826): invalid name token
-WARNING: pound-in-name.pdf (trailer, offset 844): invalid name token
+WARNING: pound-in-name.pdf (trailer, offset 749): name with stray # will not work with PDF >= 1.2
+WARNING: pound-in-name.pdf (trailer, offset 776): name with stray # will not work with PDF >= 1.2
+WARNING: pound-in-name.pdf (trailer, offset 786): name with stray # will not work with PDF >= 1.2
+WARNING: pound-in-name.pdf (trailer, offset 809): name with stray # will not work with PDF >= 1.2
+WARNING: pound-in-name.pdf (trailer, offset 818): name with stray # will not work with PDF >= 1.2
+WARNING: pound-in-name.pdf (trailer, offset 826): name with stray # will not work with PDF >= 1.2
+WARNING: pound-in-name.pdf (trailer, offset 844): name with stray # will not work with PDF >= 1.2
qpdf: operation succeeded with warnings; resulting file may have some problems
diff --git a/qpdf/qtest/qpdf/pound-in-name.out b/qpdf/qtest/qpdf/pound-in-name.out
index c4aa5c49..e68e7536 100644
--- a/qpdf/qtest/qpdf/pound-in-name.out
+++ b/qpdf/qtest/qpdf/pound-in-name.out
Binary files differ
diff --git a/qpdf/qtest/qpdf/tokens-maxlen.out b/qpdf/qtest/qpdf/tokens-maxlen.out
index 3787a952..5e0046f1 100644
--- a/qpdf/qtest/qpdf/tokens-maxlen.out
+++ b/qpdf/qtest/qpdf/tokens-maxlen.out
@@ -705,7 +705,7 @@ skipping to endstream
243: bad: > (unexpected >)
244: word: quack
249: space:
-250: name: /name\x00oops (raw: /name#oops) (invalid name token)
+250: name: /name\x00oops (raw: /name#oops) (name with stray # will not work with PDF >= 1.2)
260: space:
261: name: /name (raw: /n#61me)
268: space:
diff --git a/qpdf/qtest/qpdf/tokens-no-ignorable.out b/qpdf/qtest/qpdf/tokens-no-ignorable.out
index d04ea522..a378c118 100644
--- a/qpdf/qtest/qpdf/tokens-no-ignorable.out
+++ b/qpdf/qtest/qpdf/tokens-no-ignorable.out
@@ -349,7 +349,7 @@ skipping to endstream
242: bad: ) (unexpected ))
243: bad: > (unexpected >)
244: word: quack
-250: name: /name\x00oops (raw: /name#oops) (invalid name token)
+250: name: /name\x00oops (raw: /name#oops) (name with stray # will not work with PDF >= 1.2)
261: name: /name (raw: /n#61me)
269: word: one
273: bool: true
diff --git a/qpdf/qtest/qpdf/tokens.out b/qpdf/qtest/qpdf/tokens.out
index ab6672cd..b145245b 100644
--- a/qpdf/qtest/qpdf/tokens.out
+++ b/qpdf/qtest/qpdf/tokens.out
@@ -705,7 +705,7 @@ skipping to endstream
243: bad: > (unexpected >)
244: word: quack
249: space:
-250: name: /name\x00oops (raw: /name#oops) (invalid name token)
+250: name: /name\x00oops (raw: /name#oops) (name with stray # will not work with PDF >= 1.2)
260: space:
261: name: /name (raw: /n#61me)
268: space: