aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorm-holger <m-holger@kubitscheck.org>2023-05-29 20:26:18 +0200
committerm-holger <m-holger@kubitscheck.org>2023-06-02 20:24:12 +0200
commitacd0acf16931ce92bc908e4960c5a1e43d53b550 (patch)
tree466c87d625ab4d5b3eab45301fab34e11be1271a /examples
parent3c5700c255f4603b5df9c6d183d13dd71a083cc3 (diff)
downloadqpdf-acd0acf16931ce92bc908e4960c5a1e43d53b550.tar.zst
Fix doc typos
Diffstat (limited to 'examples')
-rw-r--r--examples/pdf-invert-images.cc6
-rw-r--r--examples/pdf-name-number-tree.cc2
-rw-r--r--examples/pdf-set-form-values.cc14
3 files changed, 11 insertions, 11 deletions
diff --git a/examples/pdf-invert-images.cc b/examples/pdf-invert-images.cc
index 0ef2169e..4ec83b84 100644
--- a/examples/pdf-invert-images.cc
+++ b/examples/pdf-invert-images.cc
@@ -120,9 +120,9 @@ main(int argc, char* argv[])
QPDFObjectHandle color_space = image_dict.getKey("/ColorSpace");
QPDFObjectHandle bits_per_component = image_dict.getKey("/BitsPerComponent");
- // For our example, we can only work with images 8-bit grayscale images that we can
- // fully decode. Use pipeStreamData with a null pipeline to determine whether the
- // image is filterable. Directly inspect keys to determine the image type.
+ // For our example, we can only work with 8-bit grayscale images that we can fully
+ // decode. Use pipeStreamData with a null pipeline to determine whether the image
+ // is filterable. Directly inspect keys to determine the image type.
if (image.pipeStreamData(nullptr, qpdf_ef_compress, qpdf_dl_all) &&
color_space.isNameAndEquals("/DeviceGray") && bits_per_component.isInteger() &&
(bits_per_component.getIntValue() == 8)) {
diff --git a/examples/pdf-name-number-tree.cc b/examples/pdf-name-number-tree.cc
index 31eaf932..7701e70e 100644
--- a/examples/pdf-name-number-tree.cc
+++ b/examples/pdf-name-number-tree.cc
@@ -41,7 +41,7 @@ main(int argc, char* argv[])
// (root), and write an empty PDF to a file. The PDF will have no pages and won't be viewable,
// but you can look at it in a text editor to see the resulting structure of the PDF.
- // Create a dictionary off the root where we will hang our name and number tree.
+ // Create a dictionary off the root where we will hang our name and number trees.
auto root = qpdf.getRoot();
auto example = QPDFObjectHandle::newDictionary();
root.replaceKey("/Example", example);
diff --git a/examples/pdf-set-form-values.cc b/examples/pdf-set-form-values.cc
index a1a19db1..810b9fa3 100644
--- a/examples/pdf-set-form-values.cc
+++ b/examples/pdf-set-form-values.cc
@@ -38,7 +38,7 @@ main(int argc, char* argv[])
qpdf.processFile(infilename);
// We will iterate through form fields by starting at the page level and looking at each
- // field for each page. We could also called QPDFAcroFormDocumentHelper::getFormFields to
+ // field for each page. We could also call QPDFAcroFormDocumentHelper::getFormFields to
// iterate at the field level, but doing it as below illustrates how we can map from
// annotations to fields.
@@ -51,12 +51,12 @@ main(int argc, char* argv[])
// value.
QPDFFormFieldObjectHelper ffh = afdh.getFieldForAnnotation(annot);
if (ffh.getFieldType() == "/Tx") {
- // Set the value. Passing false as the second value prevents qpdf from setting
- // /NeedAppearances to true (but will not turn it off if it's already on), so we
- // call generateAppearance after setting the value. You may or may not want to
- // do this depending on whether the appearance streams generated by qpdf are
- // good enough for your purposes. For additional details, please see comments in
- // QPDFFormFieldObjectHelper.hh for this method.
+ // Set the value. Passing false as the second parameter prevents qpdf from
+ // setting /NeedAppearances to true (but will not turn it off if it's already
+ // on), so we call generateAppearance after setting the value. You may or may
+ // not want to do this depending on whether the appearance streams generated by
+ // qpdf are good enough for your purposes. For additional details, please see
+ // comments in QPDFFormFieldObjectHelper.hh for this method.
ffh.setV(value, false);
ffh.generateAppearance(annot);
}