PDFLIB - using default PostScript fonts

Tom Melhuish tmelhuish at WEBINSIGHTSINC.COM
Wed May 3 06:55:37 EDT 2006


I can not get the default postscript fonts in pdflib to display in mapserver
(i.e. Times-Roman).  I read the “PDF Output” document but don’t see how to
make the link to the default PostScript fonts that the document describes. I
assume Label->Type->Times-Roman but this doesn’t work. I am able to get
TrueType fonts to work by calling them through the font.list which seams to
be able to only call TrueType fonts. The TrueType fonts create a large pdf
file and I was hoping to use postscript fonts to make the file smaller.

I configured mapserver 4.8.3 as:
./configure --with-postgis=/usr/local/pgsql/bin/pg_config --with-proj --with
-wmsclient --with-jpeg=/usr/local --with-gd=/usr/local --with-gdal=/usr/loca
l/bin/gdal-config --with-php=/usr/local/include/php --with-pdf=/usr/local --
with-libwww=/usr/local --without-tiff --enable-debug --enable-force-freetype
1

I configure PDFlib-Lite-6.0.3
./configure --prefix=/usr/local

My mapfile layer is as follows:

OUTPUTFORMAT
        NAME pdf
        DRIVER  "pdf"
        MIMETYPE "application/pdf"
        IMAGEMODE RGB
        EXTENSION "pdf"
  END
  IMAGETYPE pdf

LAYER
    NAME "parcel_anno"
    STATUS ON
   #Get data from Shapefile
    DATA "parcels"
    TYPE ANNOTATION
    CLASSITEM "tag"
    LABELITEM "tag"
    LABELMAXSCALE 1500
    TEMPLATE "ttt.html"
    CLASS
      LABEL
        FONT Times-Roman
	  #TYPE BITMAP (I tried this but had no effect)
        SIZE LARGE
        POSITION CC
        MINDISTANCE 150
        MINFEATURESIZE 25
        COLOR 0 102 0
      END
    END
END

Thanks -- Tom



More information about the mapserver-users mailing list