$NetBSD$ --- pdftops/Params.cxx.orig 2001-12-07 22:02:11.000000000 +0100 +++ pdftops/Params.cxx @@ -6,14 +6,14 @@ // //======================================================================== #include #include #include #include -#include "gtypes.h" -#include "gmem.h" -#include "GString.h" -#include "gfile.h" +#include +#include +#include +#include #include "Params.h" char **fontPath = NULL; @@ -23,7 +23,7 @@ DevFontMapEntry *devFontMap = NULL; static int devFontMapLen, devFontMapSize; void initParams(char *userConfigFile, char *sysConfigFile) { - GString *fileName; + GooString *fileName; FILE *f; char buf[256]; char *p, *q; $NetBSD$ --- pdftops/Params.h.orig 2001-12-07 22:02:11.000000000 +0100 +++ pdftops/Params.h @@ -9,7 +9,7 @@ #ifndef PARAMS_H #define PARAMS_H -#include "gtypes.h" +#include // If this is set, error messages will be silently discarded. extern GBool errQuiet; $NetBSD$ --- pdftops/pdftops.cxx.orig 2005-01-03 20:29:58.000000000 +0100 +++ pdftops/pdftops.cxx @@ -36,19 +36,19 @@ #include #include #include "parseargs.h" -#include "GString.h" -#include "gmem.h" -#include "Object.h" -#include "Stream.h" -#include "Array.h" -#include "Dict.h" -#include "XRef.h" -#include "Catalog.h" -#include "Page.h" -#include "PDFDoc.h" -#include "PSOutputDev.h" -#include "Params.h" -#include "Error.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +//#include +#include #include "config.h" #include @@ -63,8 +63,8 @@ main(int argc, // I - Number of comm char *argv[]) // I - Command-line arguments { PDFDoc *doc; // Input file - GString *fileName; // Input filename - GString *psFileName; // Output filename + GooString *fileName; // Input filename + GooString *psFileName; // Output filename PSLevel level; // PostScript level PSOutputDev *psOut; // Output device int num_options; // Number of options @@ -110,9 +110,9 @@ main(int argc, // I - Number of comm fwrite(buffer, 1, bytes, fp); fclose(fp); - fileName = new GString(tempfile); + fileName = new GooString(tempfile); } else { - fileName = new GString(argv[6]); + fileName = new GooString(argv[6]); tempfile[0] = '\0'; } @@ -285,7 +285,14 @@ main(int argc, // I - Number of comm globalParams->setPSPaperHeight(length); globalParams->setPSImageableArea(left, bottom, right, top); globalParams->setPSDuplex(duplex); - globalParams->setPSFit(fit); + if (fit) { + /* XXX Is this PSFit? */ + globalParams->setPSShrinkLarger(gTrue); + globalParams->setPSExpandSmaller(gTrue); + } else { + globalParams->setPSShrinkLarger(gFalse); + globalParams->setPSExpandSmaller(gFalse); + } globalParams->setPSLevel(level); globalParams->setPSASCIIHex(level == psLevel1); globalParams->setPSEmbedType1(1); @@ -304,14 +311,14 @@ main(int argc, // I - Number of comm if (doc->isOk() && doc->okToPrint()) { // CUPS always writes to stdout... - psFileName = new GString("-"); + psFileName = new GooString("-"); // write PostScript file psOut = new PSOutputDev(psFileName->getCString(), doc->getXRef(), doc->getCatalog(), 1, doc->getNumPages(), - psModePS); + psModePS, width, length); if (psOut->isOk()) - doc->displayPages(psOut, 1, doc->getNumPages(), 72, 72, 0, gFalse); + doc->displayPages(psOut, 1, doc->getNumPages(), 72, 72, 0, gFalse, gFalse); delete psOut; // clean up $NetBSD$ --- pdftops/parseargs.h.orig 2003-07-20 02:30:56.000000000 +0200 +++ pdftops/parseargs.h @@ -13,7 +13,7 @@ extern "C" { #endif -#include "gtypes.h" +#include /* * Argument kinds. $NetBSD$ --- pdftops/Makefile.orig 2005-01-03 20:29:58.000000000 +0100 +++ pdftops/Makefile @@ -10,56 +10,13 @@ include ../Makedefs +LIBS+= -lpoppler + # # Object files... # -LIBOBJS = \ - Annot.o \ - Array.o \ - BuiltinFont.o \ - BuiltinFontTables.o \ - Catalog.o \ - CharCodeToUnicode.o \ - CMap.o \ - Decrypt.o \ - Dict.o \ - Error.o \ - FontEncoding.o \ - FontEncodingTables.o \ - FontFile.o \ - Function.o \ - gfile.o \ - Gfx.o \ - GfxFont.o \ - GfxState.o \ - GHash.o \ - GList.o \ - GlobalParams.o \ - gmem.o \ - gmempp.o \ - GString.o \ - JBIG2Stream.o \ - Lexer.o \ - Link.o \ - NameToCharCode.o \ - Object.o \ - Outline.o \ - OutputDev.o \ - Page.o \ - Params.o \ - parseargs.o \ - Parser.o \ - PDFDoc.o \ - PDFDocEncoding.o \ - PSOutputDev.o \ - PSTokenizer.o \ - Stream.o \ - UnicodeMap.o \ - XRef.o - - -OBJS = pdftops.o $(LIBOBJS) +OBJS = pdftops.o Params.o parseargs.o $(LIBOBJS) # # Make everything... @@ -99,9 +56,9 @@ install: all # pdftops # -pdftops: libxpdf.a pdftops.o ../cups/$(LIBCUPS) +pdftops: ${OBJS} ../cups/$(LIBCUPS) echo Linking $@... - $(CXX) $(LDFLAGS) -o $@ pdftops.o libxpdf.a $(LIBS) $(CXXLIBS) -lm + $(CXX) $(LDFLAGS) -o $@ ${OBJS} $(LIBS) $(CXXLIBS) -lm # @@ -119,7 +76,7 @@ libxpdf.a: $(LIBOBJS) # Dependencies... # -include Dependencies +#include Dependencies #