#18 how to write special characters with PDPageContentStream?

open
nobody
None
5
2007-02-11
2007-02-11
RansAckeR
No

When using PDPageContentStream.drawString() characters such as é,ë,ï don't get printed or get replaced by another character.

I assume another encoding must be used?
Where can the encoding be changed?

The following code would sound logic to change the encoding but it doesn't seem to work;

..
PDFont font = PDType1Font.TIMES_ROMAN
font.setEncoding(New encoding.MacRomanEncoding)
newStream.setFont(font, 8)
..
newStream.drawString("é")
..

An example would be greatly appreciated.

Discussion