diff options
author | Jay Berkenbilt <ejb@ql.org> | 2018-06-18 22:38:15 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2018-06-21 21:57:13 +0200 |
commit | 0dadf17ab705fa2f96f0513278672978d73601ed (patch) | |
tree | 2f56f5f3cff16861a19bab5ebb1d10c801572296 /qpdf/pdf_from_scratch.cc | |
parent | 2e6e1204a51b4aba4657712a34e9447d928b5fc6 (diff) | |
download | qpdf-0dadf17ab705fa2f96f0513278672978d73601ed.tar.zst |
Convert command-line and test suite to use page helper classes
This provides better test coverage and more useful code for people to
read and copy.
Diffstat (limited to 'qpdf/pdf_from_scratch.cc')
-rw-r--r-- | qpdf/pdf_from_scratch.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/qpdf/pdf_from_scratch.cc b/qpdf/pdf_from_scratch.cc index 967025df..cc57428c 100644 --- a/qpdf/pdf_from_scratch.cc +++ b/qpdf/pdf_from_scratch.cc @@ -4,6 +4,7 @@ #include <qpdf/QTC.hh> #include <qpdf/QPDFWriter.hh> #include <qpdf/QPDFObjectHandle.hh> +#include <qpdf/QPDFPageDocumentHelper.hh> #include <iostream> #include <stdio.h> #include <string.h> @@ -67,7 +68,7 @@ void runtest(int n) page.replaceKey("/Contents", contents); page.replaceKey("/Resources", resources); - pdf.addPage(page, true); + QPDFPageDocumentHelper(pdf).addPage(page, true); QPDFWriter w(pdf, "a.pdf"); w.setStaticID(true); |