Forum How do I...?

Fedora Installation

epanagio
On a new system, yet again.

prince -i index.php -o test.pdf
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 72: non-double matrix element
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 72: non-double matrix element
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 80: saw unknown, expected number
prince: error: no input documents to process

I just set up this virtual server. I hope I am not in trouble here.

Thanks,

Evan
mikeday
This is the relevant error message:
prince: error: no input documents to process

The -i option (or --input) is only used to specify the document type, eg. -i html or -i xml. So you probably want:
prince -i html index.php -o test.pdf
epanagio
Strange,

I saw those warnings and I got confused. I issued: prince index.php -o test.pdf and it produced the test.pdf file but it also hands for a little and then spews these errors:

prince index.php
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 72: non-double matrix element
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 72: non-double matrix element
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 80: saw unknown, expected number
prince: http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd:31: error: xmlParseEntityDecl: entity HTML.Version not terminated
prince: http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd:31: error: Content error in the external subset
prince: index.php:27: error: StartTag: invalid element name
prince: index.php:31: error: StartTag: invalid element name
prince: index.php:38: error: Opening and ending tag mismatch: link line 18 and head
prince: index.php:46: error: EntityRef: expecting ';'
prince: index.php:65: error: Opening and ending tag mismatch: input line 65 and p
prince: index.php:67: error: Opening and ending tag mismatch: input line 67 and p
prince: index.php:68: error: Opening and ending tag mismatch: input line 68 and p
prince: index.php:69: error: Opening and ending tag mismatch: p line 68 and form
prince: index.php:70: error: Opening and ending tag mismatch: br line 67 and div
prince: index.php:72: error: Opening and ending tag mismatch: p line 67 and div
prince: index.php:85: error: Opening and ending tag mismatch: br line 81 and center
prince: index.php:86: error: Opening and ending tag mismatch: br line 80 and div
prince: index.php:87: error: Opening and ending tag mismatch: center line 77 and div
prince: index.php:88: error: Opening and ending tag mismatch: br line 76 and div
prince: index.php:89: error: Opening and ending tag mismatch: div line 75 and body
prince: index.php:90: error: Opening and ending tag mismatch: div line 74 and html
prince: index.php:90: error: Premature end of data in tag br line 66
prince: index.php:90: error: Premature end of data in tag br line 65
prince: index.php:90: error: Premature end of data in tag p line 65
prince: index.php:90: error: Premature end of data in tag form line 64
prince: index.php:90: error: Premature end of data in tag div line 63
prince: index.php:90: error: Premature end of data in tag div line 62
prince: index.php:90: error: Premature end of data in tag div line 51
prince: index.php:90: error: Premature end of data in tag body line 39
prince: index.php:90: error: Premature end of data in tag link line 17
prince: index.php:90: error: Premature end of data in tag head line 16
prince: index.php:90: error: Premature end of data in tag html line 15
prince: index.php: error: could not load input file
prince: error: no input documents to process


Then I create this file:

<html>
<head><title>hdgdgdg</title></head>
<body>;ksdlksjdlksjdflksjdf</body>
</html>

Then I try to convert it to pdf and:

prince test.html
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 72: non-double matrix element
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 72: non-double matrix element
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 80: saw unknown, expected number
prince: internal error: no available fonts

We will try to install these infamous fonts and try this again.
mikeday
Yes you will definitely need to install some fonts. :D

The errors for the first example are because Prince is assuming the input document is XML, when it actually isn't. Future versions of Prince will check more carefully for unrecognised file extensions, but in the meantime you can specify -i html when processing PHP files.