From 3c5700c255f4603b5df9c6d183d13dd71a083cc3 Mon Sep 17 00:00:00 2001 From: m-holger Date: Sat, 27 May 2023 18:19:52 +0100 Subject: Code tidy - reflow comments and strings --- examples/pdf-overlay-page.cc | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'examples/pdf-overlay-page.cc') diff --git a/examples/pdf-overlay-page.cc b/examples/pdf-overlay-page.cc index 6d1cd0b0..75577094 100644 --- a/examples/pdf-overlay-page.cc +++ b/examples/pdf-overlay-page.cc @@ -6,10 +6,9 @@ #include #include -// This program demonstrates use of form XObjects to overlay a page -// from one file onto all pages of another file. The qpdf program's -// --overlay and --underlay options provide a more general version of -// this capability. +// This program demonstrates use of form XObjects to overlay a page from one file onto all pages of +// another file. The qpdf program's --overlay and --underlay options provide a more general version +// of this capability. static char const* whoami = nullptr; @@ -44,24 +43,21 @@ stamp_page(char const* infile, char const* stampfile, char const* outfile) int min_suffix = 1; std::string name = resources.getUniqueResourceName("/Fx", min_suffix); - // Generate content to place the form XObject centered within - // destination page's trim box. + // Generate content to place the form XObject centered within destination page's trim box. QPDFMatrix m; std::string content = ph.placeFormXObject(stamp_fo, name, ph.getTrimBox().getArrayAsRectangle(), m); if (!content.empty()) { - // Append the content to the page's content. Surround the - // original content with q...Q to the new content from the - // page's original content. + // Append the content to the page's content. Surround the original content with q...Q to + // the new content from the page's original content. resources.mergeResources("<< /XObject << >> >>"_qpdf); resources.getKey("/XObject").replaceKey(name, stamp_fo); ph.addPageContents(inpdf.newStream("q\n"), true); ph.addPageContents(inpdf.newStream("\nQ\n" + content), false); } - // Copy the annotations and form fields from the original page - // to the new page. For more efficiency when copying multiple - // pages, we can create a QPDFAcroFormDocumentHelper and pass - // it in. See comments in QPDFPageObjectHelper.hh for details. + // Copy the annotations and form fields from the original page to the new page. For more + // efficiency when copying multiple pages, we can create a QPDFAcroFormDocumentHelper and + // pass it in. See comments in QPDFPageObjectHelper.hh for details. ph.copyAnnotations(stamp_page_1, m); } -- cgit v1.2.3-54-g00ecf