Return-Path: Delivered-To: apmail-xmlgraphics-batik-users-archive@www.apache.org Received: (qmail 4135 invoked from network); 12 Aug 2008 10:17:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Aug 2008 10:17:09 -0000 Received: (qmail 23032 invoked by uid 500); 12 Aug 2008 10:17:07 -0000 Delivered-To: apmail-xmlgraphics-batik-users-archive@xmlgraphics.apache.org Received: (qmail 22987 invoked by uid 500); 12 Aug 2008 10:17:06 -0000 Mailing-List: contact batik-users-help@xmlgraphics.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: batik-users@xmlgraphics.apache.org Delivered-To: mailing list batik-users@xmlgraphics.apache.org Received: (qmail 22966 invoked by uid 99); 12 Aug 2008 10:17:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Aug 2008 03:17:05 -0700 X-ASF-Spam-Status: No, hits=-2.0 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of thomas.deweese@kodak.com designates 192.232.121.200 as permitted sender) Received: from [192.232.121.200] (HELO smtp1.kodak.com) (192.232.121.200) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Aug 2008 10:16:08 +0000 Received: from roc-us-e1000-112.kodak.com (roc-us-e1000-112.kodak.com [192.232.121.192]) by smtp1.kodak.com (8.11.3/8.11.1) with SMTP id m7CAGZd29880 for ; Tue, 12 Aug 2008 06:16:35 -0400 (EDT) Received: from (KP-ES-LNKNOTES2.ekc1.ekc.kodak.com [150.102.45.49]) by roc-us-e1000-112.kodak.com with smtp id 1cd1_bdf23418_6857_11dd_981a_0019b9df7285; Tue, 12 Aug 2008 10:16:33 +0000 In-Reply-To: To: batik-users@xmlgraphics.apache.org Cc: batik-users@xmlgraphics.apache.org Subject: Re: svg to pdf gives different visual output MIME-Version: 1.0 X-Mailer: Lotus Notes Release 6.5.4 March 27, 2005 Message-ID: From: thomas.deweese@kodak.com Date: Tue, 12 Aug 2008 06:17:35 -0400 X-MIMETrack: Serialize by Router on KNOTES2/ISBP/EKC(Release 6.5.6FP2|October 17, 2007) at 08/12/2008 06:16:34 AM, Serialize complete at 08/12/2008 06:16:34 AM Content-Type: multipart/alternative; boundary="=_alternative 003891F9852574A3_=" X-Virus-Checked: Checked by ClamAV on apache.org --=_alternative 003891F9852574A3_= Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable Hi Lars, "Lars Eirik R=F8nning" wrote on 08/11/2008 10:23:15=20 AM: > I have tried to do as Thomas adviced me to and changed the svg file=20 > with units from px to pt. > I am not able to get a printout which gives me the correct outputsize=20 however. >=20 > When i try to print the svg file from Illustrator the rectangle is=20 > 11cm , however i keep getting 10.5 cm when using either the batik- > rasterizer or my code with transcoding hints. > I have tried to set the PDFTranscoder hints and used both=20 > KEY=5FRESOLUTION and PDFTranscoder.KEY=5FDEVICE=5FRESOLUTION, new=20 Float(0.3528f)); When you say you keep getting 10.5cm rect, are you talking about the PDF file (which Batik can control) or the final sheet of paper where there is another piece of software that may change the rendering of the document (the PDF application and/or the print driver). > Please see the attached fiile. It is the biggest rectangle which=20 > should be 11cm according to illustrator. > Sorry to bother you guys with this again.. >=20 > Could someone let me know if they are able to actually get a=20 > printout where the biggest rectangle is 11cm( 4.33070866 inch) Both by adjusting the 'KEY=5FPIXEL=5FUNIT=5FTO=5FMILLIMETER' and changing 'px' to 'pt' I can get a PDF where the rectangle is 11cm wide. Getting the PDF printed without scaling is a=20 problem that I'm not sure Batik can help with. > On Mon, Aug 11, 2008 at 3:59 PM, Lars Eirik R=F8nning > wrote: > Hi again > I have tried to do as you advice me to and changed the svg file with > units from px to pt. > I am not able to get a printout which gives me the correct outputsize=20 however. >=20 > When i try to print the svg file from Illustrator the rectangle is=20 > 11cm , however i keep getting 10.5 cm when using either the batik- > rasterizer or my code with transcoding hints. > Please see the attached fiile. It is the biggest rectangle which=20 > should be 11cm according to illustrator. >=20 > Sorry to bother you guys with this again.. >=20 > Could someone let me know if they are able to actually get 11cm on=20 > the biggest square? >=20 >=20 > On Wed, Aug 6, 2008 at 2:26 PM, Lars Eirik R=F8nning > wrote: > I have had a look at the transcoding hints and i was wondering which > one to use to get the output correct > This is the one i have looked at now:=20 PDFTranscoder.KEY=5FDEVICE=5FRESOLUTION > I also see that there is something referred to as :PDFTranscoder. > KEY=5FPIXEL=5FUNIT=5FTO=5FMILLIMETER,new Float(0.2645833f) > To mee it looks like the latter is the right one, but i am not entirely=20 sure.. > Any help is appreciated. >=20 > On Wed, Aug 6, 2008 at 1:51 PM, Lars Eirik R=F8nning > wrote: > Thank you so much Thomas. > That helped me a lot! >=20 >=20 > On Wed, Aug 6, 2008 at 12:32 PM, wrote: >=20 > Hi Lars, >=20 > "Lars Eirik R=F8nning" wrote on 08/05/2008 10:14:48= =20 AM: >=20 >=20 > > I have been using the batik rasterizer to generate pdf from my svg=20 file. >=20 > > The strange thing is that my .svg fil contains a rectangle which is=20 > > 311pt.=20 > Actually your SVG document contains a rectangle that is 311 user=20 > space units, where in your document 311 user space units are mapped=20 > to 311 =5Fpx=5F units. Where by default Batik uses 96 px per inch (user = > agents are supposed to pick and appropriate px to real world unit=20 > conversion - 96 is a common px->inch conversion for SVG UserAgents),=20 > by contrast a pt is defined as 1/72nd of an inch always.=20 >=20 > > When i convert this to pdf the pdf version is 243pt.=20 > Right 311px/96pxPerIn ~=3D 3.25in * 72ptPerIn ~=3D 243pt=20 >=20 > > I have not set any particular transcoding hints and was hoping that=20 > > the conversion would be done more or less seamlessly. >=20 > To fix this you can either use 'pt' instead of 'px' units on=20 > your outermost SVG (which seems to make the most sense to me):=20 >=20 > width=3D"311.811pt" height=3D"311.811pt"=20 >=20 > Or you can override Batik's default px to real world mapping=20 > by using the '-dpi' command line option (and/or transcoding hint):=20 >=20 > -dpi 72=20 >=20 > [attachment "a4.zip" deleted by Thomas E. DeWeese/449433/EKC]=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org > For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org --=_alternative 003891F9852574A3_= Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable
Hi Lars,

"Lars Eirik R=F8nning" <larseirik@gmail= .com> wrote on 08/11/2008 10:23:15 AM:

> I have tried to do as Thomas adviced me to and changed the svg file
> with units from px to pt.
> I am not able to get a printout which gives me the correct outputsize however.
>
> When i try to print the svg file from Illustrator the rectangle is
> 11cm , however i keep getting 10.5 cm when using either the batik-
> rasterizer or my code with transcoding hints.
> I have tried to set the PDFTranscoder hints and used both
> KEY=5FRESOLUTION and PDFTranscoder.KEY=5FDEVICE=5FRESOLUTION, new Floa= t(0.3528f));

   When you say you keep getting 10.5cm rect, are you talking about
the PDF file (which Batik can control) or the final sheet of paper
where there is another piece of software that may change the rendering
of the document (the PDF application and/or the print driver).

> Please see the attached fiile. It is the biggest rectangle which
> should be 11cm according to illustrator.

> Sorry to bother you guys with this again..
>
> Could someone let me know if they are able to actually get a
> printout where the biggest rectangle is 11cm( 4.33070866 inch)

   Both by adjusting the 'KEY=5FPIXEL=5FUN= IT=5FTO=5FMILLIMETER' and
changing 'px' to 'pt' I can get a PDF where the rect= angle is
11cm wide.  Getting the PDF printed without sca= ling is a
problem that I'm not sure Batik can help with.<= /font>


> On Mon, Aug 11, 2008 at 3:59 PM, Lars Eirik R= =F8nning <larseirik@gmail.com
> > wrote:

> Hi again
> I have tried to do as you advice me to and changed the svg file with > units from px to pt.
> I am not able to get a printout which gives me the correct outputsize however.
>
> When i try to print the svg file from Illustrator the rectangle is
> 11cm , however i keep getting 10.5 cm when using either the batik-
> rasterizer or my code with transcoding hints.
> Please see the attached fiile. It is the biggest rectangle which
> should be 11cm according to illustrator.
>
> Sorry to bother you guys with this again..
>
> Could someone let me know if they are able to actually get 11cm on
> the biggest square?

>
>

> On Wed, Aug 6, 2008 at 2:26 PM, Lars Eirik R=F8= nning <larseirik@gmail.com
> > wrote:

> I have had a look at the transcoding hints and i was wondering which
> one to use to get the output correct
> This is the one i have looked at now: PDFTranscoder.KEY=5FDEVICE=5FRES= OLUTION
> I also see that there is something referred to as :PDFTranscoder.
> KEY=5FPIXEL=5FUNIT=5FTO=5FMILLIMETER,new Float(0.2645833f)
> To mee it looks like the latter is the right one, but i am not entirely sure..
> Any help is appreciated.

>

> On Wed, Aug 6, 2008 at 1:51 PM, Lars Eirik R=F8= nning <larseirik@gmail.com
> > wrote:

> Thank you so much Thomas.
> That helped me a lot!

>
>

> On Wed, Aug 6, 2008 at 12:32 PM, <thomas.dew= eese@kodak.com> wrote:
>
> Hi Lars,
>
> "Lars Eirik R=F8nning" <larseirik@gmail.com> wrote on 08/05/2008 10:14:48 AM:

>
>
> > I have been using the batik rasterizer to generate pdf from my svg file.

>
> > The strange thing is that my .svg fil contains a rectangle which is
> > 311pt.

>    Actually your SVG document contains a rectangle that is 311 user
> space units, where in your document 311 user space units are mapped
> to 311 =5Fpx=5F units.  Where by default Batik uses 96 px per inch (user
> agents are supposed to pick and appropriate px to real world unit
> conversion - 96 is a common px->inch conversion for SVG UserAgents),
> by contrast a pt is defined as 1/72nd of an inch always.

>
> > When i convert this to pdf the pdf version is 243pt.

>    Right 311px/96pxPerIn ~=3D 3.25in * 72ptPerIn ~=3D 243pt
>
> > I have not set any particular transcoding hints and was hoping that

> > the conversion would be done more or less seamlessly.
>
>   To fix this you can either use 'pt' instead of 'px' units on
> your outermost SVG (which seems to make the most sense to me):
>
>         width=3D"311.811pt" height=3D&qu= ot;311.811pt"
>
>  Or you can override Batik's default px to real world mapping
> by using the '-dpi' command line option (and/or transcoding hint):
>
>         -dpi 72

>
> [attachment "a4.zip" deleted by Thomas E. DeWeese/449433/EKC]
> ---------------------------------------------------------------------<= br> > To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org=
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.o= rg
--=_alternative 003891F9852574A3_=--