"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "xpdf/pdftops.cc" between
xpdf-4.03.tar.gz and xpdf-4.04.tar.gz

About: Xpdf is a PDF viewer for X.

pdftops.cc  (xpdf-4.03):pdftops.cc  (xpdf-4.04)
skipping to change at line 67 skipping to change at line 67
static int paperHeight = 0; static int paperHeight = 0;
static GBool noCrop = gFalse; static GBool noCrop = gFalse;
static GBool expand = gFalse; static GBool expand = gFalse;
static GBool noShrink = gFalse; static GBool noShrink = gFalse;
static GBool noCenter = gFalse; static GBool noCenter = gFalse;
static GBool pageCrop = gFalse; static GBool pageCrop = gFalse;
static GBool userUnit = gFalse; static GBool userUnit = gFalse;
static GBool duplex = gFalse; static GBool duplex = gFalse;
static char ownerPassword[33] = "\001"; static char ownerPassword[33] = "\001";
static char userPassword[33] = "\001"; static char userPassword[33] = "\001";
static GBool verbose = gFalse;
static GBool quiet = gFalse; static GBool quiet = gFalse;
static char cfgFileName[256] = ""; static char cfgFileName[256] = "";
static GBool printVersion = gFalse; static GBool printVersion = gFalse;
static GBool printHelp = gFalse; static GBool printHelp = gFalse;
static ArgDesc argDesc[] = { static ArgDesc argDesc[] = {
{"-f", argInt, &firstPage, 0, {"-f", argInt, &firstPage, 0,
"first page to print"}, "first page to print"},
{"-l", argInt, &lastPage, 0, {"-l", argInt, &lastPage, 0,
"last page to print"}, "last page to print"},
skipping to change at line 135 skipping to change at line 136
{"-pagecrop", argFlag, &pageCrop, 0, {"-pagecrop", argFlag, &pageCrop, 0,
"treat the CropBox as the page size"}, "treat the CropBox as the page size"},
{"-userunit", argFlag, &userUnit, 0, {"-userunit", argFlag, &userUnit, 0,
"honor the UserUnit"}, "honor the UserUnit"},
{"-duplex", argFlag, &duplex, 0, {"-duplex", argFlag, &duplex, 0,
"enable duplex printing"}, "enable duplex printing"},
{"-opw", argString, ownerPassword, sizeof(ownerPassword), {"-opw", argString, ownerPassword, sizeof(ownerPassword),
"owner password (for encrypted files)"}, "owner password (for encrypted files)"},
{"-upw", argString, userPassword, sizeof(userPassword), {"-upw", argString, userPassword, sizeof(userPassword),
"user password (for encrypted files)"}, "user password (for encrypted files)"},
{"-verbose", argFlag, &verbose, 0,
"print per-page status information"},
{"-q", argFlag, &quiet, 0, {"-q", argFlag, &quiet, 0,
"don't print any messages or errors"}, "don't print any messages or errors"},
{"-cfg", argString, cfgFileName, sizeof(cfgFileName), {"-cfg", argString, cfgFileName, sizeof(cfgFileName),
"configuration file to use in place of .xpdfrc"}, "configuration file to use in place of .xpdfrc"},
{"-v", argFlag, &printVersion, 0, {"-v", argFlag, &printVersion, 0,
"print copyright and version info"}, "print copyright and version info"},
{"-h", argFlag, &printHelp, 0, {"-h", argFlag, &printHelp, 0,
"print usage information"}, "print usage information"},
{"-help", argFlag, &printHelp, 0, {"-help", argFlag, &printHelp, 0,
"print usage information"}, "print usage information"},
skipping to change at line 234 skipping to change at line 237
if (doForm && level < psLevel2) { if (doForm && level < psLevel2) {
fprintf(stderr, "Error: forms are only available with Level 2 output.\n"); fprintf(stderr, "Error: forms are only available with Level 2 output.\n");
exit(1); exit(1);
} }
mode = doEPS ? psModeEPS mode = doEPS ? psModeEPS
: doForm ? psModeForm : doForm ? psModeForm
: psModePS; : psModePS;
fileName = argv[1]; fileName = argv[1];
// read config file // read config file
if (cfgFileName[0] && !pathIsFile(cfgFileName)) {
error(errConfig, -1, "Config file '{0:s}' doesn't exist or isn't a file",
cfgFileName);
}
globalParams = new GlobalParams(cfgFileName); globalParams = new GlobalParams(cfgFileName);
#if HAVE_SPLASH #if HAVE_SPLASH
globalParams->setupBaseFonts(NULL); globalParams->setupBaseFonts(NULL);
#endif #endif
if (paperSize[0]) { if (paperSize[0]) {
if (!globalParams->setPSPaperSize(paperSize)) { if (!globalParams->setPSPaperSize(paperSize)) {
fprintf(stderr, "Invalid paper size\n"); fprintf(stderr, "Invalid paper size\n");
goto err0; goto err0;
} }
} else { } else {
skipping to change at line 294 skipping to change at line 301
globalParams->setPSEmbedCIDTrueType(!noEmbedCIDTTFonts); globalParams->setPSEmbedCIDTrueType(!noEmbedCIDTTFonts);
} }
if (preload) { if (preload) {
globalParams->setPSPreload(preload); globalParams->setPSPreload(preload);
} }
#if OPI_SUPPORT #if OPI_SUPPORT
if (doOPI) { if (doOPI) {
globalParams->setPSOPI(doOPI); globalParams->setPSOPI(doOPI);
} }
#endif #endif
if (verbose) {
globalParams->setPrintStatusInfo(verbose);
}
if (quiet) { if (quiet) {
globalParams->setErrQuiet(quiet); globalParams->setErrQuiet(quiet);
} }
// open PDF file // open PDF file
if (ownerPassword[0] != '\001') { if (ownerPassword[0] != '\001') {
ownerPW = new GString(ownerPassword); ownerPW = new GString(ownerPassword);
} else { } else {
ownerPW = NULL; ownerPW = NULL;
} }
skipping to change at line 340 skipping to change at line 350
psFileName = new GString(argv[2]); psFileName = new GString(argv[2]);
} else { } else {
p = fileName + strlen(fileName) - 4; p = fileName + strlen(fileName) - 4;
if (strlen(fileName) > 4 && (!strcmp(p, ".pdf") || !strcmp(p, ".PDF"))) { if (strlen(fileName) > 4 && (!strcmp(p, ".pdf") || !strcmp(p, ".PDF"))) {
psFileName = new GString(fileName, (int)strlen(fileName) - 4); psFileName = new GString(fileName, (int)strlen(fileName) - 4);
} else { } else {
psFileName = new GString(fileName); psFileName = new GString(fileName);
} }
psFileName->append(doEPS ? ".eps" : ".ps"); psFileName->append(doEPS ? ".eps" : ".ps");
} }
if (psFileName->cmp("-") == 0) {
globalParams->setPrintStatusInfo(gFalse);
}
// get page range // get page range
if (firstPage < 1) { if (firstPage < 1) {
firstPage = 1; firstPage = 1;
} }
if (lastPage < 1 || lastPage > doc->getNumPages()) { if (lastPage < 1 || lastPage > doc->getNumPages()) {
lastPage = doc->getNumPages(); lastPage = doc->getNumPages();
} }
// check for multi-page EPS or form // check for multi-page EPS or form
 End of changes. 5 change blocks. 
0 lines changed or deleted 13 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)