Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ghostscript / htmldoc font alias problem
#1

I need to define a font alias for htmldoc ghostscript on a Debian Etch Linux system running LAMPP in /opt/lampp.

There are actually two conversions done, first from HTML to Postscript, using htmldoc, then from PS to PDF using ghostscript. htmldoc and gs are called from a perl script running unter apache in /opt/lampp . I would rather have only one step, but htmldoc can not produce CMYK PDF. Htmldoc also seems to support only a predefined set of font names, so I decided to use Courier where Arnold Boecklin is needed.

 

I installed the Arnold Boecklin font to /usr/share/fonts/type1/gsfonts, defined it as /ArnoldBoeD in /var/lib/defoma/gs.d/dirs/fonts/Fontmap and changed the /Courier alias from Nimbus-something to /ArnoldBoeD.

While GS prints a message that it is using ArnoldBoeD instead of Courier, the resulting PDF contains the real Courier font. As I tell htmldoc to embed the fonts, this is probably where the substitution fails. Command lines see below.

 

I also replaced the courier font files (n022003l.pfb as well as the htmldoc fonts, see below) with renamed ArnoldBoeD files. Still this does not help the PDF, although I can see the Arnold Boecklin font instead of Courier in my X11 window title bars.

htmldoc and gs are called from a perl script running unter apache in /opt/lampp , but if called manually from a root console, it does not make any difference.

 

What files and directories did I probably miss to edit?

 

Thanks in advance for your help!

 

 

 

 

First step:

htmldoc --format ps3 -f "temp/Katalog-021.ps" --bodyimage "temp/katalog-head.jpg" --webpage --no-title --size A4 --left 0.50in --right 0.50in --top 0.50in --bottom 0.50in --header ... --header1 ... --footer .1. --nup 1 --tocheader .t. --tocfooter ..i --portrait --color --no-pscommands --no-xrxcomments --no-compression --jpeg=0 --fontsize 10.0 --fontspacing 1.2 --headingfont Courier --bodyfont Courier --headfootsize 11.0 --headfootfont Helvetica --charset iso-8859-1 --links --embedfonts --pagemode document --pagelayout single --firstpage p1 --pageeffect none --pageduration 10 --effectduration 1.0 --no-encryption --permissions all --owner-password \"\" --user-password "" --browserwidth 680 --no-strict --no-overflow temp/Katalog-021.html

 

Second step:

gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite "-sOutputFile=temp/Katalog-021.pdf" -dProcessColorModel=/DeviceCMYK -f "temp/Katalog-021.ps"

 

 

 

New files in

/usr/local/share/fonts/type1/gsfonts

arndboen.afm

arndboen.pfb

arndboen.pfm

arndboen.ttf

n022003l.pfb

 

Replaced files

/opt/lampp/lib/fonts/Courier.afm

/usr/share/htmldoc/fonts/Courier.pfa

/usr/share/htmldoc/fonts/Courier.pfb

/usr/share/htmldoc/fonts/Courier.pfm

/usr/share/htmldoc/fonts/Courier.ttf

 

New and edited lines in /var/lib/defoma/gs.d/dirs/fonts/Fontmap

 

/ArnoldBoeD (arndboen.pfb) ;

/Courier /ArnoldBoeD ;

Reply
#2

font problem update - htmldoc 1.9 shows font but no umlaut chars

 

After installing htmldoc 1.9 (no Debian package yet, had to compile from source), the font shows in the PDF ( One great step forward ;) ) - except for German umlaut characters, although they do show in X windows titles.

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)