aboutsummaryrefslogtreecommitdiffstats
path: root/qpdf
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2012-07-06 03:22:27 +0200
committerJay Berkenbilt <ejb@ql.org>2012-07-06 03:24:04 +0200
commit8705e2e8fc1a9721b2438c09ba7e92ec673af19d (patch)
treebba745e53ae9aa63a883bc8b3d4fbef797f0cb9f /qpdf
parent3b5d72b9462988bbbf9422aa82954414368533d9 (diff)
downloadqpdf-8705e2e8fc1a9721b2438c09ba7e92ec673af19d.tar.zst
Add QPDFWriter method to output to FILE*
Diffstat (limited to 'qpdf')
-rw-r--r--qpdf/test_driver.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/qpdf/test_driver.cc b/qpdf/test_driver.cc
index b72c5d20..89b422ac 100644
--- a/qpdf/test_driver.cc
+++ b/qpdf/test_driver.cc
@@ -728,7 +728,10 @@ void runtest(int n, char const* filename)
checkPageContents(pages[11], "New page 11");
checkPageContents(pages[12], "New page 12");
- QPDFWriter w(pdf, "a.pdf");
+ // Exercise writing to FILE*
+ FILE* out = QUtil::fopen_wrapper(std::string("open a.pdf"),
+ fopen("a.pdf", "wb"));
+ QPDFWriter w(pdf, "FILE* a.pdf", out, true);
w.setStaticID(true);
w.setStreamDataMode(qpdf_s_preserve);
w.write();