There is an unknown variable here and that's batik. What scaling does batik
to the SVG when it goes to the page? Does it scale to fit the page or keep
the dimensions?

About the limits, what I mean is that if the SVC says that the page limits
are A4 but what is actually in the page is only 1 cm long it will always
look small because the limits are not set to image size.

Best Regards,
Paulo Soares

> -----Original Message-----
> From: Xiaohong Yin [SMTP:[EMAIL PROTECTED]
> Sent: Thursday, June 05, 2003 23:46
> To:   Paulo Soares
> Cc:   [EMAIL PROTECTED]
> Subject:      Re: [Itext-questions] SVG problem.
> 
> Thanks for your reply.
> 
> Other images like PNG or jpg I use the method
> scaleAbsolute()
> and it works just fine.
> 
> Could you please explain a little bit about the limits of the canvas is
> too big compare to the image dimensions? Is there a work around?
> 
> Xiaohong
> 
> 
> 
> On Thu, 5 Jun 2003, Paulo Soares wrote:
> 
> > What happens with other images? The limits of the canvas in the image
> may be
> > too big when compared with the image dimensions.
> >
> > Best Regards,
> > Paulo Soares
> >
> > ----- Original Message -----
> > From: "Xiaohong Yin" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, June 05, 2003 22:03
> > Subject: [Itext-questions] SVG problem.
> >
> >
> > > Hey:
> > >
> > > I have been trying to solve a problem with inserting a SVG image
> > > generated
> > > from batik to the PDF using Graphics2D. The problem is that the image
> > > seems to shrink for some reason, it does not scale absolutely to the
> > > sizeand I explicitly set...
> > >
> > > Following is the code:
> > >
> > >
> > > PdfContentByte cb = writer.getDirectContent();
> > > int width = 300;
> > > int height = 250;
> > > PdfTemplate template = cb.createTemplate(width, height);
> > > DefaultFontMapper mapper = new DefaultFontMapper();
> > > Graphics2D g2 = template.createGraphics(width, height, mapping);
> > > PrintTranscoder prm = new PrintTranscoder();
> > > prm.addTranscodingHint(PrintTranscoder.KEY_WIDTH, new Float(width));
> > > prm.addTranscodingHint(PrintTranscoder.KEY_HEIGHT, new Float(height));
> > > TranscoderInput ti = new TranscoderInput("file:///C:/mapWaadt.svg");
> > > prm.transcode(ti, null);
> > > PageFormat pg = new PageFormat();
> > > Paper pp= new Paper();
> > > pp.setSize(width, height);
> > > pp.setImageableArea(0, 0, width, height);
> > > pg.setPaper(pp);
> > > prm.print(g2, pg, 0);
> > > g2.dispose();
> > > cb.addTemplate(template, 100, 400);
> > >
> > >
> > > Thanks a lot....
> > >
> > >
> > > Xiaohong
> > >
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.net email is sponsored by:  Etnus, makers of TotalView, The
> best
> > > thread debugger on the planet. Designed with thread debugging features
> > > you've never dreamed of, try TotalView 6 free at www.etnus.com.
> > > _______________________________________________
> > > iText-questions mailing list
> > > [EMAIL PROTECTED]
> > > https://lists.sourceforge.net/lists/listinfo/itext-questions
> > >
> >
> >
> >


-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to