Forum How do I...?

Installed fonts yet still get no available fonts error?

AaronL
Simple test on the ubuntu server still gets "no available fonts" error even though a scan finds them. Installed fonts with apt-get and reboot the server. Any other suggestions?

$ /usr/local/bin/prince --server --javascript --debug "http://google.com" -o "/tmp/test.pdf"
msg|dbg||loading license: /usr/local/license/license.dat
msg|wrn|/usr/local/license/license.dat|could not load /usr/local/license/license.dat
msg|inf||loading style sheet: /usr/local/style/fonts.css
msg|dbg||error loading resource: can't open input file: No such file or directory
sta|Loading document...
msg|inf||loading document: http://google.com
msg|dbg||loaded resource: http://www.google.com/
msg|dbg||loaded resource: type: yes(resource_type("text/html", ["charset" - "iso-8859-1"], html, yes(iso_8859_1)))
msg|inf||loading HTML5 input: http://google.com
msg|inf||loading document: http://google.com
msg|dbg||loaded resource: http://www.google.com/
msg|dbg||loaded resource: type: yes(resource_type("text/html", ["charset" - "iso-8859-1"], html, yes(iso_8859_1)))
msg|dbg||loaded document: http://www.google.com/
msg|dbg||sniffed doctype: XHTML
sta|Running scripts...
msg|wrn||setTimeout is not yet supported
sta|Applying style sheets...
msg|inf||loading style sheet: /usr/local/style/xhtml-ns.css
msg|dbg||error loading resource: can't open input file: No such file or directory
msg|inf||loading style sheet: /usr/local/style/common.css
msg|dbg||error loading resource: can't open input file: No such file or directory
msg|wrn|/usr/local/style/common.css|can't open input file: No such file or directory
msg|wrn|/usr/local/style/xhtml-ns.css|can't open input file: No such file or directory
sta|Preparing document...
msg|inf||loading image: http://www.google.com/images/srpr/nav_logo80.png
msg|dbg||loaded resource: http://www.google.com/images/srpr/nav_logo80.png
msg|dbg||loaded resource: type: yes(resource_type("image/png", [], image(png), no))
sta|Converting document...
msg|dbg||pack
prg|0
msg|dbg||font request: serif
msg|dbg||font scan: serif
msg|dbg||font scan: serif, 0 matches
msg|dbg||font request: arial, sans-serif
msg|dbg||font scan: arial
msg|dbg||font scan: arial, 7 matches
msg|dbg||font scan: sans-serif
msg|dbg||font scan: sans-serif, 0 matches
msg|inf||used font: Arial, Regular
msg|err||no available fonts
mikeday
It looks like the installation is not right, as it cannot find the default style sheets:
msg|inf||loading style sheet: /usr/local/style/fonts.css
msg|dbg||error loading resource: can't open input file: No such file or directory

Did you install Prince from the Ubuntu DEB package?
AaronL
I created a link file to that local location and it worked. However the PDF it's producing is garbled, and includes javascript & css etc. The same code works locally with Prince on a Mac.

I installed it about a month ago and left it due to other concerns. I recall it was a compressed bunch of files with a shell script to configure it. I tried using the debian package and sudo dpkg -i [file] to install it but it hasn't changed the result. Any other tips?
mikeday
The best thing to do is remove the old package by deleting "/usr/local/bin/prince" and "/usr/local/lib/prince" and then check that you are running the newly installed Ubuntu package by running "which prince" (should be /usr/bin/prince) and "prince --version", which should not print any warning messages about being unable to find the license file.
AaronL
Ok I've done pretty much that and it's working now. Our code was referring to the /usr/local/lib/prince for some reason instead of just /usr/bin/prince.

Thanks for your help :)