0

i try since some days to make an pdf overlay of an existing file with XSL-FO

here is my code:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fo="http://www.w3.org/1999/XSL/Format" 
version="2.0">
<xsl:template match="/">
    <fo:root>
        <fo:layout-master-set>
            <fo:simple-page-master master-name="firstPage" page-height="297mm" page-width="210mm">
                <fo:region-body margin-top="25mm"/>
            </fo:simple-page-master>
        </fo:layout-master-set>
        <fo:page-sequence master-reference="firstPage">
            <fo:flow flow-name="xsl-region-body">
                <fo:block-container position="absolute">
                    <fo:block font-size="20pt" color="red">
                        blub </fo:block>
                </fo:block-container>
                <fo:block-container position="absolute">
                    <fo:block>
                        <fo:external-graphic src="file:///Users/gigo/Downloads/pdf-image/overlay.pdf"/>
                    </fo:block>
                </fo:block-container>
            </fo:flow>
        </fo:page-sequence>
    </fo:root>
</xsl:template>

I try to use an old thread from an mailing list: Link to Thread

does this relay work with the current fop version. i am using mac OSX ? might be this the problem?

Are there other solutions to integrate existing pdf files?

Mathias Müller
  • 22,203
  • 13
  • 58
  • 75
gigo1980
  • 3
  • 2

1 Answers1

0

We have found an workaround for doing this.

so with "pdf2svg" it is posible to create from any pdf file an svg file. and an svg file kann be included as external-grafic. that works great with fop, so it not required to buy expensive render that offer that. only write some code, or convert the for example "letter paper" one time and than integrate the svg.

gigo1980
  • 3
  • 2