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 ja...@polaris.co.in on 2010/02/23 14:01:23 UTC
PDF reprot with improper align data
Hi,
I am unable to generate properly align data in pdf report.so what changes
should i make in xsl file for correct alignment od data in pdf?
here is my xsl file .Please help for the same.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="fo">
<xsl:output method="xml" version="1.0" omit-xml-declaration="yes"
indent="yes"/>
<xsl:template match="BODY">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="simpleA4" page-height="624pt"
page-width="1010.8pt" margin-top="0cm" margin-bottom="0cm"
margin-left="0cm" margin-right="0cm">
<fo:region-body margin-top="0cm" margin-bottom="0cm" margin-left="0in"
margin-right="0in"/>
<fo:region-after extent="0cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="simpleA4">
<fo:flow flow-name="xsl-region-body">
<fo:block font-size="12pt" font-family="monospace"
white-space-collapse="false">
<xsl:apply-templates/>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<xsl:template match="NLS">
<fo:inline font-size="{@font-size}pt" font-family="{@font-family}"
white-space-collapse="false">
<xsl:apply-templates/>
</fo:inline>
</xsl:template>
<xsl:template match="B">
<fo:inline font-size="12pt" font-weight="bold" font-family="monospace"
white-space-collapse="false">
<xsl:apply-templates/>
</fo:inline>
</xsl:template>
<xsl:template match="I">
<fo:inline font-size="12pt" font-style="italic" font-family="monospace"
white-space-collapse="false">
<xsl:apply-templates/>
</fo:inline>
</xsl:template>
<xsl:template match="U">
<fo:inline font-size="12pt" text-decoration="underline"
font-family="monospace" white-space-collapse="false">
<xsl:apply-templates/>
</fo:inline>
</xsl:template>
<xsl:template match="table">
<fo:table width="100%" table-layout="fixed">
<xsl:choose>
<xsl:when test="@cols">
<xsl:call-template name="build-columns">
<xsl:with-param name="cols"
select="concat(@cols, ' ')"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<fo:table-column column-width="200pt"/>
</xsl:otherwise>
</xsl:choose>
<fo:table-body>
<xsl:apply-templates select="*"/>
</fo:table-body>
</fo:table>
</xsl:template>
<xsl:template name="build-columns">
<xsl:param name="cols"/>
<xsl:if test="string-length(normalize-space($cols))">
<xsl:variable name="next-col">
<xsl:value-of select="substring-before($cols, ' ')"/>
</xsl:variable>
<xsl:variable name="remaining-cols">
<xsl:value-of select="substring-after($cols, ' ')"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="contains($next-col, 'pt')">
<fo:table-column column-width="{$next-col}"/>
</xsl:when>
<xsl:when test="number($next-col) > 0">
<fo:table-column column-width="{concat($next-col, 'pt')}"/>
</xsl:when>
<xsl:otherwise>
<fo:table-column column-width="50pt"/>
</xsl:otherwise>
</xsl:choose>
<xsl:call-template name="build-columns">
<xsl:with-param name="cols" select="concat($remaining-cols, ' ')"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template match="tr">
<fo:table-row height="{@height}">
<xsl:if test="@valign">
<xsl:attribute name="display-align">
<xsl:value-of select="@valign"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="@valign">
<xsl:attribute name="display-align">
<xsl:value-of select="@valign"/>
</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="*|text()"/>
</fo:table-row>
</xsl:template>
<xsl:template match="td">
<fo:table-cell
padding-start="0pt" padding-end="0pt"
padding-before="0pt" padding-after="0pt">
<xsl:if test="@colspan">
<xsl:attribute name="number-columns-spanned">
<xsl:value-of select="@colspan"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="@rowspan">
<xsl:attribute name="number-rows-spanned">
<xsl:value-of select="@rowspan"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="@border='1' or
ancestor::tr[@border='1'] or
ancestor::thead[@border='1'] or
ancestor::table[@border='1']">
<xsl:attribute name="border-style">
<xsl:text>solid</xsl:text>
</xsl:attribute>
<xsl:attribute name="border-color">
<xsl:text>black</xsl:text>
</xsl:attribute>
<xsl:attribute name="border-width">
<xsl:text>1pt</xsl:text>
</xsl:attribute>
</xsl:if>
<xsl:variable name="align">
<xsl:choose>
<xsl:when test="@align">
<xsl:choose>
<xsl:when test="@align='center'">
<xsl:text>center</xsl:text>
</xsl:when>
<xsl:when test="@align='right'">
<xsl:text>end</xsl:text>
</xsl:when>
<xsl:when test="@align='justify'">
<xsl:text>justify</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>start</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when test="ancestor::tr[@align]">
<xsl:choose>
<xsl:when test="ancestor::tr/@align='center'">
<xsl:text>center</xsl:text>
</xsl:when>
<xsl:when test="ancestor::tr/@align='right'">
<xsl:text>end</xsl:text>
</xsl:when>
<xsl:when test="ancestor::tr/@align='justify'">
<xsl:text>justify</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>start</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when test="ancestor::thead">
<xsl:text>center</xsl:text>
</xsl:when>
<xsl:when test="ancestor::table[@align]">
<xsl:choose>
<xsl:when test="ancestor::table/@align='center'">
<xsl:text>center</xsl:text>
</xsl:when>
<xsl:when test="ancestor::table/@align='right'">
<xsl:text>end</xsl:text>
</xsl:when>
<xsl:when test="ancestor::table/@align='justify'">
<xsl:text>justify</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>start</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:text>start</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<fo:block text-align="{$align}">
<xsl:apply-templates select="*|text()"/>
</fo:block>
</fo:table-cell>
</xsl:template>
<xsl:template match="font">
<fo:inline font-size="12pt" font-family="monospace" color="{@color}"
white-space-collapse="false">
<xsl:apply-templates/>
</fo:inline>
</xsl:template>
<xsl:template match="img">
<xsl:choose>
<xsl:when test="@width and @height">
<fo:inline>
<fo:external-graphic width="{@width}pt" height="{@height}pt" src="{@src}"/>
</fo:inline>
</xsl:when>
<xsl:when test="@width">
<fo:inline>
<fo:external-graphic width="{@width}pt" src="{@src}"/>
</fo:inline>
</xsl:when>
<xsl:when test="@height">
<fo:inline>
<fo:external-graphic height="{@height}pt" src="{@src}"/>
</fo:inline>
</xsl:when>
<xsl:otherwise>
<fo:inline>
<fo:external-graphic src="{@src}"/>
</fo:inline>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only. If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited.
Visit us at http://www.polaris.co.in
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: AW: AW: PDF reprot with improper align data
Posted by philippe voncken <ma...@philippevoncken.com>.
your file is bad formatted.
2010/2/25 <ja...@polaris.co.in>
> Hi,
>
> I am using the xalan-2.4.1 version for genrating PDF from foo.fo file.
> Please find the foo.fo file ,Also the xml and xsl file[available in
> trailing mail] which i am using to generate the foo.fo file is correct or
> not ? .
> Also the the foo.fo file missing the "<?xml".entry .
>
> What should be the xalan version for FOP 0.95 ?why the fo file generating
> with missing tag ,isthere any issue with xml or xsl file?
> Please help for the same.
>
> foo.fo file
>
> td { font-family:Courier New;font-size:12; } <fo:root
> xmlns:fo="http://www.w3.org/1999/XSL/Format">
> <fo:layout-master-set>
> <fo:simple-page-master margin-right="0cm" margin-left="0cm"
> margin-bottom="0cm" margin-top="0cm" page-width="1010.8pt"
> page-height="624pt" master-name="simpleA4">
> <fo:region-body margin-right="0in" margin-left="0in" margin-bottom="0cm"
> margin-top="0cm"/>
> <fo:region-after extent="0cm"/>
> </fo:simple-page-master>
> </fo:layout-master-set>
> <fo:page-sequence master-reference="simpleA4">
> <fo:flow flow-name="xsl-region-body">
> <fo:block white-space-collapse="false" font-family="monospace"
> font-size="12pt">
> <fo:inline white-space-collapse="false"
> font-family="monospace" font-weight="bold" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-style="italic" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> text-decoration="underline" font-size="12pt"> ABC Bank Customer Credit
> And Debit Records </fo:inline>
> </fo:inline>
> </fo:inline>
> As Of Date :22-Feb-2010
>
>
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-weight="bold" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> text-decoration="underline" font-size="12pt">
> <fo:inline white-space-collapse="false" color="#0033FF"
> font-family="monospace" font-size="12pt">Customer Details
> </fo:inline>
> </fo:inline>
> </fo:inline> <fo:inline white-space-collapse="false"
> font-family="monospace" font-weight="bold" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-style="italic" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> text-decoration="underline" font-size="12pt">ALEN </fo:inline>
> </fo:inline>
> </fo:inline>
> <fo:inline white-space-collapse="false"
> font-family="monospace" font-weight="bold" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-style="italic" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> text-decoration="underline" font-size="12pt">SALESMAN
> </fo:inline>
> </fo:inline>
> </fo:inline>
> <fo:inline white-space-collapse="false"
> font-family="monospace" font-weight="bold" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-style="italic" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> text-decoration="underline" font-size="12pt">allen@myaccount.com
> </fo:inline>
> </fo:inline>
> </fo:inline>
>
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-weight="bold" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> text-decoration="underline" font-size="12pt">
> <fo:inline white-space-collapse="false" color="#FF0000"
> font-family="monospace" font-size="12pt">Credit Records
> </fo:inline>
> </fo:inline>
> </fo:inline>
>
>
> ----------------------------------------------------------------------------------------
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-weight="bold" font-size="12pt"> DATE </fo:inline>
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-weight="bold" font-size="12pt"> ACCOUNT NO </fo:inline>
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-weight="bold" font-size="12pt"> AMOUNT </fo:inline>
>
>
> -----------------------------------------------------------------------------------------
> 16-Mar-2002 2365
> 1356.00
> 16-Mar-2002 4567
> 201.00
> 16-Mar-2002 3565
> 4543.00
>
> -------------------------
>
> 6100.00
>
> -------------------------
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-weight="bold" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> text-decoration="underline" font-size="12pt">
> <fo:inline white-space-collapse="false" color="#FF0000"
> font-family="monospace" font-size="12pt">Debit Records </fo:inline>
> </fo:inline>
> </fo:inline>
>
>
> -----------------------------------------------------------------------------------------
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-weight="bold" font-size="12pt"> DATE </fo:inline>
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-weight="bold" font-size="12pt"> ACCOUNT NO </fo:inline>
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-weight="bold" font-size="12pt"> AMOUNT </fo:inline>
>
>
> -----------------------------------------------------------------------------------------
> 16-Mar-2002 2365
> 1356.00
> 16-Mar-2002 4567
> 201.00
> 16-Mar-2002 3565
> 4543.00
>
> -------------------------
>
> 6100.000
>
> -------------------------
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Copyright Statement
>
> <fo:inline white-space-collapse="false"
> font-family="monospace" font-weight="bold" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-style="italic" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> text-decoration="underline" font-size="12pt"> ABC Bank Customer Credit
> And Debit Records </fo:inline>
> </fo:inline>
> </fo:inline>
> As Of Date :22-Feb-2010
>
>
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-weight="bold" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> text-decoration="underline" font-size="12pt">
> <fo:inline white-space-collapse="false" color="#0033FF"
> font-family="monospace" font-size="12pt">Customer Details
> </fo:inline>
> </fo:inline>
> </fo:inline> <fo:inline white-space-collapse="false"
> font-family="monospace" font-weight="bold" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-style="italic" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> text-decoration="underline" font-size="12pt">WARD </fo:inline>
> </fo:inline>
> </fo:inline>
> <fo:inline white-space-collapse="false"
> font-family="monospace" font-weight="bold" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-style="italic" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> text-decoration="underline" font-size="12pt">ANALYST
> </fo:inline>
> </fo:inline>
> </fo:inline>
> <fo:inline white-space-collapse="false"
> font-family="monospace" font-weight="bold" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-style="italic" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> text-decoration="underline" font-size="12pt">ward@myaccount.com
> </fo:inline>
> </fo:inline>
> </fo:inline>
>
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-weight="bold" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> text-decoration="underline" font-size="12pt">
> <fo:inline white-space-collapse="false" color="#FF0000"
> font-family="monospace" font-size="12pt">Credit Records
> </fo:inline>
> </fo:inline>
> </fo:inline>
>
>
> ----------------------------------------------------------------------------------------
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-weight="bold" font-size="12pt"> DATE </fo:inline>
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-weight="bold" font-size="12pt"> ACCOUNT NO </fo:inline>
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-weight="bold" font-size="12pt"> AMOUNT </fo:inline>
>
>
> -----------------------------------------------------------------------------------------
> 11-Jan-2003 1001
> 1000.00
> 11-Jan-2003 1005
> 1800.00
> 11-Jan-2003 1015
> 3800.00
> 11-Jan-2003 1016
> 4000.00
> 11-Jan-2003 2369
> 1360.00
> 11-Jan-2003 2372
> 1363.00
> 11-Jan-2003 4572
> 206.00
>
> -------------------------
>
> 13529.00
>
> -------------------------
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-weight="bold" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> text-decoration="underline" font-size="12pt">
> <fo:inline white-space-collapse="false" color="#FF0000"
> font-family="monospace" font-size="12pt">Debit Records </fo:inline>
> </fo:inline>
> </fo:inline>
>
>
> -----------------------------------------------------------------------------------------
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-weight="bold" font-size="12pt"> DATE </fo:inline>
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-weight="bold" font-size="12pt"> ACCOUNT NO </fo:inline>
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-weight="bold" font-size="12pt"> AMOUNT </fo:inline>
>
>
> -----------------------------------------------------------------------------------------
> 11-Jan-2003 1001
> 1000.00
> 11-Jan-2003 1005
> 1800.00
> 11-Jan-2003 1015
> 3800.00
> 11-Jan-2003 1016
> 4000.00
> 11-Jan-2003 2369
> 1360.00
> 11-Jan-2003 2372
> 1363.00
> 11-Jan-2003 4572
> 206.00
>
> -------------------------
>
> 13529.000
>
> -------------------------
>
>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> IntellectReport.XML
>
>
> <HTML><style type="text/css">td { font-family:Courier New;font-size:12;
> }</style> <HEAD><meta http-equiv="Content-Type" content="text/html;
> charset= ISO-8859-1"></meta></HEAD><BODY><FORM><PRE><p>
> <B><I><U> ABC Bank Customer Credit And Debit
> Records </U></I></B>
> As Of Date :22-Feb-2010
>
>
> <B><U><font color = "#0033FF">Customer Details </font></U></B>
> <B><I><U>ALEN </U></I></B>
> <B><I><U>SALESMAN </U></I></B>
> <B><I><U>allen@myaccount.com </U></I></B>
>
> <B><U><font color = "#FF0000">Credit Records </font></U></B>
>
>
> ----------------------------------------------------------------------------------------
> <B> DATE </B> <B> ACCOUNT NO </B>
> <B> AMOUNT </B>
>
>
> -----------------------------------------------------------------------------------------
> 16-Mar-2002 2365
> 1356.00
> 16-Mar-2002 4567
> 201.00
> 16-Mar-2002 3565
> 4543.00
>
> -------------------------
>
> 6100.00
>
> -------------------------
> <B><U><font color = "#FF0000">Debit Records </font></U></B>
>
>
> -----------------------------------------------------------------------------------------
> <B> DATE </B> <B> ACCOUNT NO </B>
> <B> AMOUNT </B>
>
>
> -----------------------------------------------------------------------------------------
> 16-Mar-2002 2365
> 1356.00
> 16-Mar-2002 4567
> 201.00
> 16-Mar-2002 3565
> 4543.00
>
> -------------------------
>
> 6100.000
>
>
>
>
>
>
>
>
>
>
>
> Copyright Statement </fo:block>
> </fo:flow>
> </fo:page-sequence>
> </fo:root> top.showClose();
>
>
>
>
> philippe voncken
> <mail@philippevon
> cken.com> To
> fop-users@xmlgraphics.apache.org
> 02/24/2010 08:28 cc
> PM
> Subject
> Re: AW: AW: PDF reprot with
> Please respond to improper align data
> fop-users@xmlgrap
> hics.apache.org
>
>
>
>
>
>
>
>
> May be a Xalan version error.
>
> 2010/2/24 <ja...@polaris.co.in>
> HI,
>
> I have generated the foo.fo file [xsl+xml->fo],When try to generate
> the
> PDF file with the command <Fop foo.fo jp.pdf >/<Fop -fo foo.fo -pdf
> jp.pdf
> > getting below error.
> Please help to resove the same.
>
> C:\Documents and Settings\jaiprakash.pande\Desktop\fop-0.95>Fop foo.fo
> jp.pdf
> [Fatal Error] foo.fo:1:1: Content is not allowed in prolog.
> Feb 24, 2010 8:00:46 PM org.apache.fop.cli.Main startFOP
> SEVERE: Exception
> javax.xml.transform.TransformerException: org.xml.sax.SAXParseException:
> Content is not allowed in prolog. at
> org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:217)
> at
> org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125) at
> org.apache.fop.cli.Main.startFOP(Main.java:166) at
> org.apache.fop.cli.Main.main(Main.java:197)
>
> ---------
>
> javax.xml.transform.TransformerException: org.xml.sax.SAXParseException:
> Content is not allowed in prolog. at
> org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transf
> ormerIdentityImpl.java:469) at
> org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:214)
> at
> org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125) at
> org.apache.fop.cli.Main.startFOP(Main.java:166) at
> org.apache.fop.cli.Main.main(Main.java:197)
> Caused by: org.xml.sax.SAXParseException: Content is not allowed in
> prolog. at
> org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
> Source) at
> org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
> Sour
> ce) at
> org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transf
> ormerIdentityImpl.java:452)
>
> Also ,Please find the foo.fo file fopr the same. Georg
> Datterl <gdatterl@geneon.
> de> To
> "fop-users@xmlgraphics.apache.org"
> 02/24/2010 05:41 <fop-users@xmlgraphics.apache.org
> > PM
> cc
> Subject Please respond to AW: AW: PDF reprot with
> improper fop-users@xmlgrap align data
> hics.apache.org
>
>
>
>
>
>
>
>
>
> Hi jaiprakash,
>
> It's not necessary for you to generate a pdf, but it's necessary for you
> to
> get better answers here, since this list deals mainly with fo->pdf, not
> xsl+xml->fo.
>
> 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: jaiprakash.pande@polaris.co.in [mailto:
> jaiprakash.pande@polaris.co.in]
> Gesendet: Mittwoch, 24. Februar 2010 11:32
> An: fop-users@xmlgraphics.apache.org
> Betreff: Re: AW: PDF reprot with improper align data
>
> Hi, For the old FOP 0.20 version ,we are able to genrate pdf report
> this
> XML + XSL couple only without ant XSl:FO file and is coming
> correctlly. Is it necessary to feed XSL-FO file for FOP 0.95 ?
> philippe voncken <mail@philippevon cken.com
> > To
>
>
> fop-users@xmlgraphics.apache.org
> 02/23/2010 09:23
> cc
> PM
> Subject Re: AW: PDF reprot with
> improper Please respond to align data
> fop-users@xmlgrap hics.apache.org
>
>
>
>
>
>
>
>
> Hi guys,
>
> to transform easly your xml source, you can also uses xsltop or Xml Copy
> Editor, it's are under GNU GPL license.
>
> regards,
> Philippe
>
>
> 2010/2/23 Pascal Sancho <pa...@takoma.fr> Hi Jaiprakash, As
> Georg
> said, the most useful on this list is to provide XSL-FO file, rather than
> XML + XSL couple. You can easily do it by invoking FOP with the -foout
> option: Fop -xml foo.xml -xsl foo.xsl -foout foo.fo
>
> From that point, you can use the same source XSL-FO file to feed
> either FOP 0.20.0, or FOP 0.95. Note that FOP distributions comes with
> different versions of Xalan, depending on FOP version released; in
> certain cases old Xalan versions can cause some troubles, so the same
> Xalan for the 2 FOPs is a good start. At this stage, if the 2 ouputs
> are
> differents, you can easily find the lines that have to be tweaked,
> directly in you XSL-FO file. Once the result make you happy, you can
> then
> report changes to your XSLT. During this process, we can help you in
> resolving issues that could block you, but we *need* XSL-FO. HTH,
> Pascal
> jaiprakash.pande@polaris.co.in a écrit : > Hi, > Please find the xml
> file
> for the same along with the genrated pdf output > .The same below
> outputted report is working fine in fop 0.20 version but > after
> migration vertical alignment issue is coming. > (See attached file:
> IntellectReport.xsl)(See attached file: > IntellectReport.xml) > > PDF
> output FOR FOP 0.95 version > (Embedded image moved to file:
> pic01200.jpg) > > > EXPECTED OUTPUT:PDF FOR THE VERSION FOP 0.20 > >
> (Embedded image moved to file: pic26058.jpg) > > Georg
> Datterl > <gdatterl@geneon. > de> > > Hello
> jaiprakash, > > Your XSL file doesn't help a lot here. Can you: > *
> take
> your XML file and transform it so you get a fo file > * cut the
> irrelevant parts out so it only contains the parts you want > aligned >
> *
> post this shortened fo file > * tell us which parts you want aligned with
> which (horizontally? > vertically?) > * and tell us which fop version
> you
> use > > Thanks. > > Georg Datterl > > -----Ursprüngliche
> Nachricht----- >
> Von: jaiprakash.pande@polaris.co.in [mailto:
> jaiprakash.pande@polaris.co.in] > > Hi, > > I am unable to generate
> properly align data in pdf report.so what changes > should i make in xsl
> file for correct alignment od data in pdf? > here is my xsl file .Please
> help for the
> same. >
> --------------------------------------------------------------------- To
> unsubscribe, e-mail:
> fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
>
>
>
>
> This e-Mail may contain proprietary and confidential information and is
> sent for the intended recipient(s) only. If by an addressing or
> transmission error this mail has been misdirected to you, you are
> requested
> to delete this mail immediately. You are also hereby notified that any
> use,
> any form of reproduction, dissemination, copying, disclosure,
> modification,
> distribution and/or publication of this e-mail message, contents or its
> attachment other than by its intended recipient/s is strictly prohibited.
>
> Visit us at http://www.polaris.co.in
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
>
>
>
>
> This e-Mail may contain proprietary and confidential information and is
> sent for the intended recipient(s) only. If by an addressing or
> transmission error this mail has been misdirected to you, you are
> requested to delete this mail immediately. You are also hereby notified
> that any use, any form of reproduction, dissemination, copying,
> disclosure, modification, distribution and/or publication of this e-mail
> message, contents or its attachment other than by its intended
> recipient/s is strictly prohibited.
>
> Visit us at http://www.polaris.co.in
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
>
>
>
>
> This e-Mail may contain proprietary and confidential information and is
> sent for the intended recipient(s) only. If by an addressing or
> transmission error this mail has been misdirected to you, you are requested
> to delete this mail immediately. You are also hereby notified that any use,
> any form of reproduction, dissemination, copying, disclosure, modification,
> distribution and/or publication of this e-mail message, contents or its
> attachment other than by its intended recipient/s is strictly prohibited.
>
> Visit us at http://www.polaris.co.in
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
Re: AW: AW: PDF reprot with improper align data
Posted by Pascal Sancho <pa...@takoma.fr>.
Hi,
The XSL-FO snippet that you provides is mixed with some HTML or CSS
code, witch produce a non valild XSL-FO.
Xalan is not the cause, but something in the process used to get that
XSL-FO is wrong.
FYI, FOP 0.95 distribution comes with Xalan 2.7.0.
You can use the Xalan version you want, not necessarly the one coming
with FOP (the latest released is 2.7.1), don't matter about that.
To compare efficiently 0.20.x and 0.9x output, the important thing is to
use same Xalan for both (or whatever XSLT engine).
Can you attach a clean XSL-FO (without HTML neither CSS)?
--
Pascal
jaiprakash.pande@polaris.co.in a écrit :
> Hi,
>
> I am using the xalan-2.4.1 version for genrating PDF from foo.fo file.
> Please find the foo.fo file ,Also the xml and xsl file[available in
> trailing mail] which i am using to generate the foo.fo file is correct or
> not ? .
> Also the the foo.fo file missing the "<?xml".entry .
>
> What should be the xalan version for FOP 0.95 ?why the fo file generating
> with missing tag ,isthere any issue with xml or xsl file?
> Please help for the same.
>
> foo.fo file
>
> td { font-family:Courier New;font-size:12; } <fo:root
> xmlns:fo="http://www.w3.org/1999/XSL/Format">
> <fo:layout-master-set>
> <fo:simple-page-master margin-right="0cm" margin-left="0cm"
> margin-bottom="0cm" margin-top="0cm" page-width="1010.8pt"
> page-height="624pt" master-name="simpleA4">
> <fo:region-body margin-right="0in" margin-left="0in" margin-bottom="0cm"
> margin-top="0cm"/>
> <fo:region-after extent="0cm"/>
> </fo:simple-page-master>
> </fo:layout-master-set>
> <fo:page-sequence master-reference="simpleA4">
> <fo:flow flow-name="xsl-region-body">
> <fo:block white-space-collapse="false" font-family="monospace"
> font-size="12pt">
> <fo:inline white-space-collapse="false"
> font-family="monospace" font-weight="bold" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-style="italic" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> text-decoration="underline" font-size="12pt"> ABC Bank Customer Credit
> And Debit Records </fo:inline>
> </fo:inline>
> </fo:inline>
> As Of Date :22-Feb-2010
>
>
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-weight="bold" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> text-decoration="underline" font-size="12pt">
> <fo:inline white-space-collapse="false" color="#0033FF"
> font-family="monospace" font-size="12pt">Customer Details
> </fo:inline>
> </fo:inline>
> </fo:inline> <fo:inline white-space-collapse="false"
> font-family="monospace" font-weight="bold" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-style="italic" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> text-decoration="underline" font-size="12pt">ALEN </fo:inline>
> </fo:inline>
> </fo:inline>
> <fo:inline white-space-collapse="false"
> font-family="monospace" font-weight="bold" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-style="italic" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> text-decoration="underline" font-size="12pt">SALESMAN
> </fo:inline>
> </fo:inline>
> </fo:inline>
> <fo:inline white-space-collapse="false"
> font-family="monospace" font-weight="bold" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-style="italic" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> text-decoration="underline" font-size="12pt">allen@myaccount.com
> </fo:inline>
> </fo:inline>
> </fo:inline>
>
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-weight="bold" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> text-decoration="underline" font-size="12pt">
> <fo:inline white-space-collapse="false" color="#FF0000"
> font-family="monospace" font-size="12pt">Credit Records
> </fo:inline>
> </fo:inline>
> </fo:inline>
>
> ----------------------------------------------------------------------------------------
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-weight="bold" font-size="12pt"> DATE </fo:inline>
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-weight="bold" font-size="12pt"> ACCOUNT NO </fo:inline>
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-weight="bold" font-size="12pt"> AMOUNT </fo:inline>
>
> -----------------------------------------------------------------------------------------
> 16-Mar-2002 2365
> 1356.00
> 16-Mar-2002 4567
> 201.00
> 16-Mar-2002 3565
> 4543.00
>
> -------------------------
>
> 6100.00
>
> -------------------------
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-weight="bold" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> text-decoration="underline" font-size="12pt">
> <fo:inline white-space-collapse="false" color="#FF0000"
> font-family="monospace" font-size="12pt">Debit Records </fo:inline>
> </fo:inline>
> </fo:inline>
>
> -----------------------------------------------------------------------------------------
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-weight="bold" font-size="12pt"> DATE </fo:inline>
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-weight="bold" font-size="12pt"> ACCOUNT NO </fo:inline>
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-weight="bold" font-size="12pt"> AMOUNT </fo:inline>
>
> -----------------------------------------------------------------------------------------
> 16-Mar-2002 2365
> 1356.00
> 16-Mar-2002 4567
> 201.00
> 16-Mar-2002 3565
> 4543.00
>
> -------------------------
>
> 6100.000
>
> -------------------------
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Copyright Statement
>
> <fo:inline white-space-collapse="false"
> font-family="monospace" font-weight="bold" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-style="italic" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> text-decoration="underline" font-size="12pt"> ABC Bank Customer Credit
> And Debit Records </fo:inline>
> </fo:inline>
> </fo:inline>
> As Of Date :22-Feb-2010
>
>
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-weight="bold" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> text-decoration="underline" font-size="12pt">
> <fo:inline white-space-collapse="false" color="#0033FF"
> font-family="monospace" font-size="12pt">Customer Details
> </fo:inline>
> </fo:inline>
> </fo:inline> <fo:inline white-space-collapse="false"
> font-family="monospace" font-weight="bold" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-style="italic" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> text-decoration="underline" font-size="12pt">WARD </fo:inline>
> </fo:inline>
> </fo:inline>
> <fo:inline white-space-collapse="false"
> font-family="monospace" font-weight="bold" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-style="italic" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> text-decoration="underline" font-size="12pt">ANALYST
> </fo:inline>
> </fo:inline>
> </fo:inline>
> <fo:inline white-space-collapse="false"
> font-family="monospace" font-weight="bold" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-style="italic" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> text-decoration="underline" font-size="12pt">ward@myaccount.com
> </fo:inline>
> </fo:inline>
> </fo:inline>
>
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-weight="bold" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> text-decoration="underline" font-size="12pt">
> <fo:inline white-space-collapse="false" color="#FF0000"
> font-family="monospace" font-size="12pt">Credit Records
> </fo:inline>
> </fo:inline>
> </fo:inline>
>
> ----------------------------------------------------------------------------------------
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-weight="bold" font-size="12pt"> DATE </fo:inline>
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-weight="bold" font-size="12pt"> ACCOUNT NO </fo:inline>
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-weight="bold" font-size="12pt"> AMOUNT </fo:inline>
>
> -----------------------------------------------------------------------------------------
> 11-Jan-2003 1001
> 1000.00
> 11-Jan-2003 1005
> 1800.00
> 11-Jan-2003 1015
> 3800.00
> 11-Jan-2003 1016
> 4000.00
> 11-Jan-2003 2369
> 1360.00
> 11-Jan-2003 2372
> 1363.00
> 11-Jan-2003 4572
> 206.00
>
> -------------------------
>
> 13529.00
>
> -------------------------
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-weight="bold" font-size="12pt">
> <fo:inline white-space-collapse="false" font-family="monospace"
> text-decoration="underline" font-size="12pt">
> <fo:inline white-space-collapse="false" color="#FF0000"
> font-family="monospace" font-size="12pt">Debit Records </fo:inline>
> </fo:inline>
> </fo:inline>
>
> -----------------------------------------------------------------------------------------
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-weight="bold" font-size="12pt"> DATE </fo:inline>
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-weight="bold" font-size="12pt"> ACCOUNT NO </fo:inline>
> <fo:inline white-space-collapse="false" font-family="monospace"
> font-weight="bold" font-size="12pt"> AMOUNT </fo:inline>
>
> -----------------------------------------------------------------------------------------
> 11-Jan-2003 1001
> 1000.00
> 11-Jan-2003 1005
> 1800.00
> 11-Jan-2003 1015
> 3800.00
> 11-Jan-2003 1016
> 4000.00
> 11-Jan-2003 2369
> 1360.00
> 11-Jan-2003 2372
> 1363.00
> 11-Jan-2003 4572
> 206.00
>
> -------------------------
>
> 13529.000
>
> -------------------------
>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> IntellectReport.XML
>
>
> <HTML><style type="text/css">td { font-family:Courier New;font-size:12;
> }</style> <HEAD><meta http-equiv="Content-Type" content="text/html;
> charset= ISO-8859-1"></meta></HEAD><BODY><FORM><PRE><p>
> <B><I><U> ABC Bank Customer Credit And Debit
> Records </U></I></B>
> As Of Date :22-Feb-2010
>
>
> <B><U><font color = "#0033FF">Customer Details </font></U></B>
> <B><I><U>ALEN </U></I></B>
> <B><I><U>SALESMAN </U></I></B>
> <B><I><U>allen@myaccount.com </U></I></B>
>
> <B><U><font color = "#FF0000">Credit Records </font></U></B>
>
> ----------------------------------------------------------------------------------------
> <B> DATE </B> <B> ACCOUNT NO </B>
> <B> AMOUNT </B>
>
> -----------------------------------------------------------------------------------------
> 16-Mar-2002 2365
> 1356.00
> 16-Mar-2002 4567
> 201.00
> 16-Mar-2002 3565
> 4543.00
>
> -------------------------
>
> 6100.00
>
> -------------------------
> <B><U><font color = "#FF0000">Debit Records </font></U></B>
>
> -----------------------------------------------------------------------------------------
> <B> DATE </B> <B> ACCOUNT NO </B>
> <B> AMOUNT </B>
>
> -----------------------------------------------------------------------------------------
> 16-Mar-2002 2365
> 1356.00
> 16-Mar-2002 4567
> 201.00
> 16-Mar-2002 3565
> 4543.00
>
> -------------------------
>
> 6100.000
>
>
>
>
>
>
>
>
>
>
>
> Copyright Statement </fo:block>
> </fo:flow>
> </fo:page-sequence>
> </fo:root> top.showClose();
>
>
>
>
> philippe voncken
>
> May be a Xalan version error.
>
> 2010/2/24 <ja...@polaris.co.in>
> HI,
>
> I have generated the foo.fo file [xsl+xml->fo],When try to generate
> the
> PDF file with the command <Fop foo.fo jp.pdf >/<Fop -fo foo.fo -pdf
> jp.pdf
> > getting below error.
> Please help to resove the same.
>
> C:\Documents and Settings\jaiprakash.pande\Desktop\fop-0.95>Fop foo.fo
> jp.pdf
> [Fatal Error] foo.fo:1:1: Content is not allowed in prolog.
> Feb 24, 2010 8:00:46 PM org.apache.fop.cli.Main startFOP
> SEVERE: Exception
> javax.xml.transform.TransformerException: org.xml.sax.SAXParseException:
> Content is not allowed in prolog. at
> org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:217) at
> org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125) at
> org.apache.fop.cli.Main.startFOP(Main.java:166) at
> org.apache.fop.cli.Main.main(Main.java:197)
>
> ---------
>
> javax.xml.transform.TransformerException: org.xml.sax.SAXParseException:
> Content is not allowed in prolog. at
> org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transf
> ormerIdentityImpl.java:469) at
> org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:214) at
> org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125) at
> org.apache.fop.cli.Main.startFOP(Main.java:166) at
> org.apache.fop.cli.Main.main(Main.java:197)
> Caused by: org.xml.sax.SAXParseException: Content is not allowed in
> prolog. at
> org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
> Source) at
> org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
> Sour
> ce) at
> org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transf
> ormerIdentityImpl.java:452)
>
> Also ,Please find the foo.fo file fopr the same. Georg
> Datterl <gdatterl@geneon.
> de> To
> "fop-users@xmlgraphics.apache.org"
>
> Hi jaiprakash,
>
> It's not necessary for you to generate a pdf, but it's necessary for you
> to
> get better answers here, since this list deals mainly with fo->pdf, not
> xsl+xml->fo.
>
> Regards,
>
> Georg Datterl
> -----Ursprüngliche Nachricht-----
> Von: jaiprakash.pande@polaris.co.in [mailto:
> Hi, For the old FOP 0.20 version ,we are able to genrate pdf report this
> XML + XSL couple only without ant XSl:FO file and is coming
> correctlly. Is it necessary to feed XSL-FO file for FOP 0.95 ?
> philippe voncken <mail@philippevon cken.com
> > To
>
> fop-users@xmlgraphics.apache.org
> 02/23/2010 09:23
>
>
> Hi guys,
>
> to transform easly your xml source, you can also uses xsltop or Xml Copy
> Editor, it's are under GNU GPL license.
>
> regards,
> Philippe
>
>
> 2010/2/23 Pascal Sancho <pa...@takoma.fr> Hi Jaiprakash, As Georg
> said, the most useful on this list is to provide XSL-FO file, rather than
> XML + XSL couple. You can easily do it by invoking FOP with the -foout
> option: Fop -xml foo.xml -xsl foo.xsl -foout foo.fo
>
> From that point, you can use the same source XSL-FO file to feed
> either FOP 0.20.0, or FOP 0.95. Note that FOP distributions comes with
> different versions of Xalan, depending on FOP version released; in
> certain cases old Xalan versions can cause some troubles, so the same
> Xalan for the 2 FOPs is a good start. At this stage, if the 2 ouputs are
> differents, you can easily find the lines that have to be tweaked,
> directly in you XSL-FO file. Once the result make you happy, you can then
> report changes to your XSLT. During this process, we can help you in
> resolving issues that could block you, but we *need* XSL-FO. HTH, Pascal
> jaiprakash.pande@polaris.co.in a écrit : > Hi, > Please find the xml file
> for the same along with the genrated pdf output > .The same below
> outputted report is working fine in fop 0.20 version but > after
> migration vertical alignment issue is coming. > (See attached file:
> IntellectReport.xsl)(See attached file: > IntellectReport.xml) > > PDF
> output FOR FOP 0.95 version > (Embedded image moved to file:
> pic01200.jpg) > > > EXPECTED OUTPUT:PDF FOR THE VERSION FOP 0.20 > >
> (Embedded image moved to file: pic26058.jpg) > > Georg
> Datterl > <gdatterl@geneon. > de> > > Hello
> jaiprakash, > > Your XSL file doesn't help a lot here. Can you: > * take
> your XML file and transform it so you get a fo file > * cut the
> irrelevant parts out so it only contains the parts you want > aligned > *
> post this shortened fo file > * tell us which parts you want aligned with
> which (horizontally? > vertically?) > * and tell us which fop version you
> use > > Thanks. > > Georg Datterl > > -----Ursprüngliche Nachricht----- >
> Von: jaiprakash.pande@polaris.co.in [mailto:
> jaiprakash.pande@polaris.co.in] > > Hi, > > I am unable to generate
> properly align data in pdf report.so what changes > should i make in xsl
> file for correct alignment od data in pdf? > here is my xsl file .Please
> help for the
> same.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: AW: AW: PDF reprot with improper align data
Posted by ja...@polaris.co.in.
Hi,
I am using the xalan-2.4.1 version for genrating PDF from foo.fo file.
Please find the foo.fo file ,Also the xml and xsl file[available in
trailing mail] which i am using to generate the foo.fo file is correct or
not ? .
Also the the foo.fo file missing the "<?xml".entry .
What should be the xalan version for FOP 0.95 ?why the fo file generating
with missing tag ,isthere any issue with xml or xsl file?
Please help for the same.
foo.fo file
td { font-family:Courier New;font-size:12; } <fo:root
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master margin-right="0cm" margin-left="0cm"
margin-bottom="0cm" margin-top="0cm" page-width="1010.8pt"
page-height="624pt" master-name="simpleA4">
<fo:region-body margin-right="0in" margin-left="0in" margin-bottom="0cm"
margin-top="0cm"/>
<fo:region-after extent="0cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="simpleA4">
<fo:flow flow-name="xsl-region-body">
<fo:block white-space-collapse="false" font-family="monospace"
font-size="12pt">
<fo:inline white-space-collapse="false"
font-family="monospace" font-weight="bold" font-size="12pt">
<fo:inline white-space-collapse="false" font-family="monospace"
font-style="italic" font-size="12pt">
<fo:inline white-space-collapse="false" font-family="monospace"
text-decoration="underline" font-size="12pt"> ABC Bank Customer Credit
And Debit Records </fo:inline>
</fo:inline>
</fo:inline>
As Of Date :22-Feb-2010
<fo:inline white-space-collapse="false" font-family="monospace"
font-weight="bold" font-size="12pt">
<fo:inline white-space-collapse="false" font-family="monospace"
text-decoration="underline" font-size="12pt">
<fo:inline white-space-collapse="false" color="#0033FF"
font-family="monospace" font-size="12pt">Customer Details
</fo:inline>
</fo:inline>
</fo:inline> <fo:inline white-space-collapse="false"
font-family="monospace" font-weight="bold" font-size="12pt">
<fo:inline white-space-collapse="false" font-family="monospace"
font-style="italic" font-size="12pt">
<fo:inline white-space-collapse="false" font-family="monospace"
text-decoration="underline" font-size="12pt">ALEN </fo:inline>
</fo:inline>
</fo:inline>
<fo:inline white-space-collapse="false"
font-family="monospace" font-weight="bold" font-size="12pt">
<fo:inline white-space-collapse="false" font-family="monospace"
font-style="italic" font-size="12pt">
<fo:inline white-space-collapse="false" font-family="monospace"
text-decoration="underline" font-size="12pt">SALESMAN
</fo:inline>
</fo:inline>
</fo:inline>
<fo:inline white-space-collapse="false"
font-family="monospace" font-weight="bold" font-size="12pt">
<fo:inline white-space-collapse="false" font-family="monospace"
font-style="italic" font-size="12pt">
<fo:inline white-space-collapse="false" font-family="monospace"
text-decoration="underline" font-size="12pt">allen@myaccount.com
</fo:inline>
</fo:inline>
</fo:inline>
<fo:inline white-space-collapse="false" font-family="monospace"
font-weight="bold" font-size="12pt">
<fo:inline white-space-collapse="false" font-family="monospace"
text-decoration="underline" font-size="12pt">
<fo:inline white-space-collapse="false" color="#FF0000"
font-family="monospace" font-size="12pt">Credit Records
</fo:inline>
</fo:inline>
</fo:inline>
----------------------------------------------------------------------------------------
<fo:inline white-space-collapse="false" font-family="monospace"
font-weight="bold" font-size="12pt"> DATE </fo:inline>
<fo:inline white-space-collapse="false" font-family="monospace"
font-weight="bold" font-size="12pt"> ACCOUNT NO </fo:inline>
<fo:inline white-space-collapse="false" font-family="monospace"
font-weight="bold" font-size="12pt"> AMOUNT </fo:inline>
-----------------------------------------------------------------------------------------
16-Mar-2002 2365
1356.00
16-Mar-2002 4567
201.00
16-Mar-2002 3565
4543.00
-------------------------
6100.00
-------------------------
<fo:inline white-space-collapse="false" font-family="monospace"
font-weight="bold" font-size="12pt">
<fo:inline white-space-collapse="false" font-family="monospace"
text-decoration="underline" font-size="12pt">
<fo:inline white-space-collapse="false" color="#FF0000"
font-family="monospace" font-size="12pt">Debit Records </fo:inline>
</fo:inline>
</fo:inline>
-----------------------------------------------------------------------------------------
<fo:inline white-space-collapse="false" font-family="monospace"
font-weight="bold" font-size="12pt"> DATE </fo:inline>
<fo:inline white-space-collapse="false" font-family="monospace"
font-weight="bold" font-size="12pt"> ACCOUNT NO </fo:inline>
<fo:inline white-space-collapse="false" font-family="monospace"
font-weight="bold" font-size="12pt"> AMOUNT </fo:inline>
-----------------------------------------------------------------------------------------
16-Mar-2002 2365
1356.00
16-Mar-2002 4567
201.00
16-Mar-2002 3565
4543.00
-------------------------
6100.000
-------------------------
Copyright Statement
<fo:inline white-space-collapse="false"
font-family="monospace" font-weight="bold" font-size="12pt">
<fo:inline white-space-collapse="false" font-family="monospace"
font-style="italic" font-size="12pt">
<fo:inline white-space-collapse="false" font-family="monospace"
text-decoration="underline" font-size="12pt"> ABC Bank Customer Credit
And Debit Records </fo:inline>
</fo:inline>
</fo:inline>
As Of Date :22-Feb-2010
<fo:inline white-space-collapse="false" font-family="monospace"
font-weight="bold" font-size="12pt">
<fo:inline white-space-collapse="false" font-family="monospace"
text-decoration="underline" font-size="12pt">
<fo:inline white-space-collapse="false" color="#0033FF"
font-family="monospace" font-size="12pt">Customer Details
</fo:inline>
</fo:inline>
</fo:inline> <fo:inline white-space-collapse="false"
font-family="monospace" font-weight="bold" font-size="12pt">
<fo:inline white-space-collapse="false" font-family="monospace"
font-style="italic" font-size="12pt">
<fo:inline white-space-collapse="false" font-family="monospace"
text-decoration="underline" font-size="12pt">WARD </fo:inline>
</fo:inline>
</fo:inline>
<fo:inline white-space-collapse="false"
font-family="monospace" font-weight="bold" font-size="12pt">
<fo:inline white-space-collapse="false" font-family="monospace"
font-style="italic" font-size="12pt">
<fo:inline white-space-collapse="false" font-family="monospace"
text-decoration="underline" font-size="12pt">ANALYST
</fo:inline>
</fo:inline>
</fo:inline>
<fo:inline white-space-collapse="false"
font-family="monospace" font-weight="bold" font-size="12pt">
<fo:inline white-space-collapse="false" font-family="monospace"
font-style="italic" font-size="12pt">
<fo:inline white-space-collapse="false" font-family="monospace"
text-decoration="underline" font-size="12pt">ward@myaccount.com
</fo:inline>
</fo:inline>
</fo:inline>
<fo:inline white-space-collapse="false" font-family="monospace"
font-weight="bold" font-size="12pt">
<fo:inline white-space-collapse="false" font-family="monospace"
text-decoration="underline" font-size="12pt">
<fo:inline white-space-collapse="false" color="#FF0000"
font-family="monospace" font-size="12pt">Credit Records
</fo:inline>
</fo:inline>
</fo:inline>
----------------------------------------------------------------------------------------
<fo:inline white-space-collapse="false" font-family="monospace"
font-weight="bold" font-size="12pt"> DATE </fo:inline>
<fo:inline white-space-collapse="false" font-family="monospace"
font-weight="bold" font-size="12pt"> ACCOUNT NO </fo:inline>
<fo:inline white-space-collapse="false" font-family="monospace"
font-weight="bold" font-size="12pt"> AMOUNT </fo:inline>
-----------------------------------------------------------------------------------------
11-Jan-2003 1001
1000.00
11-Jan-2003 1005
1800.00
11-Jan-2003 1015
3800.00
11-Jan-2003 1016
4000.00
11-Jan-2003 2369
1360.00
11-Jan-2003 2372
1363.00
11-Jan-2003 4572
206.00
-------------------------
13529.00
-------------------------
<fo:inline white-space-collapse="false" font-family="monospace"
font-weight="bold" font-size="12pt">
<fo:inline white-space-collapse="false" font-family="monospace"
text-decoration="underline" font-size="12pt">
<fo:inline white-space-collapse="false" color="#FF0000"
font-family="monospace" font-size="12pt">Debit Records </fo:inline>
</fo:inline>
</fo:inline>
-----------------------------------------------------------------------------------------
<fo:inline white-space-collapse="false" font-family="monospace"
font-weight="bold" font-size="12pt"> DATE </fo:inline>
<fo:inline white-space-collapse="false" font-family="monospace"
font-weight="bold" font-size="12pt"> ACCOUNT NO </fo:inline>
<fo:inline white-space-collapse="false" font-family="monospace"
font-weight="bold" font-size="12pt"> AMOUNT </fo:inline>
-----------------------------------------------------------------------------------------
11-Jan-2003 1001
1000.00
11-Jan-2003 1005
1800.00
11-Jan-2003 1015
3800.00
11-Jan-2003 1016
4000.00
11-Jan-2003 2369
1360.00
11-Jan-2003 2372
1363.00
11-Jan-2003 4572
206.00
-------------------------
13529.000
-------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
IntellectReport.XML
<HTML><style type="text/css">td { font-family:Courier New;font-size:12;
}</style> <HEAD><meta http-equiv="Content-Type" content="text/html;
charset= ISO-8859-1"></meta></HEAD><BODY><FORM><PRE><p>
<B><I><U> ABC Bank Customer Credit And Debit
Records </U></I></B>
As Of Date :22-Feb-2010
<B><U><font color = "#0033FF">Customer Details </font></U></B>
<B><I><U>ALEN </U></I></B>
<B><I><U>SALESMAN </U></I></B>
<B><I><U>allen@myaccount.com </U></I></B>
<B><U><font color = "#FF0000">Credit Records </font></U></B>
----------------------------------------------------------------------------------------
<B> DATE </B> <B> ACCOUNT NO </B>
<B> AMOUNT </B>
-----------------------------------------------------------------------------------------
16-Mar-2002 2365
1356.00
16-Mar-2002 4567
201.00
16-Mar-2002 3565
4543.00
-------------------------
6100.00
-------------------------
<B><U><font color = "#FF0000">Debit Records </font></U></B>
-----------------------------------------------------------------------------------------
<B> DATE </B> <B> ACCOUNT NO </B>
<B> AMOUNT </B>
-----------------------------------------------------------------------------------------
16-Mar-2002 2365
1356.00
16-Mar-2002 4567
201.00
16-Mar-2002 3565
4543.00
-------------------------
6100.000
Copyright Statement </fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root> top.showClose();
philippe voncken
<mail@philippevon
cken.com> To
fop-users@xmlgraphics.apache.org
02/24/2010 08:28 cc
PM
Subject
Re: AW: AW: PDF reprot with
Please respond to improper align data
fop-users@xmlgrap
hics.apache.org
May be a Xalan version error.
2010/2/24 <ja...@polaris.co.in>
HI,
I have generated the foo.fo file [xsl+xml->fo],When try to generate
the
PDF file with the command <Fop foo.fo jp.pdf >/<Fop -fo foo.fo -pdf
jp.pdf
> getting below error.
Please help to resove the same.
C:\Documents and Settings\jaiprakash.pande\Desktop\fop-0.95>Fop foo.fo
jp.pdf
[Fatal Error] foo.fo:1:1: Content is not allowed in prolog.
Feb 24, 2010 8:00:46 PM org.apache.fop.cli.Main startFOP
SEVERE: Exception
javax.xml.transform.TransformerException: org.xml.sax.SAXParseException:
Content is not allowed in prolog. at
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:217) at
org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125) at
org.apache.fop.cli.Main.startFOP(Main.java:166) at
org.apache.fop.cli.Main.main(Main.java:197)
---------
javax.xml.transform.TransformerException: org.xml.sax.SAXParseException:
Content is not allowed in prolog. at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transf
ormerIdentityImpl.java:469) at
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:214) at
org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125) at
org.apache.fop.cli.Main.startFOP(Main.java:166) at
org.apache.fop.cli.Main.main(Main.java:197)
Caused by: org.xml.sax.SAXParseException: Content is not allowed in
prolog. at
org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source) at
org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
Sour
ce) at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transf
ormerIdentityImpl.java:452)
Also ,Please find the foo.fo file fopr the same. Georg
Datterl <gdatterl@geneon.
de> To
"fop-users@xmlgraphics.apache.org"
02/24/2010 05:41 <fop-users@xmlgraphics.apache.org
>