aboutsummaryrefslogtreecommitdiffstats
path: root/examples/pdf-attach-file.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <jberkenbilt@users.noreply.github.com>2023-06-17 15:26:16 +0200
committerGitHub <noreply@github.com>2023-06-17 15:26:16 +0200
commit44dce4e2988ec09e36dfb6d1fc527a143e6f597f (patch)
tree3cdb1999faeb5103eb87c36fb1673d8cbb5ab082 /examples/pdf-attach-file.cc
parentfc30e75122f6bef20ac8d676ac7cb8822feecf3e (diff)
parentacd0acf16931ce92bc908e4960c5a1e43d53b550 (diff)
downloadqpdf-44dce4e2988ec09e36dfb6d1fc527a143e6f597f.tar.zst
Merge pull request #978 from m-holger/reflow
Code tidy - reflow comments and strings
Diffstat (limited to 'examples/pdf-attach-file.cc')
-rw-r--r--examples/pdf-attach-file.cc22
1 files changed, 10 insertions, 12 deletions
diff --git a/examples/pdf-attach-file.cc b/examples/pdf-attach-file.cc
index b5a1c64a..9ae3b247 100644
--- a/examples/pdf-attach-file.cc
+++ b/examples/pdf-attach-file.cc
@@ -8,11 +8,10 @@
#include <iostream>
//
-// This example attaches a file to an input file, adds a page to the
-// beginning of the file that includes a file attachment annotation,
-// and writes the result to an output file. It also illustrates a
-// number of new API calls that were added in qpdf 10.2 as well as
-// the use of the qpdf literal syntax introduced in qpdf 10.6.
+// This example attaches a file to an input file, adds a page to the beginning of the file that
+// includes a file attachment annotation, and writes the result to an output file. It also
+// illustrates a number of new API calls that were added in qpdf 10.2 as well as the use of the qpdf
+// literal syntax introduced in qpdf 10.6.
//
static char const* whoami = nullptr;
@@ -43,8 +42,8 @@ process(
QPDF q;
q.processFile(infilename, password);
- // Create an indirect object for the built-in Helvetica font. This
- // uses the qpdf literal syntax introduced in qpdf 10.6.
+ // Create an indirect object for the built-in Helvetica font. This uses the qpdf literal syntax
+ // introduced in qpdf 10.6.
auto f1 = q.makeIndirectObject(
// force line-break
"<<"
@@ -55,9 +54,8 @@ process(
" /Encoding /WinAnsiEncoding"
">>"_qpdf);
- // Create a resources dictionary with fonts. This uses the new
- // parse introduced in qpdf 10.2 that takes a QPDF* and allows
- // indirect object references.
+ // Create a resources dictionary with fonts. This uses the new parse introduced in qpdf 10.2
+ // that takes a QPDF* and allows indirect object references.
auto resources = q.makeIndirectObject(
// line-break
QPDFObjectHandle::parse(
@@ -97,8 +95,8 @@ process(
"S\n");
auto apdict = ap.getDict();
- // The following four lines demonstrate the use of the qpdf literal syntax
- // introduced in qpdf 10.6. They could have been written as:
+ // The following four lines demonstrate the use of the qpdf literal syntax introduced in
+ // qpdf 10.6. They could have been written as:
// apdict.replaceKey("/Resources", QPDFObjectHandle::newDictionary());
// apdict.replaceKey("/Type", QPDFObjectHandle::newName("/XObject"));
// apdict.replaceKey("/Subtype", QPDFObjectHandle::newName("/Form"));