Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Absolute Positioning using XSL to be transformed and rendered to PDF

Tags:

pdf

xslt

xsl-fo

How does one accomplish absolute positioning using XSL? I am working on a XSL transformation to FO to PDF for mailing letters and am trying to figure out how to absolutely position the fo:blocks containing the Return Address and Recipient Address so that they are displayed in the windows on the envelope.

Anyone have suggestions on the magic syntax to make this happen?

like image 422
Doug Porter Avatar asked Jan 24 '23 01:01

Doug Porter


1 Answers

I'm not an expert at this and neither do I have (at the moment) an XSL-FO processor here to test this but shouldn't something like this work? (don't take it literally please)

<fo:block>
    <fo:block>
        BLABLABLABLABLABLABLABLABLABLABLABLABLABLABLABLABLABLABLABLA 
    </fo:block>
    <fo:block-container position="absolute" 
                        top="30pt" left="30pt" height="16pt" width="100%">
        <fo:block font="48pt Arial" color="red">absolute</fo:block>
    </fo:block-container>
</fo:block>
like image 60
GerG Avatar answered Jan 30 '23 13:01

GerG