diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/pdfclean.c | 3 | ||||
-rw-r--r-- | test/x11pdf.c | 18 |
2 files changed, 11 insertions, 10 deletions
diff --git a/test/pdfclean.c b/test/pdfclean.c index 7dd15427..b8102d2c 100644 --- a/test/pdfclean.c +++ b/test/pdfclean.c @@ -162,6 +162,9 @@ int main(int argc, char **argv) if (error) fz_abort(error); + if (encrypt) + pdf_dropcrypt(encrypt); + pdf_closepdf(xref); return 0; diff --git a/test/x11pdf.c b/test/x11pdf.c index 0d52ff41..d6cbb28a 100644 --- a/test/x11pdf.c +++ b/test/x11pdf.c @@ -157,14 +157,12 @@ static void showpage(void) XDrawString(xdpy, xwin, xgc, 10, 30, s, strlen(s)); XFlush(xdpy); - ctm = fz_concat(fz_translate(0, -page->mediabox.max.y), - fz_scale(zoom, -zoom)); + ctm = fz_identity(); + ctm = fz_concat(ctm, fz_translate(0, -page->mediabox.max.y)); + ctm = fz_concat(ctm, fz_scale(zoom, -zoom)); + ctm = fz_concat(ctm, fz_rotate(rotate)); - bbox = page->mediabox; - bbox.min.x = bbox.min.x * zoom; - bbox.min.y = bbox.min.y * zoom; - bbox.max.x = bbox.max.x * zoom; - bbox.max.y = bbox.max.y * zoom; + bbox = fz_transformaabb(ctm, page->mediabox); error = fz_rendertree(&image, rast, page->tree, ctm, bbox); if (error) @@ -222,9 +220,9 @@ static void handlekey(int c) switch (c) { - case '8': - fz_debugglyphcache(rast->cache); - break; + case 'd': fz_debugglyphcache(rast->cache); break; + case 'a': rotate -= 5; break; + case 's': rotate += 5; break; case 'b': pageno--; |