You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Guy D'haenens <gu...@xplanation.com> on 2002/10/01 12:50:47 UTC

Re: Characters turning into squares

Hey all you guys,
I've performed some testing on this matter.
First of all, I created a test.fo with all the characters I'd like to be
able to print. This fo opens well in any editor that is capable of handling
Unicodce. MSWord for instance will display the contents of test.fo with its
true unicode characters. Printing the fo from Word is fine (all smart quotes
etc are printed correctly).
Then I copied the following files to a newly created directory: test.fo,
arial.xml, arialb.xml, arialbd.xml, arialbi.xml, ariali.xml and
userconfig.xml. Then open the userconfig.xml and change the 'baseDir'
setting to the newly created directory. Save as UTF-8 text!
To actually see what I mean with 'very weird' behaviour, use the following
command at the root of your fop-installation:
fop -awt e:\newdir\test.fo -c e:\newdir\userconfig.xml (where newdir is the
newly created directory).
If you don't want to go through all that hassle, have a look at
printtest.gif. That's a screen capture of the AWT preview. You'll see that
some characters cannot be displayed (they are converted to squares). but it
becomes even more weird when you hit the Print button in the AWT preview
dialog. A lot of characters that were visible in the preview cannot be
printed (squares, again) and others that were squares in the preview get
printed.
There must be something, otherwise others would already have reported. I
hope ;-)
This is extremely important to us because we have created a JAVA and XML
based linguistic editor that is working very well - except for the print,
that is.
Sorry for all the attached files - but I guess it is the only way for you to
test.

----- Original Message -----
From: "J.Pietschmann" <j3...@yahoo.de>
To: <fo...@xml.apache.org>
Sent: Friday, September 27, 2002 8:09 PM
Subject: Re: Characters turning into squares


> Guy D'haenens wrote:
>  > I've run into a very weird problem: all characters in the 'extended'
>  > ANSI-range seem to convert to squares. Hang on, I did use the little
tool
>  > that comes with FOP to create my the Arial.xml. And I have set my
Options
>  > correctly so my userconfig.xml can be used. Printing to AWT is going
well,
>  > both in code and via the command prompt. However, when I hit the
'Print' key
>  > in the AWT preview window, all extended characters, such as dagger,
smart
>  > quotes etc, are printed as a square. Printing directly to the default
printer
>  > also converts those characters to a square. I tried several printers
>  > (postscript, inktjets) with different settings (even 'don't substitute
>  > fonts'). But to no avail. The characters I'm trying getting printed are
>  > included in the font. Using the Arial Unicode MS font (a true Unicode
font!)
>  > did not help. So, my question is: has anybode ever tried to print these
>  > characters and did it work. If it did, what did you do? Or better: what
am I
>  > doing wrong? ;-)
>
> A square usually denotes an unprintable or a null character.
>
> Does it work if you render your data into PDF and print this?
> (it should).
> Can you print the characters from some other application which
> uses the system's printer drivers (like: try MS Word if you
> are on Windows).
>
> Can you print the characters with some Java demo program?
>
> If you are printing on Unix, caveats due to printer filtering
> and such stuff apply, try to get hold of a local guru in this
> case.
>
> J.Pietschmann
>

Re: Characters turning into squares

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Guy D'haenens wrote:
> First of all, I created a test.fo with all the characters I'd like to be
> able to print. This fo opens well in any editor that is capable of handling
> Unicodce. MSWord for instance will display the contents of test.fo with its
> true unicode characters. Printing the fo from Word is fine
So it isn't a printer or printer driver problem. Good.

 > (all smart quotes etc are printed correctly).
Don't utter "smart quotes" if a professional typographer is present,
you might get strangled.

Well, can you do a little bit of Java programming?
First, create a small program which creates a frame and inserts a
label with some of the problematic characters. You can use
arbitrary Unicode characters in a string if you write them
as \u1E80, \u1E81 etc.
If this works, the problem is with FOP, otherwise it's a problem
with your JDK.
Second task: try to print teh same string.

Unfortunately, I can't reproduce your problem at the moment
due to other restrictions.

J.Pietschmann