|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
How to avoid vertical space between blocks containing imagesMy .fo code contains nothing but a sequence of images exactly fitting into page height (because page margins are defined accordingly):
<fo:block space-before="0mm" space-after="0mm"> <fo:external-graphic src="url(images/{@picture})" /> </fo:block> When printing to the page, FOP 0.94 and 0.95 are inserting 2mm vertical space between each block. Only when I set space-after to -2mm, the output is as I would expect it normally (exactly no gap between images). Is there another way to keep FOP from adding space in general? If not: How do I know how much I have to subtract in order to get zero space? |
|
|
Re: How to avoid vertical space between blocks containing imagesPerhaps you find inspiration in
http://www.antennahouse.com/support/qa/QA/2005052701.html "Because fo:external-graphic is an inline element, it makes line area. The default height of line area is 1.2em, so you should specify line-height="1" for the block. However, even though line-height="1" is specified, a graphic is placed on top of a baseline and there remains a space under the baseline as a result. In order to avoid this, you should specify font-size="0pt", too." Hth Peter > From: fopaddict <richard@...> > Reply-To: <fop-users@...> > Date: Sun, 8 Nov 2009 01:36:49 -0800 (PST) > To: <fop-users@...> > Subject: How to avoid vertical space between blocks containing images > > > My .fo code contains nothing but a sequence of images exactly fitting into > page height (because page margins are defined accordingly): > > <fo:block space-before="0mm" space-after="0mm"> > <fo:external-graphic src="url(images/{@picture})" /> > </fo:block> > > When printing to the page, FOP 0.94 and 0.95 are inserting 2mm vertical > space between each block. Only when I set space-after to -2mm, the output is > as I would expect it normally (exactly no gap between images). Is there > another way to keep FOP from adding space in general? If not: How do I know > how much I have to subtract in order to get zero space? > > -- > View this message in context: > http://old.nabble.com/How-to-avoid-vertical-space-between-blocks-containing-im > ages-tp26252057p26252057.html > Sent from the FOP - Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: fop-users-unsubscribe@... > For additional commands, e-mail: fop-users-help@... > --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@... For additional commands, e-mail: fop-users-help@... |
|
|
Re: How to avoid vertical space between blocks containing imagesHi list,
This is due to how FOP (and other FO engines) handles half-leading (Cf REC 1.1 §4.5: line-area [1] and $6.5.2 - fo:block [2]) To avoid blank space between 2 contigous blocks containing only graphical materials, you should ensure that both line-height and font-size traits are set to zero. As line-height initial value is [1.2] (witch means 1.2 * font-size), setting font-size property to 0pt is sufficient. [1] http://www.w3.org/TR/2006/REC-xsl11-20061205/#area-line [2] http://www.w3.org/TR/2006/REC-xsl11-20061205/#fo_block HTH, Pascal Peter Coppens a écrit : > Perhaps you find inspiration in > http://www.antennahouse.com/support/qa/QA/2005052701.html > "Because fo:external-graphic is an inline element, it makes line area. The > default height of line area is 1.2em, so you should specify line-height="1" > for the block. > However, even though line-height="1" is specified, a graphic is placed on > top of a baseline and there remains a space under the baseline as a result. > In order to avoid this, you should specify font-size="0pt", too." > Hth > Peter > >> From: fopaddict <richard@...> >> >> My .fo code contains nothing but a sequence of images exactly fitting into >> page height (because page margins are defined accordingly): >> <fo:block space-before="0mm" space-after="0mm"> >> <fo:external-graphic src="url(images/{@picture})" /> >> </fo:block> >> When printing to the page, FOP 0.94 and 0.95 are inserting 2mm vertical >> space between each block. Only when I set space-after to -2mm, the output is >> as I would expect it normally (exactly no gap between images). Is there >> another way to keep FOP from adding space in general? If not: How do I know >> how much I have to subtract in order to get zero space? >> --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@... For additional commands, e-mail: fop-users-help@... |
|
|
Re: How to avoid vertical space between blocks containing imagesPascal and Peter,
perfect answer, it works for FOP 0.94 and 0.95 with font-size="0". Regards, Richard
|
|
|
Re: How to avoid vertical space between blocks containing imagesHi,
I have the same problem as Richard. Setting font-size="0" does not really work for me. Although the space is gone I still have a very thin border around the pictures. I realized this using a block with background-color and ebmbedded image. When I use zoom factor above 150% I can see it clearly in my PDFs. I guess this is no FOP issue because I get the same results in XEP. I already set any space-* and padding-* values to 0. Any ideas? Cheers, Tobias On Fri, Nov 13, 2009 at 11:19 AM, fopaddict <richard@...> wrote: > > Pascal and Peter, > perfect answer, it works for FOP 0.94 and 0.95 with font-size="0". > Regards, > Richard > > > Pascal Sancho wrote: >> >> Hi list, >> >> This is due to how FOP (and other FO engines) handles half-leading (Cf >> REC 1.1 §4.5: line-area [1] and $6.5.2 - fo:block [2]) >> To avoid blank space between 2 contigous blocks containing only >> graphical materials, you should ensure that both line-height and >> font-size traits are set to zero. >> >> As line-height initial value is [1.2] (witch means 1.2 * font-size), >> setting font-size property to 0pt is sufficient. >> >> [1] http://www.w3.org/TR/2006/REC-xsl11-20061205/#area-line >> [2] http://www.w3.org/TR/2006/REC-xsl11-20061205/#fo_block >> >> HTH, >> >> Pascal >> >> Peter Coppens a écrit : >>> Perhaps you find inspiration in >>> http://www.antennahouse.com/support/qa/QA/2005052701.html >>> "Because fo:external-graphic is an inline element, it makes line area. >>> The >>> default height of line area is 1.2em, so you should specify >>> line-height="1" >>> for the block. >>> However, even though line-height="1" is specified, a graphic is placed on >>> top of a baseline and there remains a space under the baseline as a >>> result. >>> In order to avoid this, you should specify font-size="0pt", too." >>> Hth >>> Peter >>> >>>> From: fopaddict <richard@...> >>>> >>>> My .fo code contains nothing but a sequence of images exactly fitting >>>> into >>>> page height (because page margins are defined accordingly): >>>> <fo:block space-before="0mm" space-after="0mm"> >>>> <fo:external-graphic src="url(images/{@picture})" /> >>>> </fo:block> >>>> When printing to the page, FOP 0.94 and 0.95 are inserting 2mm vertical >>>> space between each block. Only when I set space-after to -2mm, the >>>> output is >>>> as I would expect it normally (exactly no gap between images). Is there >>>> another way to keep FOP from adding space in general? If not: How do I >>>> know >>>> how much I have to subtract in order to get zero space? >>>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: fop-users-unsubscribe@... >> For additional commands, e-mail: fop-users-help@... >> >> >> > > -- > View this message in context: http://old.nabble.com/How-to-avoid-vertical-space-between-blocks-containing-images-tp26252057p26334354.html > Sent from the FOP - Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: fop-users-unsubscribe@... > For additional commands, e-mail: fop-users-help@... > > --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@... For additional commands, e-mail: fop-users-help@... |
|
|
Re: How to avoid vertical space between blocks containing imagesHi Tobias,
For further investigation, we need short XSL-FO and an image that demonstrates what you say. Possible reason: line-height trait not equal to zero. The line-height trait value is resolved in different way depending on how the corresponding property is set (see [1]: - when <number> is used, <number> is inherited - otherwise, the computed value is inherited. Here is a short example that explains the difference: <fo:aaa font-size="10pt" line-height="1.2"> <!-- line-height trait is 10pt * 1.2 = 12pt --> <fo:bbb font-size="0pt"> <!-- inherited line-height property is 1.2 --> <!-- line-height trait is 0pt * 1.2 = 12pt --> </fo:bbb> </fo:aaa> <fo:aaa font-size="10pt" line-height="120%"> <!-- line-height trait is 10pt * 120% = 12pt --> <fo:bbb font-size="0pt"> <!-- inherited line-height property is 12pt --> <!-- line-height trait is 12pt --> </fo:bbb> </fo:aaa> You should verify if in your XSL-FO, line-height is not set with other than <number>. Pascal [1] http://www.w3.org/TR/2006/REC-xsl11-20061205/#line-height Tobias Anstett [k15t.com] a écrit : > Hi, > > I have the same problem as Richard. Setting font-size="0" does not > really work for me. Although the space is gone I still have a very > thin border around the pictures. I realized this using a block with > background-color and ebmbedded image. When I use zoom factor above > 150% I can see it clearly in my PDFs. I guess this is no FOP issue > because I get the same results in XEP. > I already set any space-* and padding-* values to 0. Any ideas? > > Cheers, > Tobias --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@... For additional commands, e-mail: fop-users-help@... |
| Free embeddable forum powered by Nabble | Forum Help |