Forum How do I...?

Glyphs on a Unix Install

jkozar
I am using the following css:

input[type="checkbox"][checked] {
content: "\2714";

but getting this result when printing the pdf: âÂoe”

We are using Solaris 10.

We have j2ee program which is deployed as an OC4J instance in Oracle's Application Server 10.1.2.3. This j2ee program invokes the prince executable.

The environmental variables to set unicode in the environment are set:

$ locale
LANG=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
LC_NUMERIC=en_US.UTF-8
LC_TIME=en_US.UTF-8
LC_COLLATE=en_US.UTF-8
LC_MONETARY=en_US.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_ALL=en_US.UTF-8

The character maps available are:

$ locale -m
iso_8859_1/charmap.src
en_US.UTF-8/charmap.src


My test link is set up here:

http://acgidev.acgisoftware.com/comap-pdf.html

I also noticed that page-breaks do not work in web-kit...I think this is a web-kit issue though...can anyone confirm this?


Any information or wisdom would be greatly appreciated.

Thanks!!!
mikeday
Try running Prince from the command line on your file, and check whether it is being parsed as XML/XHTML or HTML. If HTML, make sure it has the appropriate meta tag specifying UTF-8 encoding early in the document head.
jkozar
How do I run the program from the command line? I have tried every doc type by the way and I have the correct meta tag in the document head.

Thanks!!!
mikeday
Try this:
/usr/local/bin/prince doc.html -o doc.pdf

You can pass "-i xml" or "-i html" to force a particular interpretation, otherwise Prince will look at the document to figure out how to parse it. Running Prince from the command line is a good way to take other server factors out of consideration when debugging charset or font issues.
jkozar
Thanks Mike!! I will let you know how it goes.
jkozar
One of our engineers ran Prince from the command line. These are his findings:

prince: warning: no glyphs for character U+2714, fallback to '?'

*** Mercury runtime: caught segmentation violation ***
cause: address not mapped to object
PC at signal: -45932336 (fd4320d0)
address involved: 0
This may have been caused by a stack overflow, due to unbounded recursion.
exiting from signal handler


I also tried it with a file with just the letter A in it and received the following:

*** Mercury runtime: caught segmentation violation ***
cause: address not mapped to object
PC at signal: -45932336 (fd4320d0)
address involved: 0
This may have been caused by a stack overflow, due to unbounded recursion.
exiting from signal handler


Other people have run into this run time error via the command line but not via HTTP but I have not found a reason. If the glyphs warning is not enough and we still need to run it from the command line then we may need some help from Prince.



Do you have any insight based on the error messages?

Thanks!!!
mikeday
Is this running on the same machine as when you run Prince from Java? Is this a Solaris 10 Intel machine, or Sparc machine? Do you get the same error message when you run "prince --version"? What if you run it on a simple document with the --no-system-fonts option?
jkozar
We have resolved the issue regarding the incorrect display of the check mark by installing a unicode font on the Solaris server and referencing it in fonts.css.

The prince error when run via the command line appears to be a permission or environmental variable related problem because we have determined that we can execute it manually while logged in as root without error. Also, another installation of prince on another server works fine when run manually regardless of who is logged in.

Please consider this topic close. We do have another issue but will open a new topic for it.

Thank you.