Re: PDFTranscoder & Paper size
Hi Vyang,
vyang <vyang@...> wrote on 06/30/2009
01:41:53 PM:
> I'm using PDFTranscoder to convert an svg to pdf, everything is working
> fine, but I'm having trouble with setting the correct paper size.
I set my
> paper size of (8.5 x 11 in.) with the following code:
>
> pdfTranscoder.addTranscodingHint(PDFTranscoder.KEY_WIDTH,
>
(float)pageFormat.getWidth());
> pdfTranscoder.addTranscodingHint(PDFTranscoder.KEY_HEIGHT,
>
(float)pageFormat.getHeight());
>
> which gives me a paper size of 8.25 x 6.38 in. I also tried:
I'm not sure what you mean by 'paper
size', does the
printer cut the paper for you? :)
Anyway I think the above is caused by
the fact that your
document has a aspect ratio of ~5 by 4. The
SVG PDF transcoder
generally outputs the actual document size, if you
need the
document placed in an otherwise blank page the simplest
route
might be to place the SVG document in an FO document
and render
it with FOP.
> pdfTranscoder.addTranscodingHint(PDFTranscoder.KEY_WIDTH,
>
(float)pageFormat.getImageableWidth());
> pdfTranscoder.addTranscodingHint(PDFTranscoder.KEY_HEIGHT,
>
(float)pageFormat.getImageableHeight());
>
> which gives me a paper size of 6.75 x 4.88 in. Any help with
this is much
> appreciated. Thanks.
>
> vyang
> --
> View this message in context: http://www.nabble.com/PDFTranscoder---
> Paper-size-tp24276414p24276414.html
> Sent from the Batik - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@...
> For additional commands, e-mail: batik-users-help@...
>