You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Barbara Baur <Ba...@genedata.com> on 2004/05/24 11:20:46 UTC

Background image - resolution changed during fop processing

I want to include a background image (a png with a 200 dpi resolution) 
in the region body of a simple page master.
In the outcoming pdf the resolution of the image has changed to 72 dpi 
which is of course not what I wanted. The image is far too big and 
doesn't fit the page size anymore. Why does this happen? I use fop 0.20.5

thanks for any support


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Background image - resolution changed during fop processing

Posted by ap...@free.fr.
Hi,
My solution to resolve this problem is to use the different zone. The body zone 
is over the region-before zone.
Also, you can put your image in the body zone and your data in the region-
before zone.
<fo:page-sequence master-reference="pdgGeneral">
	<fo:static-content flow-name="xsl-region-before-pdgGeneral">
		Your data
	</fo:static-content>
	<fo:flow flow-name="xsl-region-body">
		<fo:block>
			<fo:external-graphic src="..." height="...cm"/>
		</fo:block>	
	</fo:flow>
</fo:page-sequence>
Antoine POURCHEZ




Selon Barbara Baur <Ba...@genedata.com>:

> Hi
> I tried to follow the hints on graphics resolution and set an image 
> width using the content-width property. Unfortunately this did not work, 
> probably because background-image itself is a property of fo:region-body..
> I 'solved' the problem in the meantime by resampling the image to 72 
> dpi. This may work for simple images but for more complex ones the 
> result may not be satisfactory when the pdf is printed.
> So I am still looking for a proper solution for this background-image 
> problem.
> Regards
> 
> Barbara
> 
> 
> 
> Andreas L. Delmelle wrote:
> 
> >>-----Original Message-----
> >>From: Barbara Baur [mailto:Barbara.Baur@genedata.com]
> >>
> >>    
> >>
> >
> >Hi,
> >
> >  
> >
> >>I want to include a background image (a png with a 200 dpi resolution)
> >>in the region body of a simple page master.
> >>In the outcoming pdf the resolution of the image has changed to 72 dpi
> >>which is of course not what I wanted. The image is far too big and
> >>doesn't fit the page size anymore. Why does this happen? I use fop 0.20.5
> >>
> >>    
> >>
> >
> >Check http://xml.apache.org/fop/graphics.html#resolution for more info
> about
> >this.
> >
> >Note: could be that the supplied hints don't work for a background-image,
> >I'm not sure.
> >
> >Hope this helps!
> >(Don't hesitate to report back if it doesn't)
> >
> >
> >Greetz,
> >
> >Andreas
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
> >For additional commands, e-mail: fop-user-help@xml.apache.org
> >  
> >
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


RE: Background image - resolution changed during fop processing

Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: Barbara Baur [mailto:Barbara.Baur@genedata.com]

Hi,

<snip />
> So I am still looking for a proper solution for this background-image
problem.

One known workaround is to use a static-content bound to a region-before or
region-after that overlaps the entire region-body. Then inside that
static-content, you can use a fo:external-graphic to insert the background
image. (IIC, it should end up in the background) In that way, you have more
options at your disposal to control the size of the graphic (and as a
consequence also its resolution).

Obviously this one depends on whether you're already using the region-before
or -after...

Afraid this is all I can give you for the moment. If you need any further
assistance, just give us a yell.

Greetz,

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Background image - resolution changed during fop processing

Posted by Barbara Baur <Ba...@genedata.com>.
Hi
I tried to follow the hints on graphics resolution and set an image 
width using the content-width property. Unfortunately this did not work, 
probably because background-image itself is a property of fo:region-body..
I 'solved' the problem in the meantime by resampling the image to 72 
dpi. This may work for simple images but for more complex ones the 
result may not be satisfactory when the pdf is printed.
So I am still looking for a proper solution for this background-image 
problem.
Regards

Barbara



Andreas L. Delmelle wrote:

>>-----Original Message-----
>>From: Barbara Baur [mailto:Barbara.Baur@genedata.com]
>>
>>    
>>
>
>Hi,
>
>  
>
>>I want to include a background image (a png with a 200 dpi resolution)
>>in the region body of a simple page master.
>>In the outcoming pdf the resolution of the image has changed to 72 dpi
>>which is of course not what I wanted. The image is far too big and
>>doesn't fit the page size anymore. Why does this happen? I use fop 0.20.5
>>
>>    
>>
>
>Check http://xml.apache.org/fop/graphics.html#resolution for more info about
>this.
>
>Note: could be that the supplied hints don't work for a background-image,
>I'm not sure.
>
>Hope this helps!
>(Don't hesitate to report back if it doesn't)
>
>
>Greetz,
>
>Andreas
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
>For additional commands, e-mail: fop-user-help@xml.apache.org
>  
>

RE: Background image - resolution changed during fop processing

Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: Barbara Baur [mailto:Barbara.Baur@genedata.com]
>

Hi,

> I want to include a background image (a png with a 200 dpi resolution)
> in the region body of a simple page master.
> In the outcoming pdf the resolution of the image has changed to 72 dpi
> which is of course not what I wanted. The image is far too big and
> doesn't fit the page size anymore. Why does this happen? I use fop 0.20.5
>

Check http://xml.apache.org/fop/graphics.html#resolution for more info about
this.

Note: could be that the supplied hints don't work for a background-image,
I'm not sure.

Hope this helps!
(Don't hesitate to report back if it doesn't)


Greetz,

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org