Karthik,

the XML file you attached might be a correct SVG file, but it does not
contain any SVG painting elements, just some vendor-specific tags which
Batik knows nothing about. There's no chance for us to reproduce your
problem with this file.

BTW, there's no point in also writing to me directly. I'm on this list
and will answer if I have anything to contribute.

On 29.08.2006 09:06:39 karrakarthik wrote:
> 
> Hi Thomas ,
>    Please find attached the source SVG (SampleSVGDoc.xml) and the
> PDFTranscoder code I have used to generate the PDF (PDFGenerator.java) . Try
> to generate the PDF using fop.jar and pdf-transcoder.jar and you can see the
> difference in the output . The source SVG has a lot of our custom fields ..
> so I have attached the java code which uses the PDFTranscoder (and not the
> GraphicsNode implementation) . I was trying to get the required output as
> the PDF generated using fop.jar with all the field values rendered .
> 
> Looking for your quick reply...
> 
> Thanks,
> karthik
> 
> 
> 
> thomas.deweese wrote:
> > 
> > Hi Karra, 
> > 
> >      Can you provide the source SVG that is causing you problems?
> > 
> > karrakarthik <[EMAIL PROTECTED]> wrote on 08/28/2006 11:26:23 AM:
> > 
> >>     After going through a lot of mailing lists , I tried to generate the 
> > PDF
> >> using the pdf-transcoder.jar instead of fop.jar (but used the same code 
> > ).
> > 
> >     What Fop.jar there are many possibilities.  The most likely
> > would be the FOP 0.20.5 jar which is ancient, and not likely to
> > work with many current versions of Batik.
> > 
> >> Then I found that the text values are rendered but the positioning of 
> > those
> >> fields is completely wrong . (Please see the attached
> >> SamplePDFFromGraphicsNodeNotUsingFOP.pdf) .
> > 
> >    I looked at this output and everything looked good to me.
> > Can you be more explicit about what is wrong about the positioning?
> > 
> >> The code which I have used in both the cases is as follows :
> >> 
> >> 1. From the SVGDocument , build the GraphicsNode using BridgeContext and
> >> UserAgent.
> >> 2. Obtain a PDFDocumentGraphics2D object.
> >> 3. Use the paint() method of GraphicsNode and pass  the
> >> PDFDocumentGraphics2D  object to it.
> > 
> >    This code won't work in all cases (or at the least won't
> > provide very good PDF as the text will have to be turned into
> > paths since the PDF Graphics 2D can't handle a GlyphVector
> > well (really a problem with GlyphVector not the PDF Graphics2D)).
> > 
> >    The PDF Transcoder tries to take care of these problems.
> > 
> >>     Though the code fragment used in both the cases is same , I could 
> > not
> >> understand the difference in the generated PDFs using the respective 
> > jars.
> > 
> >    Different versions can easily explain it.
> > 
> >> Also , I tried to use the PDFTranscoder.class to generate the PDF with 
> > the
> >> fop.jar and pdf-transcoder.jar , and I found the same difference in the
> >> output as described above. (Please see the attached
> >> FromPDFTranscoderUsingFOP.pdf and PDFTranscoderNotUsingFOP.pdf)
> >> 
> >> looking for a quick help .... 
> >> http://www.nabble.com/user-files/235786/FromPDFTranscoderUsingFOP.pdf
> >> FromPDFTranscoderUsingFOP.pdf 
> >> 
> > http://www.nabble.com/user-files/235791/SamplePDF%2BFromGraphicsNodeNotUsingFOP.pdf
> >> SamplePDF FromGraphicsNodeNotUsingFOP.pdf 
> >> 
> > http://www.nabble.com/user-files/235792/SamplePDFFromGraphicsNodeUsingFOP.pdf
> >> SamplePDFFromGraphicsNodeUsingFOP.pdf 
> >> -- 
> >> View this message in context: 
> > http://www.nabble.com/Problem-in-generating-a-
> >> PDF-using-pdf-transcoder.jar-tf2178018.html#a6022329
> >> Sent from the Batik - Users forum at Nabble.com.
> >> 
> > 
> > 
> http://www.nabble.com/user-files/235794/SampleSVGDoc.xml SampleSVGDoc.xml 
> http://www.nabble.com/user-files/235795/PDFGenerator.java PDFGenerator.java 
> -- 
> View this message in context: 
> http://www.nabble.com/Problem-in-generating-a-PDF-using-pdf-transcoder.jar-tf2178018.html#a6033941
> Sent from the Batik - Users forum at Nabble.com.


Jeremias Maerki


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

Reply via email to