utils/pdftoppm.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit df0ccddb7f784b4a8564beda51b3047cb9e3611a Author: Albert Astals Cid <[email protected]> Date: Fri Dec 18 20:23:48 2009 +0000 move the retrieval of the bitmap after rendering the page as it can change on render time diff --git a/utils/pdftoppm.cc b/utils/pdftoppm.cc index e27aa44..2c4e869 100644 --- a/utils/pdftoppm.cc +++ b/utils/pdftoppm.cc @@ -18,6 +18,7 @@ // Copyright (C) 2009 Michael K. Johnson <[email protected]> // Copyright (C) 2009 Shen Liang <[email protected]> // Copyright (C) 2009 Stefan Thomas <[email protected]> +// Copyright (C) 2009 Albert Astals Cid <[email protected]> // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -146,8 +147,6 @@ static void savePageSlice(PDFDoc *doc, int pg, int x, int y, int w, int h, double pg_w, double pg_h, char *ppmFile) { - SplashBitmap *bitmap = splashOut->getBitmap(); - if (w == 0) w = (int)ceil(pg_w); if (h == 0) h = (int)ceil(pg_h); w = (x+w > pg_w ? (int)ceil(pg_w-x) : w); @@ -158,6 +157,9 @@ static void savePageSlice(PDFDoc *doc, !useCropBox, gFalse, gFalse, x, y, w, h ); + + SplashBitmap *bitmap = splashOut->getBitmap(); + if (ppmFile != NULL) { if (png) { bitmap->writeImgFile(splashFormatPng, ppmFile); _______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
