summaryrefslogtreecommitdiff
path: root/utils/pdftops.cc
diff options
context:
space:
mode:
Diffstat (limited to 'utils/pdftops.cc')
-rw-r--r--utils/pdftops.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/utils/pdftops.cc b/utils/pdftops.cc
index a3cd70da..dae70a8e 100644
--- a/utils/pdftops.cc
+++ b/utils/pdftops.cc
@@ -101,6 +101,7 @@ static bool fontPassthrough = false;
static bool optimizeColorSpace = false;
static bool passLevel1CustomColor = false;
static char rasterAntialiasStr[16] = "";
+static char forceRasterizeStr[16] = "";
static bool preload = false;
static char paperSize[15] = "";
static int paperWidth = -1;
@@ -160,6 +161,8 @@ static const ArgDesc argDesc[] = {
"don't substitute missing fonts"},
{"-aaRaster", argString, rasterAntialiasStr, sizeof(rasterAntialiasStr),
"enable anti-aliasing on rasterization: yes, no"},
+ {"-rasterize", argString, forceRasterizeStr, sizeof(forceRasterizeStr),
+ "control rasterization: always, never, whenneeded"},
{"-optimizecolorspace", argFlag, &optimizeColorSpace,0,
"convert gray RGB images to gray color space"},
{"-passlevel1customcolor", argFlag, &passLevel1CustomColor, 0,
@@ -397,6 +400,20 @@ int main(int argc, char *argv[]) {
}
}
+ if (forceRasterizeStr[0]) {
+ PSForceRasterize forceRasterize = psRasterizeWhenNeeded;
+ if (strcmp(forceRasterizeStr, "whenneeded") == 0) {
+ forceRasterize = psRasterizeWhenNeeded;
+ } else if (strcmp(forceRasterizeStr, "always") == 0) {
+ forceRasterize = psAlwaysRasterize;
+ } else if (strcmp(forceRasterizeStr, "never") == 0) {
+ forceRasterize = psNeverRasterize;
+ } else {
+ fprintf(stderr, "Bad '-rasterize' value on command line\n");
+ }
+ psOut->setForceRasterize(forceRasterize);
+ }
+
if (splashResolution > 0) {
psOut->setRasterResolution(splashResolution);
}