You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ines Robbers <ml...@comprehend.de> on 2002/12/30 15:34:29 UTC

pdf problem

Hi there,

I'm running Cocoon 2.0.4 on Windows XP and Tomcat 4.1.

At the moment I'm trying out the examples from the book "Cocoon:
Building XML Applications" by M. Langham & C. Ziegler.

In case of PDF-creation, Acrobat is starting to load the file but then a
window pops up saying: "The file is damaged and could not be repaired".
(Acrobat itself is working fine with other pdf)


This is the Sitemap fragment:

  <map:pipeline>
  	<map:match pattern="myfirstpdf">
  		<map:generate src="myfirstpdf.xml"/>
  		<map:transform src="myfirstpdf.xsl"/>
  		<map:serialize type="fo2pdf"/>
  	</map:match>
  </map:pipeline>


This is the XML:

<?xml version="1.0"?>
<data>
	<name>Ines</name>
</data>


And the XSL:

<?xml version="1.0"?>

<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:fo="http://www.w3.org/1999/XSL/Format">

  <xsl:template match="/">
   <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
   
    <fo:layout-master-set>
     <fo:simple-page-master master-name="page"
                  page-height="29.7cm" 
                  page-width="21cm"
                  margin-top="1cm" 
                  margin-bottom="2cm" 
                  margin-left="2.5cm" 
                  margin-right="2.5cm">
       <fo:region-before extent="3cm"/>
       <fo:region-body margin-top="3cm"/>
       <fo:region-after extent="1.5cm"/>
     </fo:simple-page-master>

     <fo:page-sequence-master master-name="all">
       <fo:repeatable-page-master-alternatives>
	 <fo:conditional-page-master-reference master-name="page"
page-position="first"/>
       </fo:repeatable-page-master-alternatives>
     </fo:page-sequence-master>
    </fo:layout-master-set>

    <fo:page-sequence master-name="all">
      <fo:flow flow-name="xsl-region-body">
        <xsl:apply-templates/>
      </fo:flow>
    </fo:page-sequence>
   </fo:root>
  </xsl:template>

  <xsl:template match="data">
    <fo:block font-size="36pt" space-before.optimum="24pt"
text-align="center"><xsl:value-of select="name"/></fo:block>
  </xsl:template>

</xsl:stylesheet>


I've also tried it with different filenames in different folders but
it's always the same error message.

Anyone got an idea?

Many thanks for help!


Ines 



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: cocoon book [was: pdf problem]

Posted by Perry Molendijk <xi...@iinet.net.au>.
> Can you recommend one that is suitable for a beginner like me with some
> XML and XSLT and no Java knowledge?

Don't know about books but this tutorial on XSL:FO is pretty good:

http://www.antennahouse.com/XSLsample/XSLsample.htm

And have a look in the links section of the Cocoon doco.

Perry



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: cocoon book [was: pdf problem]

Posted by Peter Hertogen <pe...@atgemini.be>.
sorry Ines, 

I see you got the book already. 
I didn't read the "pdf problem" list, so just ignore my mail

-----Original Message-----
From: Ines Robbers [mailto:mlist@comprehend.de]
Sent: maandag 30 december 2002 23:59
To: cocoon-users@xml.apache.org
Subject: cocoon book [was: pdf problem]


Hi,

Many thanks for your reply!

* (and get a more recent book).

Can you recommend one that is suitable for a beginner like me with some
XML and XSLT and no Java knowledge?

Cheers,

Ines





---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.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/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: cocoon book [was: pdf problem]

Posted by Jeremy Aston <je...@yahoo.co.uk>.
Wrox do another excellent XSLT book - "Beginning XSLT"
which I thoroughly recommend for even quite
experienced XSLT coders.  It has loads of best
practice and well worked examples.

There is a link from my site (http://www.pigbite.com)

Best regards

Jeremy

P.S. (said in complete side whisper....) Of course for
Cocoon I would recommend Lajos' and my book ;-) nudge
nudge, wink wink, say no more....

 --- Kavitha Ramesh <ka...@yahoo.com>
wrote: > Hi,
> 
> I could recommend Professional XSLT Programming from
> the  wrox publishers.
> 
> Kavitha Ramesh
> 
> 
> --- Ines Robbers <ml...@comprehend.de> wrote:
> > Hi,
> > 
> > Many thanks for your reply!
> > 
> > * (and get a more recent book).
> > 
> > Can you recommend one that is suitable for a
> > beginner like me with some
> > XML and XSLT and no Java knowledge?
> > 
> > Cheers,
> > 
> > Ines
> > 
> > 
> > 
> > 
> > 
> >
>
---------------------------------------------------------------------
> > Please check that your question  has not already
> > been answered in the
> > FAQ before posting.    
> > <http://xml.apache.org/cocoon/faq/index.html>
> > 
> > To unsubscribe, e-mail:    
> > <co...@xml.apache.org>
> > For additional commands, e-mail:  
> > <co...@xml.apache.org>
> > 
> 
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up
> now.
> http://mailplus.yahoo.com
> 
>
---------------------------------------------------------------------
> Please check that your question  has not already
> been answered in the
> FAQ before posting.    
> <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:    
> <co...@xml.apache.org>
> For additional commands, e-mail:  
> <co...@xml.apache.org>
>  

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: cocoon book [was: pdf problem]

Posted by Kavitha Ramesh <ka...@yahoo.com>.
Hi,

I could recommend Professional XSLT Programming from
the  wrox publishers.

Kavitha Ramesh


--- Ines Robbers <ml...@comprehend.de> wrote:
> Hi,
> 
> Many thanks for your reply!
> 
> * (and get a more recent book).
> 
> Can you recommend one that is suitable for a
> beginner like me with some
> XML and XSLT and no Java knowledge?
> 
> Cheers,
> 
> Ines
> 
> 
> 
> 
> 
>
---------------------------------------------------------------------
> Please check that your question  has not already
> been answered in the
> FAQ before posting.    
> <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:    
> <co...@xml.apache.org>
> For additional commands, e-mail:  
> <co...@xml.apache.org>
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: cocoon book [was: pdf problem]

Posted by Peter Hertogen <pe...@atgemini.be>.
cocoon: building xml applications, written by 2 committers of the cocoon
project
by matthew langham and carsten ziegeler, New Riders

they did a good job writing this book (I am a XML and Java newbie)

rgds,
peter

-----Original Message-----
From: Ines Robbers [mailto:mlist@comprehend.de]
Sent: maandag 30 december 2002 23:59
To: cocoon-users@xml.apache.org
Subject: cocoon book [was: pdf problem]


Hi,

Many thanks for your reply!

* (and get a more recent book).

Can you recommend one that is suitable for a beginner like me with some
XML and XSLT and no Java knowledge?

Cheers,

Ines





---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.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/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


cocoon book [was: pdf problem]

Posted by Ines Robbers <ml...@comprehend.de>.
Hi,

Many thanks for your reply!

* (and get a more recent book).

Can you recommend one that is suitable for a beginner like me with some
XML and XSLT and no Java knowledge?

Cheers,

Ines





---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: pdf problem

Posted by Joerg Pietschmann <j3...@yahoo.de>.
On Monday 30 December 2002 15:34, you wrote:
> In case of PDF-creation, Acrobat is starting to load the file but then a
> window pops up saying: "The file is damaged and could not be repaired".

Most probably the problem is caused by an unhandled exception
during PDF rendering, causing the error apge generator to kick in.

General hints for debugging this kind of problem:
1.) Save the file to disk instead of open it in IEx. Try to open the
asved file in Acrobat Reader. If this works, the problem is with your
IEx configuration.
2.) Search the Cocoon logs for log entries related to the URl for the
document. Look if there are exceptions.
In case of generating PDF, you'll also have to examine the stdout
and stderr log of the servlet container, the serializer writes a few
problem diagnostics there (a long standing bug).
3.) If there are problems logged (or even if there aren't any), check
whether your file(s) work with command line processors.
3a) Run your XML+XSL through the command line application
from Xalan or Saxon. This will tell you whether there are problems
with your source XML or the style sheet.
3b) Run the resulting FO file through the FOP command line application.
This will tell you whether there are problems with PDF rendering. Try
to open the generated PDF with Acrobat Reader.

BTW your problem is here:
      <fo:conditional-page-master-reference master-name="page"
The XSLFO spec has been changed between the final CR (apparently
used by your book) and the final RC, replace "master-name" with
"master-reference" (and get a more recent book).

J.Pietschmann

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: pdf problem

Posted by Antonio Gallardo <ag...@agsoftware.dnsalias.com>.
I already have running and application with 2.1 CVS and in some versions
of Internet Explorer I see this error.

Antonio Gallardo

Perry Molendijk dijo:
> This is a pretty vague reply but I ran into the same problem when moving
> from C2.0.3 to C2.1 but I can't remember exactly what I did to fix it. I
> do know it has to do with Cocoon because the same files were working
> fine under C2.0.3.
>
> Check the error log (%PATH_TO_COCOON/WEB_INF/logs).
>
> I think it had to with some jars (xalan-2.4.1.jar, xercesImpl-2.1.0.jar
> and xml-apis.jar) not being in the common\endorsed of the tomcat
> installation.
>
> Perry
>
> ----- Original Message -----
> From: "Antonio Gallardo" <ag...@agsoftware.dnsalias.com>
> To: <co...@xml.apache.org>
> Sent: Monday, December 30, 2002 11:04 PM
> Subject: Re: pdf problem
>
>
>> Hi Ines:
>>
>> Assuming that the PDF generation is right. There is a problem with
>> Adobe Acrobat Reader. Try to set in the configuration of Acrobat that
>> will not open on the same windows (explorer). It must resolve your
>> problem.
>>
>> Regards,
>>
>> Antonio Gallardo.
>>
>> Ines Robbers dijo:
>> > Hi there,
>> >
>> > I'm running Cocoon 2.0.4 on Windows XP and Tomcat 4.1.
>> >
>> > At the moment I'm trying out the examples from the book "Cocoon:
>> Building XML Applications" by M. Langham & C. Ziegler.
>> >
>> > In case of PDF-creation, Acrobat is starting to load the file but
>> then a window pops up saying: "The file is damaged and could not be
>> repaired". (Acrobat itself is working fine with other pdf)
>> >
>> >
>> > This is the Sitemap fragment:
>> >
>> >   <map:pipeline>
>> >   <map:match pattern="myfirstpdf">
>> >   <map:generate src="myfirstpdf.xml"/>
>> >   <map:transform src="myfirstpdf.xsl"/>
>> >   <map:serialize type="fo2pdf"/>
>> >   </map:match>
>> >   </map:pipeline>
>> >
>> >
>> > This is the XML:
>> >
>> > <?xml version="1.0"?>
>> > <data>
>> > <name>Ines</name>
>> > </data>
>> >
>> >
>> > And the XSL:
>> >
>> > <?xml version="1.0"?>
>> >
>> > <xsl:stylesheet version="1.0"
>> >   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>> >   xmlns:fo="http://www.w3.org/1999/XSL/Format">
>> >
>> >   <xsl:template match="/">
>> >    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
>> >
>> >     <fo:layout-master-set>
>> >      <fo:simple-page-master master-name="page"
>> >                   page-height="29.7cm"
>> >                   page-width="21cm"
>> >                   margin-top="1cm"
>> >                   margin-bottom="2cm"
>> >                   margin-left="2.5cm"
>> >                   margin-right="2.5cm">
>> >        <fo:region-before extent="3cm"/>
>> >        <fo:region-body margin-top="3cm"/>
>> >        <fo:region-after extent="1.5cm"/>
>> >      </fo:simple-page-master>
>> >
>> >      <fo:page-sequence-master master-name="all">
>> >        <fo:repeatable-page-master-alternatives>
>> > <fo:conditional-page-master-reference master-name="page"
>> > page-position="first"/>
>> >        </fo:repeatable-page-master-alternatives>
>> >      </fo:page-sequence-master>
>> >     </fo:layout-master-set>
>> >
>> >     <fo:page-sequence master-name="all">
>> >       <fo:flow flow-name="xsl-region-body">
>> >         <xsl:apply-templates/>
>> >       </fo:flow>
>> >     </fo:page-sequence>
>> >    </fo:root>
>> >   </xsl:template>
>> >
>> >   <xsl:template match="data">
>> >     <fo:block font-size="36pt" space-before.optimum="24pt"
>> > text-align="center"><xsl:value-of select="name"/></fo:block>
>> >   </xsl:template>
>> >
>> > </xsl:stylesheet>
>> >
>> >
>> > I've also tried it with different filenames in different folders but
>> it's always the same error message.
>> >
>> > Anyone got an idea?
>> >
>> > Many thanks for help!
>> >
>> >
>> > Ines
>> >
>> >
>> >
>> > ---------------------------------------------------------------------
>> Please check that your question  has not already been answered in
>> the FAQ before posting.
>> <http://xml.apache.org/cocoon/faq/index.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/faq/index.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/faq/index.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/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: pdf problem

Posted by Perry Molendijk <xi...@iinet.net.au>.
>>I opened the folder %PATH_TO_COCOON/WEB_INF/logs but not sure what to
>>look for...

Anything pointing something not being found. Have a look through all the
files in this directory.

Restart Tomcat and run any file that works with cocoon and then have a look
at the logs, you will get a better understanding. I don't know myself what
it all means but it's not that hard to pick up something that's wrong.

>>Where do I get these jars you were talking of and where do I put them?

The jars are in Cocoon/WEB-INF/lib copy them to TOMCAT/common/endorsed. I
believe this is only required when using JDK 1.4. I am not sure about your
environment but have a look at:
http://outerthought.net/wiki/Wiki.jsp?page=Cocoon2.1DevSetupWin2000 anyway.

Cheers,

Perry


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


AW: pdf problem

Posted by Ines Robbers <ml...@comprehend.de>.
Hi,

I'm a total beginner... 
I opened the folder %PATH_TO_COCOON/WEB_INF/logs but not sure what to
look for...

Where do I get these jars you were talking of and where do I put them?



Ines




* -----Ursprüngliche Nachricht-----
* Von: Perry Molendijk [mailto:xions@iinet.net.au] 
* Gesendet: Montag, 30. Dezember 2002 16:46
* An: cocoon-users@xml.apache.org
* Betreff: Re: pdf problem
* 
* 
* This is a pretty vague reply but I ran into the same problem 
* when moving from C2.0.3 to C2.1 but I can't remember exactly 
* what I did to fix it. I do know it has to do with Cocoon 
* because the same files were working fine under C2.0.3.
* 
* Check the error log (%PATH_TO_COCOON/WEB_INF/logs).
* 
* I think it had to with some jars (xalan-2.4.1.jar, 
* xercesImpl-2.1.0.jar and
* xml-apis.jar) not being in the common\endorsed of the tomcat 
* installation.
* 
* Perry
* 
* ----- Original Message -----
* From: "Antonio Gallardo" <ag...@agsoftware.dnsalias.com>
* To: <co...@xml.apache.org>
* Sent: Monday, December 30, 2002 11:04 PM
* Subject: Re: pdf problem
* 
* 
* > Hi Ines:
* >
* > Assuming that the PDF generation is right. There is a problem with 
* > Adobe Acrobat Reader. Try to set in the configuration of 
* Acrobat that 
* > will not open on the same windows (explorer). It must resolve your 
* > problem.
* >
* > Regards,
* >
* > Antonio Gallardo.
* >
* > Ines Robbers dijo:
* > > Hi there,
* > >
* > > I'm running Cocoon 2.0.4 on Windows XP and Tomcat 4.1.
* > >
* > > At the moment I'm trying out the examples from the book "Cocoon: 
* > > Building XML Applications" by M. Langham & C. Ziegler.
* > >
* > > In case of PDF-creation, Acrobat is starting to load the file but 
* > > then a window pops up saying: "The file is damaged and 
* could not be 
* > > repaired". (Acrobat itself is working fine with other pdf)
* > >
* > >
* > > This is the Sitemap fragment:
* > >
* > >   <map:pipeline>
* > >   <map:match pattern="myfirstpdf">
* > >   <map:generate src="myfirstpdf.xml"/>
* > >   <map:transform src="myfirstpdf.xsl"/>
* > >   <map:serialize type="fo2pdf"/>
* > >   </map:match>
* > >   </map:pipeline>
* > >
* > >
* > > This is the XML:
* > >
* > > <?xml version="1.0"?>
* > > <data>
* > > <name>Ines</name>
* > > </data>
* > >
* > >
* > > And the XSL:
* > >
* > > <?xml version="1.0"?>
* > >
* > > <xsl:stylesheet version="1.0"
* > >   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
* > >   xmlns:fo="http://www.w3.org/1999/XSL/Format">
* > >
* > >   <xsl:template match="/">
* > >    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
* > >
* > >     <fo:layout-master-set>
* > >      <fo:simple-page-master master-name="page"
* > >                   page-height="29.7cm"
* > >                   page-width="21cm"
* > >                   margin-top="1cm"
* > >                   margin-bottom="2cm"
* > >                   margin-left="2.5cm"
* > >                   margin-right="2.5cm">
* > >        <fo:region-before extent="3cm"/>
* > >        <fo:region-body margin-top="3cm"/>
* > >        <fo:region-after extent="1.5cm"/>
* > >      </fo:simple-page-master>
* > >
* > >      <fo:page-sequence-master master-name="all">
* > >        <fo:repeatable-page-master-alternatives>
* > > <fo:conditional-page-master-reference master-name="page" 
* > > page-position="first"/>
* > >        </fo:repeatable-page-master-alternatives>
* > >      </fo:page-sequence-master>
* > >     </fo:layout-master-set>
* > >
* > >     <fo:page-sequence master-name="all">
* > >       <fo:flow flow-name="xsl-region-body">
* > >         <xsl:apply-templates/>
* > >       </fo:flow>
* > >     </fo:page-sequence>
* > >    </fo:root>
* > >   </xsl:template>
* > >
* > >   <xsl:template match="data">
* > >     <fo:block font-size="36pt" space-before.optimum="24pt" 
* > > text-align="center"><xsl:value-of select="name"/></fo:block>
* > >   </xsl:template>
* > >
* > > </xsl:stylesheet>
* > >
* > >
* > > I've also tried it with different filenames in different 
* folders but 
* > > it's always the same error message.
* > >
* > > Anyone got an idea?
* > >
* > > Many thanks for help!
* > >
* > >
* > > Ines
* > >
* > >
* > >
* > > 
* --------------------------------------------------------------------
* > > -
* > > Please check that your question  has not already been 
* answered in the
* > > FAQ before posting.     
* <http://xml.apache.org/cocoon/faq/index.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/faq/index.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/faq/index.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/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: pdf problem

Posted by Perry Molendijk <xi...@iinet.net.au>.
This is a pretty vague reply but I ran into the same problem when moving
from C2.0.3 to C2.1 but I can't remember exactly what I did to fix it. I do
know it has to do with Cocoon because the same files were working fine under
C2.0.3.

Check the error log (%PATH_TO_COCOON/WEB_INF/logs).

I think it had to with some jars (xalan-2.4.1.jar, xercesImpl-2.1.0.jar and
xml-apis.jar) not being in the common\endorsed of the tomcat installation.

Perry

----- Original Message -----
From: "Antonio Gallardo" <ag...@agsoftware.dnsalias.com>
To: <co...@xml.apache.org>
Sent: Monday, December 30, 2002 11:04 PM
Subject: Re: pdf problem


> Hi Ines:
>
> Assuming that the PDF generation is right. There is a problem with Adobe
> Acrobat Reader. Try to set in the configuration of Acrobat that will not
> open on the same windows (explorer). It must resolve your problem.
>
> Regards,
>
> Antonio Gallardo.
>
> Ines Robbers dijo:
> > Hi there,
> >
> > I'm running Cocoon 2.0.4 on Windows XP and Tomcat 4.1.
> >
> > At the moment I'm trying out the examples from the book "Cocoon:
> > Building XML Applications" by M. Langham & C. Ziegler.
> >
> > In case of PDF-creation, Acrobat is starting to load the file but then a
> > window pops up saying: "The file is damaged and could not be repaired".
> > (Acrobat itself is working fine with other pdf)
> >
> >
> > This is the Sitemap fragment:
> >
> >   <map:pipeline>
> >   <map:match pattern="myfirstpdf">
> >   <map:generate src="myfirstpdf.xml"/>
> >   <map:transform src="myfirstpdf.xsl"/>
> >   <map:serialize type="fo2pdf"/>
> >   </map:match>
> >   </map:pipeline>
> >
> >
> > This is the XML:
> >
> > <?xml version="1.0"?>
> > <data>
> > <name>Ines</name>
> > </data>
> >
> >
> > And the XSL:
> >
> > <?xml version="1.0"?>
> >
> > <xsl:stylesheet version="1.0"
> >   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> >   xmlns:fo="http://www.w3.org/1999/XSL/Format">
> >
> >   <xsl:template match="/">
> >    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
> >
> >     <fo:layout-master-set>
> >      <fo:simple-page-master master-name="page"
> >                   page-height="29.7cm"
> >                   page-width="21cm"
> >                   margin-top="1cm"
> >                   margin-bottom="2cm"
> >                   margin-left="2.5cm"
> >                   margin-right="2.5cm">
> >        <fo:region-before extent="3cm"/>
> >        <fo:region-body margin-top="3cm"/>
> >        <fo:region-after extent="1.5cm"/>
> >      </fo:simple-page-master>
> >
> >      <fo:page-sequence-master master-name="all">
> >        <fo:repeatable-page-master-alternatives>
> > <fo:conditional-page-master-reference master-name="page"
> > page-position="first"/>
> >        </fo:repeatable-page-master-alternatives>
> >      </fo:page-sequence-master>
> >     </fo:layout-master-set>
> >
> >     <fo:page-sequence master-name="all">
> >       <fo:flow flow-name="xsl-region-body">
> >         <xsl:apply-templates/>
> >       </fo:flow>
> >     </fo:page-sequence>
> >    </fo:root>
> >   </xsl:template>
> >
> >   <xsl:template match="data">
> >     <fo:block font-size="36pt" space-before.optimum="24pt"
> > text-align="center"><xsl:value-of select="name"/></fo:block>
> >   </xsl:template>
> >
> > </xsl:stylesheet>
> >
> >
> > I've also tried it with different filenames in different folders but
> > it's always the same error message.
> >
> > Anyone got an idea?
> >
> > Many thanks for help!
> >
> >
> > Ines
> >
> >
> >
> > ---------------------------------------------------------------------
> > Please check that your question  has not already been answered in the
> > FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.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/faq/index.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/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: pdf problem

Posted by Antonio Gallardo <ag...@agsoftware.dnsalias.com>.
Hi Ines:

Assuming that the PDF generation is right. There is a problem with Adobe
Acrobat Reader. Try to set in the configuration of Acrobat that will not
open on the same windows (explorer). It must resolve your problem.

Regards,

Antonio Gallardo.

Ines Robbers dijo:
> Hi there,
>
> I'm running Cocoon 2.0.4 on Windows XP and Tomcat 4.1.
>
> At the moment I'm trying out the examples from the book "Cocoon:
> Building XML Applications" by M. Langham & C. Ziegler.
>
> In case of PDF-creation, Acrobat is starting to load the file but then a
> window pops up saying: "The file is damaged and could not be repaired".
> (Acrobat itself is working fine with other pdf)
>
>
> This is the Sitemap fragment:
>
>   <map:pipeline>
>   	<map:match pattern="myfirstpdf">
>   		<map:generate src="myfirstpdf.xml"/>
>   		<map:transform src="myfirstpdf.xsl"/>
>   		<map:serialize type="fo2pdf"/>
>   	</map:match>
>   </map:pipeline>
>
>
> This is the XML:
>
> <?xml version="1.0"?>
> <data>
> 	<name>Ines</name>
> </data>
>
>
> And the XSL:
>
> <?xml version="1.0"?>
>
> <xsl:stylesheet version="1.0"
>   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>   xmlns:fo="http://www.w3.org/1999/XSL/Format">
>
>   <xsl:template match="/">
>    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
>
>     <fo:layout-master-set>
>      <fo:simple-page-master master-name="page"
>                   page-height="29.7cm"
>                   page-width="21cm"
>                   margin-top="1cm"
>                   margin-bottom="2cm"
>                   margin-left="2.5cm"
>                   margin-right="2.5cm">
>        <fo:region-before extent="3cm"/>
>        <fo:region-body margin-top="3cm"/>
>        <fo:region-after extent="1.5cm"/>
>      </fo:simple-page-master>
>
>      <fo:page-sequence-master master-name="all">
>        <fo:repeatable-page-master-alternatives>
> 	 <fo:conditional-page-master-reference master-name="page"
> page-position="first"/>
>        </fo:repeatable-page-master-alternatives>
>      </fo:page-sequence-master>
>     </fo:layout-master-set>
>
>     <fo:page-sequence master-name="all">
>       <fo:flow flow-name="xsl-region-body">
>         <xsl:apply-templates/>
>       </fo:flow>
>     </fo:page-sequence>
>    </fo:root>
>   </xsl:template>
>
>   <xsl:template match="data">
>     <fo:block font-size="36pt" space-before.optimum="24pt"
> text-align="center"><xsl:value-of select="name"/></fo:block>
>   </xsl:template>
>
> </xsl:stylesheet>
>
>
> I've also tried it with different filenames in different folders but
> it's always the same error message.
>
> Anyone got an idea?
>
> Many thanks for help!
>
>
> Ines
>
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.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/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>