RE: Conversion from 0.23 to 1.00
I found the problem, whilst 0.23 does not moan when you set the content-width=123mm apparently in 0.95 and above, You have to have it set to auto-scale otherwise it will just appear as full size.. Oh well.. Maybe the rescaling will work better - and what if you want to crop it? Kindest regards Theresa Forster Senior Software Developer From: Eric Douglas [mailto:edoug...@blockhouse.com] Sent: 15 September 2011 16:17 To: fop-users@xmlgraphics.apache.org Subject: RE: Conversion from 0.23 to 1.00 A sample would help. Is it an external image? an instream image? Are you setting the attributes? content-width, content-height, scaling? In my image block I also set line-height='1' and font-size='0pt' _ From: Theresa Jayne Forster [mailto:ther...@inbrand.co.uk] Sent: Thursday, September 15, 2011 11:10 AM To: fop-users@xmlgraphics.apache.org Subject: Conversion from 0.23 to 1.00 I have converted my code from 0.23 to 1.00 But I am having problems with my graphics. In the past we have used scale and it has scaled properly, Now under 1.00 its not scaling at all (well cropping) Am I missing something (the original 0.23 had been modded to provide extras like cmyk as %, z-index and float) My xsl is creating a fo file but the image is not being cropped, Is there any way to keep it inside the block-container I am getting errors like this WARNING: Line 1 of a paragraph overflows the available area by 11339 millipoints. (See position 1399:11) 15-Sep-2011 16:01:04 org.apache.fop.events.LoggingEventListener processEvent WARNING: Content overflows the viewport of an fo:block-container in block-progression direction by 17123 millipoints. (See position 1398:91) 15-Sep-2011 16:01:04 org.apache.fop.events.LoggingEventListener processEvent WARNING: Content overflows the viewport of an fo:block-container in block-progression direction by 5784 millipoints. (See position 1984:91) 15-Sep-2011 16:01:04 org.apache.fop.events.LoggingEventListener processEvent WARNING: Content overflows the viewport of an fo:block-container in block-progression direction by 5784 millipoints. (See position 1989:134) Kindest regards Theresa Forster Senior Software Developer _ No virus found in this message. Checked by AVG - www.avg.com Version: 10.0.1410 / Virus Database: 1520/3898 - Release Date: 09/15/11
RE: Conversion from 0.23 to 1.00
Try some sort of wrapper (tag within a tag)? I never got FOP to properly find external images so I'm currently only using inline SVG for images but it has size and positioning on multiple tag levels (if that helps?). fo:block xsl:attribute name=line-height1/xsl:attribute xsl:attribute name=font-size0pt/xsl:attribute fo:instream-foreign-object xsl:attribute name=content-widthxsl:value-of select=$BLOCKW//xsl:attribute xsl:attribute name=content-heightxsl:value-of select=$BLOCKH//xsl:attribute xsl:attribute name=scalingnon-uniform/xsl:attribute svg:svg xsl:attribute name=preserveAspectRatioxMinYMin meet/xsl:attribute xsl:attribute name=width100%/xsl:attribute xsl:attribute name=height100%/xsl:attribute xsl:attribute name=viewBoxxsl:value-of select=concat('0',',','0',',','556',',','84')//xsl:attribute From: Theresa Jayne Forster [mailto:ther...@inbrand.co.uk] Sent: Friday, September 16, 2011 3:22 AM To: fop-users@xmlgraphics.apache.org Subject: RE: Conversion from 0.23 to 1.00 I found the problem, whilst 0.23 does not moan when you set the content-width=123mm apparently in 0.95 and above, You have to have it set to auto-scale otherwise it will just appear as full size Oh well Maybe the rescaling will work better - and what if you want to crop it? Kindest regards Theresa Forster Senior Software Developer From: Eric Douglas [mailto:edoug...@blockhouse.com] Sent: 15 September 2011 16:17 To: fop-users@xmlgraphics.apache.org Subject: RE: Conversion from 0.23 to 1.00 A sample would help. Is it an external image? an instream image? Are you setting the attributes? content-width, content-height, scaling? In my image block I also set line-height='1' and font-size='0pt' From: Theresa Jayne Forster [mailto:ther...@inbrand.co.uk] Sent: Thursday, September 15, 2011 11:10 AM To: fop-users@xmlgraphics.apache.org Subject: Conversion from 0.23 to 1.00 I have converted my code from 0.23 to 1.00 But I am having problems with my graphics. In the past we have used scale and it has scaled properly, Now under 1.00 its not scaling at all (well cropping) Am I missing something (the original 0.23 had been modded to provide extras like cmyk as %, z-index and float) My xsl is creating a fo file but the image is not being cropped, Is there any way to keep it inside the block-container I am getting errors like this WARNING: Line 1 of a paragraph overflows the available area by 11339 millipoints. (See position 1399:11) 15-Sep-2011 16:01:04 org.apache.fop.events.LoggingEventListener processEvent WARNING: Content overflows the viewport of an fo:block-container in block-progression direction by 17123 millipoints. (See position 1398:91) 15-Sep-2011 16:01:04 org.apache.fop.events.LoggingEventListener processEvent WARNING: Content overflows the viewport of an fo:block-container in block-progression direction by 5784 millipoints. (See position 1984:91) 15-Sep-2011 16:01:04 org.apache.fop.events.LoggingEventListener processEvent WARNING: Content overflows the viewport of an fo:block-container in block-progression direction by 5784 millipoints. (See position 1989:134) Kindest regards Theresa Forster Senior Software Developer No virus found in this message. Checked by AVG - www.avg.com Version: 10.0.1410 / Virus Database: 1520/3898 - Release Date: 09/15/11
Re: Conversion from 0.23 to 1.00
Hi Theresa, one way to crop an image is to carry it within a svg snippet: fo:instream-foreign-object width=100% height=100% content-width=scale-to-fit content-height=scale-to-fit svg xmlns=http://www.w3.org/2000/svg; xmlns:xlink=http://www.w3.org/1999/xlink; width=50mm height=50mm viewBox=0 0 100 100 clipPath id=myClip rect x=0 y=0 width=100 height=100/ /clipPath g clip-path=url(#myClip) image x=-5 y=-5 width=130 height=130 xlink:href=image_url_here/ /g /svg /fo:instream-foreign-object Le 16/09/2011 15:12, Theresa Jayne Forster a écrit : Eric, looks like you had similar to me, But I have a modded version of 0.23 which supports stuff such as z-index and floats, If someone was interested in deciphering what I have to put into the trunk then please contact me as I am not able myself – not enough time. xsl:template name=crop-scale-image xsl:param name=content-width/ xsl:param name=content-height/ xsl:param name=imgurl/ xsl:variable name=imginfourl xsl:texthttp://www.myserver/ImageDataServlet-1.0/ImageDataServlet?imgsrc=/xsl:text xsl:value-of select=$imgurl/ /xsl:variable xsl:variable name=imginfo select=document($imginfourl)/ xsl:variable name=imgWidthmm select=$imginfo/imginfo/imgwidth div 3.779527559/ xsl:variable name=imgHeightmm select=$imginfo/imginfo/imgheight div 3.779527559/ xsl:variable name=xscale select=$content-width div $imgWidthmm/ xsl:variable name=yscale select=$content-height div $imgHeightmm/ xsl:variable name=scale xsl:choose xsl:when test=$xscale = $yscale xsl:value-of select=$xscale/ /xsl:when xsl:otherwise xsl:value-of select=$yscale/ /xsl:otherwise /xsl:choose /xsl:variable xsl:choose xsl:when test=$yscale $xscale fo:external-graphic scaling-method=resample-any-method height={$content-height}mm width={$content-width}mm src={$imgurl} content-x=0mm content-y=0mm content-width={$imgWidthmm * $scale}mm content-height={$imgHeightmm * $scale}mm clip=auto movie=auto / /xsl:when xsl:otherwise fo:external-graphic scaling-method=resample-any-method height={$content-height}mm width={$content-width}mm src={$imgurl} content-x=0mm content-y=0mm content-width={$imgWidthmm * $scale}mm content-height={$imgHeightmm * $scale}mm clip=auto movie=auto / /xsl:otherwise /xsl:choose /xsl:template Kindest regards Theresa Forster Senior Software Developer *From:*Eric Douglas [mailto:edoug...@blockhouse.com] *Sent:* 16 September 2011 14:05 *To:* fop-users@xmlgraphics.apache.org *Subject:* RE: Conversion from 0.23 to 1.00 Try some sort of wrapper (tag within a tag)? I never got FOP to properly find external images so I'm currently only using inline SVG for images but it has size and positioning on multiple tag levels (if that helps?). fo:block xsl:attributename=/line-height/1/xsl:attribute xsl:attributename=/font-size/0pt/xsl:attribute fo:instream-foreign-object xsl:attributename=/content-width/xsl:value-ofselect=/$BLOCKW///xsl:attribute xsl:attributename=/content-height/xsl:value-ofselect=/$BLOCKH///xsl:attribute xsl:attributename=/scaling/non-uniform/xsl:attribute svg:svg xsl:attributename=/preserveAspectRatio/xMinYMin meet/xsl:attribute xsl:attributename=/width/100%/xsl:attribute xsl:attributename=/height/100%/xsl:attribute xsl:attributename=/viewBox/xsl:value-ofselect=/concat('0',',','0',',','556',',','84')///xsl:attribute *From:*Theresa Jayne Forster [mailto:ther...@inbrand.co.uk] mailto:[mailto:ther...@inbrand.co.uk] *Sent:* Friday, September 16, 2011 3:22 AM *To:* fop-users@xmlgraphics.apache.org mailto:fop-users@xmlgraphics.apache.org *Subject:* RE: Conversion from 0.23 to 1.00 I found the problem, whilst 0.23 does not moan when you set the content-width=”123mm” apparently in 0.95 and above, You have to have it set to “auto-scale” otherwise
Conversion from 0.23 to 1.00
I have converted my code from 0.23 to 1.00 But I am having problems with my graphics. In the past we have used scale and it has scaled properly, Now under 1.00 its not scaling at all (well cropping) Am I missing something (the original 0.23 had been modded to provide extras like cmyk as %, z-index and float) My xsl is creating a fo file but the image is not being cropped, Is there any way to keep it inside the block-container I am getting errors like this WARNING: Line 1 of a paragraph overflows the available area by 11339 millipoints. (See position 1399:11) 15-Sep-2011 16:01:04 org.apache.fop.events.LoggingEventListener processEvent WARNING: Content overflows the viewport of an fo:block-container in block-progression direction by 17123 millipoints. (See position 1398:91) 15-Sep-2011 16:01:04 org.apache.fop.events.LoggingEventListener processEvent WARNING: Content overflows the viewport of an fo:block-container in block-progression direction by 5784 millipoints. (See position 1984:91) 15-Sep-2011 16:01:04 org.apache.fop.events.LoggingEventListener processEvent WARNING: Content overflows the viewport of an fo:block-container in block-progression direction by 5784 millipoints. (See position 1989:134) Kindest regards Theresa Forster Senior Software Developer