utils/pdftops.cc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/utils/pdftops.cc b/utils/pdftops.cc index babebed..ad21add 100644 --- a/utils/pdftops.cc +++ b/utils/pdftops.cc @@ -95,6 +95,8 @@ static GBool noEmbedTTFonts = gFalse; static GBool noEmbedCIDPSFonts = gFalse; static GBool noEmbedCIDTTFonts = gFalse; static GBool fontPassthrough = gFalse; +static char antialiasStr[16] = ""; +static char vectorAntialiasStr[16] = ""; static GBool preload = gFalse; static char paperSize[15] = ""; static int paperWidth = -1; @@ -154,6 +156,10 @@ static const ArgDesc argDesc[] = { "don't embed CID TrueType fonts"}, {"-passfonts", argFlag, &fontPassthrough,0, "don't substitute missing fonts"}, + {"-aa", argString, antialiasStr, sizeof(antialiasStr), + "enable font anti-aliasing: yes, no"}, + {"-aaVector", argString, vectorAntialiasStr, sizeof(vectorAntialiasStr), + "enable vector anti-aliasing: yes, no"}, {"-preload", argFlag, &preload, 0, "preload images and forms"}, {"-paper", argString, paperSize, sizeof(paperSize), @@ -310,6 +316,22 @@ int main(int argc, char *argv[]) { if (fontPassthrough) { globalParams->setPSFontPassthrough(fontPassthrough); } + if (antialiasStr[0]) { + if (!globalParams->setAntialias(antialiasStr)) { + fprintf(stderr, "Bad '-aa' value on command line\n"); + } + if (globalParams->getAntialias()) { + globalParams->setAntialiasPrinting(gTrue); + } + } + if (vectorAntialiasStr[0]) { + if (!globalParams->setVectorAntialias(vectorAntialiasStr)) { + fprintf(stderr, "Bad '-aaVector' value on command line\n"); + } + if (globalParams->getVectorAntialias()) { + globalParams->setAntialiasPrinting(gTrue); + } + } if (preload) { globalParams->setPSPreload(preload); }