xmlgraphics-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "chris@TS" <c.reu...@testingsolutions.de>
Subject Text incorrectly positioned in EPS output
Date Thu, 18 Sep 2008 16:53:18 GMT

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.


---------------------------------------------------------------------
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