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 Georg Datterl <ge...@geneon.de> on 2008/12/05 12:57:04 UTC

PDF: leading -> Fop:???

Hi everybody,

I'm fooling around with linespaces at the moment and I get a value for leading. Leading for PDFs means, as I'm sure everybody knows, the baseline-to-baseline distance between two lines. First I tried to translate it to attribute line-height, but that's not quite the same, because leading is ignored if the text has only one line. A high value for leading in PDF would give me much space between two lines, but doesn't say anything about the distance to the previous block, whereas a high value for line-height does say something about the distance to the previous block. 

I have a feeling that line-height.conditionality might be helpful, but I'm not quite sure. Basically, I have to position a text in a block based on a value distanceToPreviousBlock and a value distanceToNextLineIfThereIsALineInThisBlock.

And something completely different: Is there a reason why a line-height="20pt+1em" works, whereas line-height="20pt-1em" doesn't?

Regards,
 
Georg Datterl
 
------ Kontakt ------
 
Georg Datterl
 
Geneon media solutions gmbh
Gutenstetter Straße 8a
90449 Nürnberg
 
HRB Nürnberg: 17193
Geschäftsführer: Yong-Harry Steiert 

Tel.: 0911/36 78 88 - 26
Fax: 0911/36 78 88 - 20
 
www.geneon.de
 
Weitere Mitglieder der Willmy MediaGroup:
 
IRS Integrated Realization Services GmbH:    www.irs-nbg.de 
Willmy PrintMedia GmbH:                            www.willmy.de
Willmy Consult & Content GmbH:                 www.willmycc.de 

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


AW: leading -> Fop:???

Posted by Georg Datterl <ge...@geneon.de>.
 
> > And something completely different: Is there a reason why a 
> > line-height="20pt+1em" works, whereas line-height="20pt-1em" doesn't?

> I suspect it's because "-" is a valid character in names, but "+" isn't.
> Try putting whitespace around (or at least in front of) the "-".

You are good! I would never have guessed in that direction. But a space did the trick.

Regards,
 
Georg Datterl
 
------ Kontakt ------
 
Georg Datterl
 
Geneon media solutions gmbh
Gutenstetter Straße 8a
90449 Nürnberg
 
HRB Nürnberg: 17193
Geschäftsführer: Yong-Harry Steiert 

Tel.: 0911/36 78 88 - 26
Fax: 0911/36 78 88 - 20
 
www.geneon.de
 
Weitere Mitglieder der Willmy MediaGroup:
 
IRS Integrated Realization Services GmbH:    www.irs-nbg.de 
Willmy PrintMedia GmbH:                            www.willmy.de
Willmy Consult & Content GmbH:                 www.willmycc.de 



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


RE: leading -> Fop:???

Posted by "Amick, Eric" <Er...@mail.house.gov>.
> And something completely different: Is there a reason why a 
> line-height="20pt+1em" works, whereas line-height="20pt-1em" doesn't?

I suspect it's because "-" is a valid character in names, but "+" isn't.
Try putting whitespace around (or at least in front of) the "-".

Eric Amick
Legislative Computer Systems
Office of the Clerk

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


AW: PDF: leading -> Fop:???

Posted by Georg Datterl <ge...@geneon.de>.
Hi Andreas,

> > Basically, I have to position a text in a block 
> > based on a value distanceToPreviousBlock and a value 
> > distanceToNextLineIfThereIsALineInThisBlock.

> XSL-FO has the concept of 'half-leading'. (see XSL-FO 1.1 -- 4.5 Line areas, and)

> Another idea may be to play with negative, forced space-before on the block that
> generates the lines, which could generate the effect of the first line being
> 'drawn towards' the preceding block.

I neither understand half-leading nor line-height.conditionality, but playing with a calculated space-before might be the best idea.

Regards, 
 
Georg Datterl
 
------ Kontakt ------
 
Georg Datterl
 
Geneon media solutions gmbh
Gutenstetter Straße 8a
90449 Nürnberg
 
HRB Nürnberg: 17193
Geschäftsführer: Yong-Harry Steiert 

Tel.: 0911/36 78 88 - 26
Fax: 0911/36 78 88 - 20
 
www.geneon.de
 
Weitere Mitglieder der Willmy MediaGroup:
 
IRS Integrated Realization Services GmbH:    www.irs-nbg.de 
Willmy PrintMedia GmbH:                            www.willmy.de
Willmy Consult & Content GmbH:                 www.willmycc.de 


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


Re: PDF: leading -> Fop:???

Posted by Andreas Delmelle <an...@telenet.be>.
On 05 Dec 2008, at 12:57, Georg Datterl wrote:

Hi Georg,

> I'm fooling around with linespaces at the moment and I get a value  
> for leading. Leading for PDFs means, as I'm sure everybody knows,  
> the baseline-to-baseline distance between two lines.

XSL-FO has the concept of 'half-leading'. (see XSL-FO 1.1 -- 4.5 Line  
areas, and)

> First I tried to translate it to attribute line-height, but that's  
> not quite the same, because leading is ignored if the text has only  
> one line. A high value for leading in PDF would give me much space  
> between two lines, but doesn't say anything about the distance to  
> the previous block, whereas a high value for line-height does say  
> something about the distance to the previous block.
>
> I have a feeling that line-height.conditionality might be helpful,  
> but I'm not quite sure. Basically, I have to position a text in a  
> block based on a value distanceToPreviousBlock and a value  
> distanceToNextLineIfThereIsALineInThisBlock.

Do I understand correctly that you mean you can already achieve what  
you need, apart from the first line in a block? If so, then I guess  
fo:initial-property-set would be your answer. Unfortunately not yet  
implemented in FOP, but theoretically, that would allow you to set a  
smaller value for line-height for the first line-area generated by a  
block.

Another idea may be to play with negative, forced space-before on the  
block that generates the lines, which could generate the effect of the  
first line being 'drawn towards' the preceding block.


HTH!

Andreas

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