File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes PDF with Question marks Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "PDF with Question marks" Watch "PDF with Question marks" New topic

PDF with Question marks

Kavya Anjali
Ranch Hand

Joined: Mar 23, 2006
Posts: 30
We are facing one issue in the production .

In our application we are generating PDF using FOP. Now this functionality is working fine on the staging server but same is giving problem on the production server.

On the staging/ UAT server PDF is generated fine, but same PDF is generated with question marks (?) in the production.

I am not able to add the pdf files over here. One is generated on the staging server and other is generated on the staging one is containing Question marks.

I will show the relevant parts where there are differences:
ABC, Inc. (Buyer) on UAT but ABC? (Buyer)
It seems to me that the spaces are being converted to ? marks...

Any suggestions on this are welcome
[ November 05, 2006: Message edited by: Bear Bibeault ]

SCJP 5.0
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
Usually, question marks are a sign that for some characters in the source text there are no characters in the font that is used to generate the PDF. Now, for a space symbol that shouldn't happen. Have you ascertained that the sequence of characters contains only exactly the characters that you think it contains, i.e. that there are no control characters or characters higher than ASCII 127? I would also check whether the fonts being used on both machines are identical, and that they have the same selection of fonts available.
[ November 02, 2006: Message edited by: Ulf Dittmer ]
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13035
Sure sounds like a font problem to me too. How is the original text being generated? Is there a Microsoft Word document with those annoying "smart" punctuation characters involved somewhere.

I agree. Here's the link:
subject: PDF with Question marks
It's not a secret anymore!