xmlgraphics-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <...@jeremias-maerki.ch>
Subject Re: Text incorrectly positioned in EPS output
Date Fri, 19 Sep 2008 12:03:16 GMT
Well, I wouldn't say that the EPSDocumentGraphics2D is already suitable
for all applications. The Graphics2D implementation was primarily
written to convert SVG to EPS but it also does a good job with other
graphics used inside FOP. What you're doing here probably needs
debugging. I can take a look at it when I have time if you can send me
some code that demonstrates the problem (i.e. not just the code you
pasted below). I don't want to waste too much time trying to reproduce
the problem just from you description. Thanks.

On 18.09.2008 18:53:18 chris@TS wrote:
> 
> Hello,
> 
> I would highly appreciate if someone helped me with the following problem:
> 
> I have a jPanel containing some subpanels. One of the subpanels contains a
> jTable.
> I try to send the panel contents to an EPS file using the following code:
> 
> 	protected void printComponent(OutputStream out, int width, int height)
> throws IOException {
> 		try {
> 			//Instantiate the EPSDocumentGraphics2D instance
> 			EPSDocumentGraphics2D g2d = new EPSDocumentGraphics2D(false);
> 			g2d.setGraphicContext(new
> org.apache.xmlgraphics.java2d.GraphicContext());
> 			
> 			//Set up the document size
> 			g2d.setupDocument(out, width, height); //400pt x 200pt
>                 
> 			this.contentPane.print(g2d);
> 
> 			//Cleanup
> 			g2d.finish();			
> 		} finally {
> 			IOUtils.closeQuietly(out);
> 		} 
> 	}
> 
> The pane contents are being created correctly except the text strings which
> seem to be rendered all in the top left corner :confused:
> 
> How can I solve this ???
> 
> Thanks in advance for your help !
> 
> chris
> 
> -- 
> View this message in context: http://www.nabble.com/Text-incorrectly-positioned-in-EPS-output-tp19557277p19557277.html
> Sent from the Xml Graphics - General mailing list archive at Nabble.com.
> 



Jeremias Maerki


---------------------------------------------------------------------
Apache XML Graphics Project URL: http://xmlgraphics.apache.org/
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


Mime
View raw message