get position of block

View: New views
2 Messages — Rating Filter:   Alert me  

get position of block

by JPee :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I'm working with FOP embedded in a CMS for generating PDFs. I have the following problem.

In my PDF there are texts, in the texts there are headers, paragraphs, bold and italic parts. In my project I defined patterns how these things are mapped to fop. Sometimes it happens that there is a Header in the last lines of a page. The structure of the generated fop sourcecode is like.

<fo:block headerattributes>headertext</fo:block> (1 time)
<fo:block normaltextattr.>text</fo:block> (n times)

And that iterates several times.

Is there a possibilty to get the position out of a block so i could define a rule, if the block.height is higher than 200mm page-break-before? Or is there a possibility to keep the block with the headerattributes together with the next line, which is used by another block? In my case i don't have the choice to put a block around the headertext and the normal text, to use the keep-together.within-page attribute.

Greetings,

JPee


AW: get position of block

by Georg Datterl :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi JPee,

No, you won't easily get the height of a block, since that information is only available, after the various breaking and layouting algorithms of fop are finished. But there shouldn't be anything wrong with keep-with-next / keep-with-previous. Helped me a lot.

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
-----Ursprüngliche Nachricht-----
Von: JPee [mailto:perlet@...]
Gesendet: Dienstag, 20. Oktober 2009 16:34
An: fop-users@...
Betreff: get position of block


Hi,

I'm working with FOP embedded in a CMS for generating PDFs. I have the following problem.

In my PDF there are texts, in the texts there are headers, paragraphs, bold and italic parts. In my project I defined patterns how these things are mapped to fop. Sometimes it happens that there is a Header in the last lines of a page. The structure of the generated fop sourcecode is like.

<fo:block headerattributes>headertext</fo:block> (1 time) <fo:block normaltextattr.>text</fo:block> (n times)

And that iterates several times.

Is there a possibilty to get the position out of a block so i could define a rule, if the block.height is higher than 200mm page-break-before? Or is there a possibility to keep the block with the headerattributes together with the next line, which is used by another block? In my case i don't have the choice to put a block around the headertext and the normal text, to use the keep-together.within-page attribute.

Greetings,

JPee


--
View this message in context: http://www.nabble.com/get-position-of-block-tp25976225p25976225.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@...