aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2015-11-01 22:39:15 +0100
committerJay Berkenbilt <ejb@ql.org>2015-11-01 22:40:01 +0100
commite06648830693e44855652d31a762607357442beb (patch)
tree3f8d81939555a0cb801d0dadecdacb3d6afd723d
parent8ddca96e2d42985faa998068a72fa1a7359f15d2 (diff)
downloadqpdf-e06648830693e44855652d31a762607357442beb.tar.zst
Comment use of static ID in examples
Make sure people know that static ID should be used only for testing.
-rw-r--r--examples/pdf-double-page-size.cc2
-rw-r--r--examples/pdf-invert-images.cc2
-rw-r--r--examples/pdf-linearize.c5
-rw-r--r--examples/pdf-split-pages.cc2
4 files changed, 7 insertions, 4 deletions
diff --git a/examples/pdf-double-page-size.cc b/examples/pdf-double-page-size.cc
index 2236265b..30365b8d 100644
--- a/examples/pdf-double-page-size.cc
+++ b/examples/pdf-double-page-size.cc
@@ -101,7 +101,7 @@ int main(int argc, char* argv[])
{
// For the test suite, uncompress streams and use static
// IDs.
- w.setStaticID(true);
+ w.setStaticID(true); // for testing only
w.setStreamDataMode(qpdf_s_uncompress);
}
w.write();
diff --git a/examples/pdf-invert-images.cc b/examples/pdf-invert-images.cc
index 867c89c7..00362091 100644
--- a/examples/pdf-invert-images.cc
+++ b/examples/pdf-invert-images.cc
@@ -162,7 +162,7 @@ int main(int argc, char* argv[])
{
// For the test suite, uncompress streams and use static
// IDs.
- w.setStaticID(true);
+ w.setStaticID(true); // for testing only
}
w.write();
std::cout << whoami << ": new file written to " << outfilename
diff --git a/examples/pdf-linearize.c b/examples/pdf-linearize.c
index 72703c87..1eb56600 100644
--- a/examples/pdf-linearize.c
+++ b/examples/pdf-linearize.c
@@ -50,7 +50,10 @@ int main(int argc, char* argv[])
if (((qpdf_read(qpdf, infile, password) & QPDF_ERRORS) == 0) &&
((qpdf_init_write(qpdf, outfile) & QPDF_ERRORS) == 0))
{
- qpdf_set_static_ID(qpdf, QPDF_TRUE);
+ /* Use static ID for testing only. For production, a
+ * non-static ID is used. See also
+ * qpdf_set_deterministic_ID. */
+ qpdf_set_static_ID(qpdf, QPDF_TRUE); /* for testing only */
qpdf_set_linearization(qpdf, QPDF_TRUE);
qpdf_write(qpdf);
}
diff --git a/examples/pdf-split-pages.cc b/examples/pdf-split-pages.cc
index 0a70ed8b..14f7c5d5 100644
--- a/examples/pdf-split-pages.cc
+++ b/examples/pdf-split-pages.cc
@@ -36,7 +36,7 @@ static void process(char const* whoami,
{
// For the test suite, uncompress streams and use static
// IDs.
- outpdfw.setStaticID(true);
+ outpdfw.setStaticID(true); // for testing only
outpdfw.setStreamDataMode(qpdf_s_uncompress);
}
outpdfw.write();