diff options
author | Jay Berkenbilt <ejb@ql.org> | 2018-02-17 17:51:10 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2018-02-19 03:06:27 +0100 |
commit | 2780a1871d2603e9b273580fb7978d277832c2fc (patch) | |
tree | 270b1195eed7eb93e5a339a965c08b549239958d /qpdf/qpdf-ctest.c | |
parent | b72a38bf5ff3adf9bf02046b1106e1b524afa922 (diff) | |
download | qpdf-2780a1871d2603e9b273580fb7978d277832c2fc.tar.zst |
Add C API for checking PDF files
Diffstat (limited to 'qpdf/qpdf-ctest.c')
-rw-r--r-- | qpdf/qpdf-ctest.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/qpdf/qpdf-ctest.c b/qpdf/qpdf-ctest.c index f7bfb5c4..8b9c36ce 100644 --- a/qpdf/qpdf-ctest.c +++ b/qpdf/qpdf-ctest.c @@ -484,6 +484,18 @@ static void test22(char const* infile, report_errors(); } +static void test23(char const* infile, + char const* password, + char const* outfile, + char const* outfile2) +{ + QPDF_ERROR_CODE status = 0; + qpdf_read(qpdf, infile, password); + status = qpdf_check_pdf(qpdf); + printf("status: %d\n", status); + report_errors(); +} + int main(int argc, char* argv[]) { char* p = 0; @@ -546,6 +558,7 @@ int main(int argc, char* argv[]) (n == 20) ? test20 : (n == 21) ? test21 : (n == 22) ? test22 : + (n == 23) ? test23 : 0); if (fn == 0) |