FO: Marker issue in FO XSL

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF Merger for Java (v6)  /  FO: Marker issue in FO XSL

DynamicPDF Merger for Java (v6) Forum

 Dec 15 2015 6:31 AM
Hi All,

This Ravi, I am newbie to FO XSL. I am trying to generate PDF by using FOP Engine, in my scenario I have to print table in a PDF file where some table rows need to be repeated on page break, so I kept these rows(which need to be repeated) inside <fo:table-header> tag as below

<fo:table-header>
// Table rows
</fo:table-header>

above scenario is working fine for me, but as another requirement I need to get these <fo:table-header> rows dynamically. For this I have decided to use <fo:marker> which will accepts dynamic content and I am retieving the same as below

<fo:flow flow-name="body">
        <fo:block>
        <fo:table text-align="center" font="10pt Arial">
                <fo:table-header font-weight="bold">
                <fo:table-row keep-together.within-page="always">
                <fo:table-cell number-columns-spanned="6">
                <fo:block>
                        <fo:retrieve-marker retrieve-position="first-starting-within-page" retrieve-class-name="table_header" />
                </fo:block>
                </fo:table-cell>
                </fo:table-row>
                </fo:table-header>
                
                <fo:table-body>
                <fo:marker marker-class-name="table_header">
                        <fo:table table-layout="inherit" text-align="center" font="10pt Arial">
                        <fo:table-body>
                        <fo:table-row font-weight="bold">
                        <fo:table-cell border="solid 1px black">
                                <fo:block>Table 7</fo:block>
                        </fo:table-cell>
                        </fo:table-row>
                        </fo:table-body>
                        </fo:table>
                        </fo:marker>
                        // Table body rows
                
                </fo:table-header>
                
        </fo:table>
        </fo:block>
</fo:flow>

When I am trying to run the above FO XSL content with FOP engine using java, getting below exception

SEVERE: javax.xml.transform.TransformerException: java.lang.ClassCastException: org.apache.fop.layoutmgr.table.TableLayoutManager cannot be cast to org.apache.fop.layoutmgr.inline.InlineLevelLayoutManager
file:/D:/POC/POC/src/main/java/POCXSLT.xsl; Line #13; Column #46; java.lang.ClassCastException: org.apache.fop.layoutmgr.table.TableLayoutManager cannot be cast to org.apache.fop.layoutmgr.inline.InlineLevelLayoutManager

But if I gave text content inside <fo:marker> in above code it's working fine. Can anyone help me to resolve this issue and my configurations are as below

OS : Windows 7
JDK : 1.6.0_23
FOP : 2.0
 Dec 15 2015 11:23 AM
Posted by a ceTe Software moderator
Hello Ravi,

We don’t have any products that use FOP Engine and our product DynamicPDF Merger for Java does not support any kind of FO XSL features. In fact the exception message you have posted is not thrown by our product. If you have any specific questions on our product (DynamicPDF Merger for Java) then you may post them in this forum. For questions on FOP Engine you would need to contact the appropriate company that provides support for that technology.

Thanks,
ceTe Software Support Team.

All times are US Eastern Standard time. The time now is 3:34 AM.