You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Carl Mace <sp...@hotmail.com> on 2001/02/22 23:15:35 UTC

XML to PDF

I've done some xml transformations into PDF format.  This works fine on 
netscape and versions of IE less than 5.  But when I use 5 and above the 
page isn't displayed and the Adobe plug-in isn't activated.

Has anyone been able to solve this problem??

Thanx

C
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


Re: XML to PDF

Posted by Pae Choi <pa...@earthlink.net>.
[FYI] Funny how strange world we are in. IEv5+(including v5.5)
launching Acrobat Reader and displays in the browser fine for me.

Pae

----- Original Message -----
From: "Thomas Patterson" <tp...@telisphere.com>
To: <co...@xml.apache.org>
Sent: Thursday, February 22, 2001 3:59 PM
Subject: Re: XML to PDF


> Check the FAQ, the solution that worked for me is indicated in there.
>
>
> ----- Original Message -----
> From: "Carl Mace" <sp...@hotmail.com>
> To: <co...@xml.apache.org>
> Sent: Thursday, February 22, 2001 2:15 PM
> Subject: XML to PDF
>
>
> > I've done some xml transformations into PDF format.  This works fine on
> > netscape and versions of IE less than 5.  But when I use 5 and above the
> > page isn't displayed and the Adobe plug-in isn't activated.
> >
> > Has anyone been able to solve this problem??
> >
> > Thanx
> >
> > C
> >
_________________________________________________________________________
> > Get Your Private, Free E-mail from MSN Hotmail at
http://www.hotmail.com.
> >
> >
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> >
> > To unsubscribe, e-mail: <co...@xml.apache.org>
> > For additional commands, e-mail: <co...@xml.apache.org>
> >
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>


RE: tables in XSLT:FO

Posted by John Menke <jo...@eagleinfosystems.com>.
I have been using the following code to generate tables from XML files into
a PDF document.  I think you can probably alter it to work with your
document.  It will produce a table from XML formatted like below. Note that
you need to declare column widths for PDF documents.

<table numColumns="2" width="30mm">
				<tablesection name="Section 1 Name">
					<entry>Entry 1</entry>
					<entry>Entty 2</entry>
				</tablesection>
				<tablesection name="Section 2 Name">
					<entry>Entry 1</entry>
					<entry>Entry 2</entry>
				</tablesection>
</table>


<xsl:template name="columnFormatter">
	<xsl:param name="N" />
	<xsl:param name="MAX" />
	<xsl:param name="WIDTH" />
			<xsl:if test="$MAX>= $N">
					<fo:table-column column-width="{$WIDTH}"/>
					<xsl:call-template name="columnFormatter">
						<xsl:with-param name="N">
							<xsl:value-of select="$N + 1"/>
						</xsl:with-param>
						<xsl:with-param name="MAX">
							<xsl:value-of select="$MAX"/>
						</xsl:with-param>
						<xsl:with-param name="WIDTH">
							<xsl:value-of select="$WIDTH"/>
						</xsl:with-param>
					</xsl:call-template>
	         </xsl:if>
</xsl:template>

<xsl:template match="table">
  		<fo:table space-before="3mm" space-after="3mm">
				<xsl:call-template name="columnFormatter">
						<xsl:with-param name="N">
							1
						</xsl:with-param>
						<xsl:with-param name="MAX">
							<xsl:value-of select="@numColumns"/>
						</xsl:with-param>
						<xsl:with-param name="WIDTH">
							<xsl:value-of select="@width"/>
						</xsl:with-param>
				</xsl:call-template>
				<fo:table-body >

    						<fo:table-row  >
       								<xsl:apply-templates select="tablesection"/>
   						 </fo:table-row>


   						 <xsl:call-template name="rowCounter">
      					<xsl:with-param name="N" select="1"/>
  						 </xsl:call-template>
					</fo:table-body>
  		</fo:table>
</xsl:template>




<xsl:template name="rowCounter">
   <xsl:param name="N" />

   <xsl:if test="tablesection/entry[ $N ]">
     <fo:table-row>
      		<xsl:for-each select="tablesection">
        				<fo:table-cell border-width="0.5mm"  >
								<fo:block font-size="3mm" text-align="center" >
          									<xsl:apply-templates select="entry[ $N ]"/>
         			 							<xsl:text> </xsl:text>
								</fo:block>
        				</fo:table-cell>
     		 </xsl:for-each>
     </fo:table-row>

     <xsl:call-template name="rowCounter">
       		<xsl:with-param name="N" select="$N + 1"/>
     		</xsl:call-template>
   </xsl:if>
</xsl:template>

<xsl:template match="tablesection">
   		<fo:table-cell border-width="0.5mm" background-color="blue"  >
					<fo:block font-size="3mm"  font-weight="bold" color="white"
text-align="center">
					<xsl:value-of select="@name"/>
					</fo:block>
		</fo:table-cell>
</xsl:template>



> -----Original Message-----
> From: CM [mailto:mcai8cm2@ist4.co.umist.ac.uk]
> Sent: Monday, March 05, 2001 8:54 AM
> To: cocoon-users@xml.apache.org
> Subject: tables in XSLT:FO
>
>
> I have been doing some transformations from XML to PDF and my
> fo tables don't appear to be working
>
> I using the structure
>
> <fo:table>
>  <fo:table-body>
>   <fo:table-row>
>    <fo:table-cell>
>     <fo:block>
>     </fo:block>
>    </fo:table-cell>
>   </fo:table-row>
>  </fo:table-body>
> </fo:table>
>
> is this the correct struture??
>
> C
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>


tables in XSLT:FO

Posted by CM <mc...@ist4.co.umist.ac.uk>.
I have been doing some transformations from XML to PDF and my 
fo tables don't appear to be working

I using the structure

<fo:table>
 <fo:table-body>
  <fo:table-row>
   <fo:table-cell>
    <fo:block>
    </fo:block>
   </fo:table-cell>
  </fo:table-row>
 </fo:table-body>
</fo:table>

is this the correct struture??

C

Re: XML to PDF

Posted by Thomas Patterson <tp...@telisphere.com>.
Check the FAQ, the solution that worked for me is indicated in there.


----- Original Message ----- 
From: "Carl Mace" <sp...@hotmail.com>
To: <co...@xml.apache.org>
Sent: Thursday, February 22, 2001 2:15 PM
Subject: XML to PDF


> I've done some xml transformations into PDF format.  This works fine on 
> netscape and versions of IE less than 5.  But when I use 5 and above the 
> page isn't displayed and the Adobe plug-in isn't activated.
> 
> Has anyone been able to solve this problem??
> 
> Thanx
> 
> C
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
> 
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>