[poppler] utils/pdftoppm.1 utils/pdftoppm.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Tue Aug 13 10:42:04 PDT 2013
utils/pdftoppm.1 | 12 ++++++++++++
utils/pdftoppm.cc | 17 +++++++++++++++--
2 files changed, 27 insertions(+), 2 deletions(-)
New commits:
commit 31947d413eae115acc147c33fc55b8ab4adccd91
Author: Thomas Freitag <Thomas.Freitag at alfa.de>
Date: Tue Aug 13 19:39:30 2013 +0200
pdftoppm: Add thinlinemode option setting
diff --git a/utils/pdftoppm.1 b/utils/pdftoppm.1
index 2321d6d..7f88b6d 100644
--- a/utils/pdftoppm.1
+++ b/utils/pdftoppm.1
@@ -102,6 +102,18 @@ Specifies the TIFF compression type. This defaults to "none".
Enable or disable FreeType (a TrueType / Type 1 font rasterizer).
This defaults to "yes".
.TP
+.BI \-thinlinemode " none | solid | shape"
+Specifies the thin line mode. This defaults to "none".
+.TP
+"solid":
+adjust lines with a width less than one pixel to pixel boundary
+and paint it with a width of one pixel.
+.TP
+"shape":
+adjust lines with a width less than one pixel to pixel boundary
+and paint it with a width of one pixel but with a shape in proportion
+to its width.
+.TP
.BI \-aa " yes | no"
Enable or disable font anti-aliasing. This defaults to "yes".
.TP
diff --git a/utils/pdftoppm.cc b/utils/pdftoppm.cc
index 73f337c..a3d4d10 100644
--- a/utils/pdftoppm.cc
+++ b/utils/pdftoppm.cc
@@ -94,6 +94,8 @@ static char vectorAntialiasStr[16] = "";
static char ownerPassword[33] = "";
static char userPassword[33] = "";
static char TiffCompressionStr[16] = "";
+static char thinLineModeStr[8] = "";
+static SplashThinLineMode thinLineMode = splashThinLineDefault;
#ifdef UTILS_USE_PTHREADS
static int numberOfJobs = 1;
#endif // UTILS_USE_PTHREADS
@@ -169,6 +171,8 @@ static const ArgDesc argDesc[] = {
{"-freetype", argString, enableFreeTypeStr, sizeof(enableFreeTypeStr),
"enable FreeType font rasterizer: yes, no"},
#endif
+ {"-thinlinemode", argString, thinLineModeStr, sizeof(thinLineModeStr),
+ "set thin line mode: none, solid, shape. Default: none"},
{"-aa", argString, antialiasStr, sizeof(antialiasStr),
"enable font anti-aliasing: yes, no"},
@@ -283,7 +287,7 @@ static void processPageJobs() {
#if SPLASH_CMYK
(jpegcmyk || overprint) ? splashModeDeviceN8 :
#endif
- splashModeRGB8, 4, gFalse, *pageJob.paperColor);
+ splashModeRGB8, 4, gFalse, *pageJob.paperColor, gTrue, gTrue, thinLineMode);
splashOut->startDoc(pageJob.doc);
savePageSlice(pageJob.doc, splashOut, pageJob.pg, x, y, w, h, pageJob.pg_w, pageJob.pg_h, pageJob.ppmFile);
@@ -368,6 +372,15 @@ int main(int argc, char *argv[]) {
fprintf(stderr, "Bad '-aaVector' value on command line\n");
}
}
+ if (thinLineModeStr[0]) {
+ if (strcmp(thinLineModeStr, "solid") == 0) {
+ thinLineMode = splashThinLineSolid;
+ } else if (strcmp(thinLineModeStr, "shape") == 0) {
+ thinLineMode = splashThinLineShape;
+ } else if (strcmp(thinLineModeStr, "none") != 0) {
+ fprintf(stderr, "Bad '-thinlinemode' value on command line\n");
+ }
+ }
if (quiet) {
globalParams->setErrQuiet(quiet);
}
@@ -444,7 +457,7 @@ int main(int argc, char *argv[]) {
(jpegcmyk || overprint) ? splashModeDeviceN8 :
#endif
splashModeRGB8, 4,
- gFalse, paperColor);
+ gFalse, paperColor, gTrue, gTrue, thinLineMode);
splashOut->startDoc(doc);
#endif // UTILS_USE_PTHREADS
More information about the poppler
mailing list