diff --git a/tools/tiff2ps.c b/tools/tiff2ps.c index 65711857..92ab85a9 100644 --- a/tools/tiff2ps.c +++ b/tools/tiff2ps.c @@ -1,4 +1,4 @@ -/* $Header: /cvs/maptools/cvsroot/libtiff/tools/tiff2ps.c,v 1.17 2003-05-07 08:12:30 dron Exp $ */ +/* $Header: /cvs/maptools/cvsroot/libtiff/tools/tiff2ps.c,v 1.18 2003-08-08 19:46:20 dron Exp $ */ /* * Copyright (c) 1988-1997 Sam Leffler @@ -584,6 +584,21 @@ TIFF2PS(FILE* fd, TIFF* tif, float pw, float ph, double lm, double bm, int cnt) tf_bytesperrow = TIFFScanlineSize(tif); npages++; fprintf(fd, "%%%%Page: %d %d\n", npages, npages); + if (!generateEPSF && ( level2 || level3 )) { + float psw,psh; + if (pw!=0 && ph!=0) { + psw=pw; + psh=ph; + + } + else { + psw=rotate ? prh:prw; + psh=rotate ? prw:prh; + } + fprintf(fd, + "1 dict begin /PageSize [ %f %f ] def currentdict end setpagedevice\n", + psw, psh); + } fprintf(fd, "gsave\n"); fprintf(fd, "100 dict begin\n"); if (pw != 0 && ph != 0) { @@ -1027,7 +1042,7 @@ PS_Lvl2ImageDict(FILE* fd, TIFF* tif, uint32 w, uint32 h) if ( level3 ) { TIFFGetFieldDefaulted(tif, TIFFTAG_PREDICTOR, &predictor); if (predictor > 1) { - fprintf(fd, "\t % PostScript Level 3 only."); + fprintf(fd, "\t %% PostScript Level 3 only."); fputs("\n\t<<\n", fd); fprintf(fd, "\t /Predictor %u\n", predictor); fprintf(fd, "\t /Columns %lu\n",