Forum How do I...?

Incorrect display of the copyright symbol.

jkozar
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.

We had started a different topic regarding the incorrect display of check boxes with check marks. We ended up resolving that issue by installing a font that include the glyphs and referencing it in fonts.css.

The check box with the check in it is correctly displayed regardless of whether prince is invoked via the command line or via the web through our java servlet.

The copyright symbol is also displayed correctly when prince is executed from the command like. However, we are running into problems with the display of the copyright symbol when prince is invoked via the java servlet. In the pdf document that is generated the copyright symbol appears as:

©

We have tried the following to represent the symbol:

©
©
©

All three methods are correctly displayed when invoked via the command line.

We have tried other symbols that use & such as &gt and &lt and they are correctly displayed using either method.

Do you have any ideas as to why the copyright symbol is not being displayed correctly?

The following is the source that is used when calling prince via the command line. Note that although this page has a "Print to PDF" button it is not intended to be printed to pdf via the web.

http://acgidev.acgisoftware.com/copyright_cmd.html

The following is the pdf that is generated when calling prince via the command line with the above source:

http://acgidev.acgisoftware.com/copyright_cmd.pdf

The following is the source that is used to call the java servlet:

http://acgidev.acgisoftware.com/copyright_java.html

You can click on the "Print to PDF" button displayed by the above URL to generate the PDF via the java servlet.
mikeday
How is the servlet generating the HTML that is sent to Prince? I would suspect that somewhere along the way it is using the wrong character encoding.
kbrewer
We were able to resolve the issue by adding the following in the servlet:

request.setCharacterEncoding("UTF-8");
jkozar
The glyphs are now displaying correctly, but now all of the css is being ignored.

An example link is here: http://acgidev.acgisoftware.com/comap-422.html

The PDF I get when printing to acrobat is here: http://acgidev.acgisoftware.com/comap-422.pdf


Any insight?
jim_albright
Usually that is the case when there is an error in the CSS.

Jim Albright
Wycliffe Bible Translators

jkozar
jim_albright wrote:
Usually that is the case when there is an error in the CSS.



I tried a stripped down version with one css rule and I get the same result...so it is not a css error.

Thanks though.