From acd0acf16931ce92bc908e4960c5a1e43d53b550 Mon Sep 17 00:00:00 2001 From: m-holger Date: Mon, 29 May 2023 19:26:18 +0100 Subject: Fix doc typos --- examples/pdf-invert-images.cc | 6 +++--- examples/pdf-name-number-tree.cc | 2 +- examples/pdf-set-form-values.cc | 14 +++++++------- 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'examples') 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); } -- cgit v1.2.3-54-g00ecf