aboutsummaryrefslogtreecommitdiffstats
path: root/qpdf/pdf_from_scratch.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2018-06-18 22:38:15 +0200
committerJay Berkenbilt <ejb@ql.org>2018-06-21 21:57:13 +0200
commit0dadf17ab705fa2f96f0513278672978d73601ed (patch)
tree2f56f5f3cff16861a19bab5ebb1d10c801572296 /qpdf/pdf_from_scratch.cc
parent2e6e1204a51b4aba4657712a34e9447d928b5fc6 (diff)
downloadqpdf-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.cc3
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);