arabic pdf

2004-12-25 Thread nafise hassani
Anybody knows how to Create PDF with Arabic words? Seems FOP-0.20.5 cannot handle Arabic glyphs/ligature properly. It can only display the Arabic characters but the rules to ligate them together cannot be displayed.Any other software or tool that we can use for this kind of task?  __Do You Yahoo!?Tired of spam?  Yahoo! Mail has the best spam protection around http://mail.yahoo.com 

Re: arabic pdf

2004-12-25 Thread Glen Mazza
The squeaky wheel doesn't always get the grease.  Send
your question to FOP-USER.

Glen

--- nafise hassani [EMAIL PROTECTED] wrote:

  Anybody knows how to Create PDF with Arabic words? 
 
 Seems FOP-0.20.5 cannot handle Arabic
 glyphs/ligature properly. It can only display the
 Arabic characters but the rules to ligate them
 together cannot be displayed.
 
 Any other software or tool that we can use for this
 kind of task?  
 
 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam
 protection around 
 http://mail.yahoo.com 



GraphicsEnvironment, GraphicsDevice and Graphics2D

2004-12-25 Thread Peter B. West
Jeremias or Thomas in particular, help!
I'm having trouble working out the relationships between the various 
parts of Java2D, especially as regards the bits named above.  At the end 
of the day, the Graphics2D-GraphicsDevice combination is central to the 
2D rendering process.

One instantiates a BufferedImage without specifically referring to any 
elements of the GraphicsEnvironment, as for example in 
PDFGraphicsConfiguration:

class PDFGraphicsConfiguration extends GraphicsConfiguration {
// We use this to get a good colormodel..
private static final BufferedImage BI_WITH_ALPHA =
new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB);
// We use this to get a good colormodel..
private static final BufferedImage BI_WITHOUT_ALPHA =
new BufferedImage(1, 1, BufferedImage.TYPE_INT_RGB);
...
}
From the instance of BufferedImage, we can get a Graphics2D instance:
BufferedImage bufim = new
BufferedImage(1,1,BufferedImage.TYPE_INT_ARGB);
Graphics2D g2D = bufim.createGraphics();
From the Graphics2D, we get a GraphicsConfiguration and a 
FontRenderContext:

GraphicsConfiguration grconf = g2D.getDeviceConfiguration();
FontRenderContext frc = g2D.getFontRenderContext();
The GraphicsConfiguration gets us back to the GraphicsDevice:
GraphicsDevice grdev = getDevice();
The GraphicsDevice won't take us back to its GraphicsEnvironment.
The implication of all of this, for me, is that a BufferedImage is not 
created ex nihilo, but out of an understood context of GEnv, GDev and GConf.

GraphicsEnvironment provides a static method for retrieving the 
underlying GraphicsEnvironment:

GraphicsEnvironment grenv =
GraphicsEnvironment.getLocalGraphicsEnvironment()
Given a GraphicsEnvironment and a BufferedImage, we can go the other way.
BufferedImage bufim = new
BufferedImage(1,1,BufferedImage.TYPE_INT_ARGB);
Graphics2D g2D = grenv.createGraphics(bufim);
All of which seems redundant, given that we can get to a Graphics2d 
directly from a BufferedImage.  I assume, though, that this is the way 
to introduce a foreign GraphicsEnvironment, e.g., 
PDFGraphicsEnvironment.  Is this a fair assessment?

What puzzles me is the circularity of requiring a BufferedImage, with 
its implicit dependency upon getLocalGraphicsEnvironment(), which seems 
to be the only way to directly discover a GraphicsEnvironment.  It's as 
though there is no formal way to introduce your own GraphicsDevices, 
apart from the sleight-of-hand of creating a parasite GEnv/GDev/GConf 
through the reliance on BufferedImage.

What am I missing?
Peter