I have an old Java project I'm getting back to after a couple of years and I see when 
I try to compile with the latest FOP and Batik that the class 
org.apache.batik.gvt.GraphicsNodeRenderContext 
no longer exists in Batik. Can anyone give me some hints on how to change the 
following section of code to set rendering hints the new and improved way using 
whatever replaces 
GraphicsNodeRenderContext?

      java.io.FileOutputStream PdfOutStream = new 
java.io.FileOutputStream(PdfOutFileName); //, "UTF-8");
      //java.io.Writer PdfOutWriter = new java.io.OutputStreamWriter(PdfOutStream, 
"UTF-8");

      PDFDocumentGraphics2D PdfGr2d =
         new PDFDocumentGraphics2D(false, PdfOutStream , 
(int)DrawingWidth,(int)DrawingHeight);
      PdfGr2d.setSVGDimension(DrawingWidth,DrawingHeight);
      GraphicsNodeRenderContext rc = getRenderContext(true);
      PdfGr2d.setGraphicContext(
         new org.apache.batik.ext.awt.g2d.GraphicContext());
      PdfGr2d.setRenderingHints(rc.getRenderingHints());
      // Ask the component to render into the PDF Graphics2D implementation.
      //((Graphics2D)PdfGr2d).setClip(0, 0, width, height);

      MakerObj.doGenToGr2D(PdfGr2d,0,0,DrawingWidth,DrawingHeight);

      // What is this thing?
      //component.export((Graphics2D)pdfGenerator, pageFormat, false);

      boolean useCSS = true; // we want to use CSS style attribute
      PdfGr2d.finish(); // this will stream out the results.
      PdfOutStream.close();



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to