diff options
author | Albert Astals Cid <aacid@kde.org> | 2006-02-04 20:07:07 +0000 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2006-02-04 20:07:07 +0000 |
commit | 93ad488679f594e45547a67e2a7397f4c8bd2820 (patch) | |
tree | 938c2295b6940e723b58c6e5d56cac89ee955a84 /utils | |
parent | 7d2be955e6345a052590b06b29a6d2fb2111e2e6 (diff) |
Actually create pdftoppm patch by Stefan Schweizer
Diffstat (limited to 'utils')
-rw-r--r-- | utils/Makefile.am | 10 | ||||
-rw-r--r-- | utils/pdftoppm.cc | 9 |
2 files changed, 13 insertions, 6 deletions
diff --git a/utils/Makefile.am b/utils/Makefile.am index 971f72a7..3b7e6c87 100644 --- a/utils/Makefile.am +++ b/utils/Makefile.am @@ -13,7 +13,8 @@ bin_PROGRAMS = \ pdfinfo \ pdftops \ pdftotext \ - pdftohtml + pdftohtml \ + pdftoppm dist_man1_MANS = \ pdffonts.1 \ @@ -21,7 +22,8 @@ dist_man1_MANS = \ pdfinfo.1 \ pdftops.1 \ pdftotext.1 \ - pdftohtml.1 + pdftohtml.1 \ + pdftoppm.1 common = parseargs.c parseargs.h @@ -56,3 +58,7 @@ pdftohtml_SOURCES = \ HtmlOutputDev.cc \ HtmlOutputDev.h \ $(common) + +pdftoppm_SOURCES = \ + pdftoppm.cc \ + $(common) diff --git a/utils/pdftoppm.cc b/utils/pdftoppm.cc index d95c1798..df94cecd 100644 --- a/utils/pdftoppm.cc +++ b/utils/pdftoppm.cc @@ -108,7 +108,6 @@ int main(int argc, char *argv[]) { // read config file globalParams = new GlobalParams(cfgFileName); - globalParams->setupBaseFonts(NULL); if (enableT1libStr[0]) { if (!globalParams->setEnableT1lib(enableT1libStr)) { fprintf(stderr, "Bad '-t1lib' value on command line\n"); @@ -158,14 +157,16 @@ int main(int argc, char *argv[]) { lastPage = doc->getNumPages(); // write PPM files - paperColor.rgb8 = splashMakeRGB8(255, 255, 255); + paperColor[0] = 255; + paperColor[1] = 255; + paperColor[2] = 255; splashOut = new SplashOutputDev(mono ? splashModeMono1 : gray ? splashModeMono8 : - splashModeRGB8, + splashModeRGB8, 4, gFalse, paperColor); splashOut->startDoc(doc->getXRef()); for (pg = firstPage; pg <= lastPage; ++pg) { - doc->displayPage(splashOut, pg, resolution, resolution, 0, gTrue, gFalse); + doc->displayPage(splashOut, pg, resolution, resolution, 0, gTrue, gFalse, gFalse); sprintf(ppmFile, "%.*s-%06d.%s", (int)sizeof(ppmFile) - 32, ppmRoot, pg, mono ? "pbm" : gray ? "pgm" : "ppm"); |