Commit e06648830693e44855652d31a762607357442beb

Authored by Jay Berkenbilt
1 parent 8ddca96e

Comment use of static ID in examples

Make sure people know that static ID should be used only for testing.
examples/pdf-double-page-size.cc
... ... @@ -101,7 +101,7 @@ int main(int argc, char* argv[])
101 101 {
102 102 // For the test suite, uncompress streams and use static
103 103 // IDs.
104   - w.setStaticID(true);
  104 + w.setStaticID(true); // for testing only
105 105 w.setStreamDataMode(qpdf_s_uncompress);
106 106 }
107 107 w.write();
... ...
examples/pdf-invert-images.cc
... ... @@ -162,7 +162,7 @@ int main(int argc, char* argv[])
162 162 {
163 163 // For the test suite, uncompress streams and use static
164 164 // IDs.
165   - w.setStaticID(true);
  165 + w.setStaticID(true); // for testing only
166 166 }
167 167 w.write();
168 168 std::cout << whoami << ": new file written to " << outfilename
... ...
examples/pdf-linearize.c
... ... @@ -50,7 +50,10 @@ int main(int argc, char* argv[])
50 50 if (((qpdf_read(qpdf, infile, password) & QPDF_ERRORS) == 0) &&
51 51 ((qpdf_init_write(qpdf, outfile) & QPDF_ERRORS) == 0))
52 52 {
53   - qpdf_set_static_ID(qpdf, QPDF_TRUE);
  53 + /* Use static ID for testing only. For production, a
  54 + * non-static ID is used. See also
  55 + * qpdf_set_deterministic_ID. */
  56 + qpdf_set_static_ID(qpdf, QPDF_TRUE); /* for testing only */
54 57 qpdf_set_linearization(qpdf, QPDF_TRUE);
55 58 qpdf_write(qpdf);
56 59 }
... ...
examples/pdf-split-pages.cc
... ... @@ -36,7 +36,7 @@ static void process(char const* whoami,
36 36 {
37 37 // For the test suite, uncompress streams and use static
38 38 // IDs.
39   - outpdfw.setStaticID(true);
  39 + outpdfw.setStaticID(true); // for testing only
40 40 outpdfw.setStreamDataMode(qpdf_s_uncompress);
41 41 }
42 42 outpdfw.write();
... ...