Thanks, Thomas--I'll get to this tonight or tomorrow
night.
Glen
--- Thomas DeWeese <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I've attached a patch to the PDF transcoder
> which changes the
> UserAgent to always report a pixel to millimeter
> conversion
> corresponding to 72dpi. This is required because
> this is the
> default userspace of the PDFGraphics2D.
>
> It also fixes a minor issue with how the PDF
> graphics is setup.
> > Index:
> src/java/org/apache/fop/svg/PDFTranscoder.java
>
===================================================================
> RCS file:
>
/home/cvs/xml-fop/src/java/org/apache/fop/svg/PDFTranscoder.java,v
> retrieving revision 1.7
> diff -w -u -r1.7 PDFTranscoder.java
> --- src/java/org/apache/fop/svg/PDFTranscoder.java
> 11 Oct 2003 14:48:49 -0000 1.7
> +++ src/java/org/apache/fop/svg/PDFTranscoder.java 2
> Nov 2003 18:12:10 -0000
> @@ -119,6 +119,15 @@
>
> }
>
> + protected org.apache.batik.bridge.UserAgent
> createUserAgent() {
> + return new SVGAbstractTranscoderUserAgent()
> {
> + // The PDF stuff wants everything
> at 72dpi
> + public float
> getPixelUnitToMillimeter() {
> + return 0.3427778f;
> + }
> + };
> + }
> +
> /**
> * @see
>
org.apache.avalon.framework.configuration.Configurable#configure(Configuration)
> */
> @@ -158,7 +167,7 @@
>
> try {
>
> graphics.setupDocument(output.getOutputStream(), w,
> h);
> - graphics.setSVGDimension(width,
> height);
> + graphics.setSVGDimension(w, h);
>
> if
>
(hints.containsKey(ImageTranscoder.KEY_BACKGROUND_COLOR))
> {
> graphics.setBackgroundColor
>
__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree