Re: PDF generation fails sometimes

2006-08-17 Thread lifeleaf

Hi,
Sorry I cant put my code here, it involves 10+ java code, and a 400+ lines
xslt, plus lots .jar files.
I hope I can get some hint for this problem. Debug probably will not help me
since this is not happen always, debug means process code slowly and that
probably will not generate a err then.

I can provide more details about this:
1. I use IE activex (object classid='.') to get the pdf, and I have 2
of this in iframe, 1 in an open window at same time.
2. If I do this quite slow, the error will not happen
3, if I close the open-window quite fast(may before the PDF files are
actually generated), and start all 3 again, it will happen 1 of 10-40 times.
Althougn this is quite seldom, but still is not acceptable for my situation.

Thanks in advance
Michael 



Jeremias Maerki-2 wrote:
 
 There's no way we can assist you without an actual FO that causes this
 exception. So, you'll have to produce an FO file from one of your
 documents you know causes the error and you'll have to try to anonymize
 the FO file without losing the ability to reproduce the exception if the
 content is problematic. Otherwise, you'll simply have to set up FOP for
 debugging and find the bug yourself.
 
 On 15.08.2006 22:52:23 lifeleaf wrote:
 
 I am using 0.92beta, using xslt to PDF.
 
 
 Most of time the generation works fine, but sometimes it throw exception
 as
 following, it seems some class is not thread safe:
 
 ; SystemID:
 file:///usr/bea/home/beadtp4/config/dp4/tecp/config/conf/fop/fax-mail.xsl;
 Line#: 66; Column#: 93
 javax.xml.transform.TransformerException:
 java.lang.IllegalArgumentException: The number of this PDFNumber must not
 be
 empty
 at
 org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2344)
 at
 org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:710)
 at
 org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:425)
 at
 org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:216)
 at
 org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2339)
 at
 org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2160)
 at
 org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1213)
 
 
 The line reported wrong in xsl is :
  fo:page-sequence master-reference=Section1-ps 
 
 
 The code is complicate and confidential, so sorry I can not attach here,
 but
 this seems strange, i need some idea how can this happen sometime and not
 always...
 
 
 Jeremias Maerki
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/PDF-generation-fails-sometimes-tf2111448.html#a5858920
Sent from the FOP - Users forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: PDF generation

2006-08-10 Thread Remo Liechti
Thanks guys!
I will try out those hints and ask the docbook list, too.

Have a nice day,
Remo


-Original Message-
From: Andreas L Delmelle [mailto:[EMAIL PROTECTED] 
Sent: Mittwoch, 9. August 2006 18:12
To: fop-users@xmlgraphics.apache.org
Subject: Re: PDF generation

On Aug 9, 2006, at 16:17, Remo Liechti wrote:

Hi,

 I think the only problem I have now is to pass the parameters to  
 the XSL
 document.

 Fop -xsl C:\xsl\fo\docbook.xsl -xml myDocBook.xml -pdf myPdf.pdf

 How do I pass this parameter force-page-count=no-force. To this xsl?
 I Tried a lot of ways, nothing worked... like:

 Fop -xsl C:\xsl\fo\docbook.xsl force-page-count=no-force -xml
 myDocBook.xml -pdf myPdf.pdf

If you're sure this is what you're after (and not an erroneous  
conclusion drawn from Chris' mentioning 'force-page-count' --it is  
supposed to be specified as an attribute/property on fo:page- 
sequence, but maybe docbook allows this to be set through an  
xsl:param?), then it depends on which FOP version you're using.

If you're using 0.20.5, you can't IIRC, unless you perform the XSL  
transformation in a separate step. If you're using 0.92, you can go:

fop -xsl c:\xsl\fo\docbook.xsl -param force-page-count no-force ...


HTH!

Andreas


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

This message may contain legally privileged or confidential information and is 
therefore addressed to the named persons only. The recipient should inform the 
sender and delete this message, if he/she is not named as addressee.
The sender disclaims any and all liability for the integrity and punctuality of 
this message. The sender has activated an automatic virus scanning, but does 
not guarantee the virus free transmission of this message.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: PDF generation

2006-08-10 Thread Remo Liechti
It's me again.
Well, to pass parameters to the XLS works fine, now. For example I can
define the paper size etc.

In the FAQ on
http://xmlgraphics.apache.org/fop/faq.html#blank-page-between-page-seque
nces is written in chapter 3.2:

If you don't want to have this blank page, use
force-page-count=no-force.

Well, the force-page-count parameter is not recognized by the XSL. And I
think it's a FOP parameter because it's in the FOP FAQ. (so this problem
is NOT a docbook related problem)

How do I tell the FOP to use the force-page-count parameter? I'm using
version 0.92.

Thanks
Remo

 


-Original Message-
From: Andreas L Delmelle [mailto:[EMAIL PROTECTED] 
Sent: Mittwoch, 9. August 2006 18:12
To: fop-users@xmlgraphics.apache.org
Subject: Re: PDF generation

On Aug 9, 2006, at 16:17, Remo Liechti wrote:

Hi,

 I think the only problem I have now is to pass the parameters to  
 the XSL
 document.

 Fop -xsl C:\xsl\fo\docbook.xsl -xml myDocBook.xml -pdf myPdf.pdf

 How do I pass this parameter force-page-count=no-force. To this xsl?
 I Tried a lot of ways, nothing worked... like:

 Fop -xsl C:\xsl\fo\docbook.xsl force-page-count=no-force -xml
 myDocBook.xml -pdf myPdf.pdf

If you're sure this is what you're after (and not an erroneous  
conclusion drawn from Chris' mentioning 'force-page-count' --it is  
supposed to be specified as an attribute/property on fo:page- 
sequence, but maybe docbook allows this to be set through an  
xsl:param?), then it depends on which FOP version you're using.

If you're using 0.20.5, you can't IIRC, unless you perform the XSL  
transformation in a separate step. If you're using 0.92, you can go:

fop -xsl c:\xsl\fo\docbook.xsl -param force-page-count no-force ...


HTH!

Andreas


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

This message may contain legally privileged or confidential information and is 
therefore addressed to the named persons only. The recipient should inform the 
sender and delete this message, if he/she is not named as addressee.
The sender disclaims any and all liability for the integrity and punctuality of 
this message. The sender has activated an automatic virus scanning, but does 
not guarantee the virus free transmission of this message.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PDF generation

2006-08-10 Thread Chris Bowditch

Remo Liechti wrote:


It's me again.
Well, to pass parameters to the XLS works fine, now. For example I can
define the paper size etc.

In the FAQ on
http://xmlgraphics.apache.org/fop/faq.html#blank-page-between-page-seque
nces is written in chapter 3.2:

If you don't want to have this blank page, use
force-page-count=no-force.


This is what I told you in my last e-mail.



Well, the force-page-count parameter is not recognized by the XSL. And I
think it's a FOP parameter because it's in the FOP FAQ. (so this problem
is NOT a docbook related problem)

How do I tell the FOP to use the force-page-count parameter? I'm using
version 0.92.


Your XSL-FO needs to have the page-sequence elements with the attribute 
force-page-count=no-force. Since you dont submit XSL-FO to FOP, but 
XSL and XML which is first transformed by Xalan into XSL-FO and then 
sent to FOP, you need to change the XSL to make this happen. The XSL is 
docbook.xsl 


Ask the docbook folks how to get the attribute 
force-page-count=no-force on page-sequence into the XSL-FO generated 
by docbook.xsl. Perhaps I'm not being very clear, in which case I 
apologise, but it seems to me that there is a mis-communication somewhere.


snip/

Chris




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PDF generation

2006-08-10 Thread Vincent Hennebert

2006/8/10, Remo Liechti:

It's me again.
Well, to pass parameters to the XLS works fine, now. For example I can
define the paper size etc.

In the FAQ on
http://xmlgraphics.apache.org/fop/faq.html#blank-page-between-page-seque
nces is written in chapter 3.2:

If you don't want to have this blank page, use
force-page-count=no-force.

Well, the force-page-count parameter is not recognized by the XSL. And I
think it's a FOP parameter because it's in the FOP FAQ. (so this problem
is NOT a docbook related problem)


Actually yes. The transformation chain is the following:
   DocBook XML
  |
  | XSLT transformation
  V
   FO file
  |
  | FOP processing
  V
   PDF file

The force-page-count is an FO property that should be set to no-force
in the FO file. But as this FO file is generated by the DocBook XSLT
stylesheets, this is those stylesheets' job to set the property to the
right value.

By default they seem to set it to something other than no-force. There
is perhaps an XSLT parameter which allow to change the way this property
is generated. If not, you'll have to change one XSLT template. On
docbook-apps they'll be able to tell you what to do.

Note the difference between XSLT parameters, which allow to easily
customize an XSLT transformation and may be set on the command-line, and
FO properties, which constrain the behaviour of the FO processor and are
only found in the FO file. This isn't the same level.

I hope you see the point. It's all a bit confusing at the beginning.

Vincent

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: PDF generation

2006-08-10 Thread Remo Liechti
Thanks Chris, Thanks Vincent
There was some misunderstanding on my side, sorry about that. I
understand clearly now :)

Thanks, again,

Remo


-Original Message-
From: Vincent Hennebert [mailto:[EMAIL PROTECTED] 
Sent: Donnerstag, 10. August 2006 11:51
To: fop-users@xmlgraphics.apache.org
Subject: Re: PDF generation

2006/8/10, Remo Liechti:
 It's me again.
 Well, to pass parameters to the XLS works fine, now. For example I can
 define the paper size etc.

 In the FAQ on

http://xmlgraphics.apache.org/fop/faq.html#blank-page-between-page-seque
 nces is written in chapter 3.2:

 If you don't want to have this blank page, use
 force-page-count=no-force.

 Well, the force-page-count parameter is not recognized by the XSL. And
I
 think it's a FOP parameter because it's in the FOP FAQ. (so this
problem
 is NOT a docbook related problem)

Actually yes. The transformation chain is the following:
DocBook XML
   |
   | XSLT transformation
   V
FO file
   |
   | FOP processing
   V
PDF file

The force-page-count is an FO property that should be set to no-force
in the FO file. But as this FO file is generated by the DocBook XSLT
stylesheets, this is those stylesheets' job to set the property to the
right value.

By default they seem to set it to something other than no-force. There
is perhaps an XSLT parameter which allow to change the way this property
is generated. If not, you'll have to change one XSLT template. On
docbook-apps they'll be able to tell you what to do.

Note the difference between XSLT parameters, which allow to easily
customize an XSLT transformation and may be set on the command-line, and
FO properties, which constrain the behaviour of the FO processor and are
only found in the FO file. This isn't the same level.

I hope you see the point. It's all a bit confusing at the beginning.

Vincent

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

This message may contain legally privileged or confidential information and is 
therefore addressed to the named persons only. The recipient should inform the 
sender and delete this message, if he/she is not named as addressee.
The sender disclaims any and all liability for the integrity and punctuality of 
this message. The sender has activated an automatic virus scanning, but does 
not guarantee the virus free transmission of this message.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: PDF generation

2006-08-10 Thread Remo Liechti
Well, I took a look at the generated FO:

fo:page-sequence
xmlns:axf=http://www.antennahouse.com/names/XSL/Extensions;
hyphenate=true master-reference=lot language=en format=i
initial-page-number=auto force-page-count=no-force ...

Like you seem the force-page-count is set in the page-sequence, like
Vincent told me. So the XSL transaction generated the right FO.

It seems like FOP 0.92 does not care about this attribute in
page-sequence...

Any other ideas?

Remo




-Original Message-
From: Remo Liechti [mailto:[EMAIL PROTECTED] 
Sent: Donnerstag, 10. August 2006 12:42
To: fop-users@xmlgraphics.apache.org
Subject: RE: PDF generation

Thanks Chris, Thanks Vincent
There was some misunderstanding on my side, sorry about that. I
understand clearly now :)

Thanks, again,

Remo


-Original Message-
From: Vincent Hennebert [mailto:[EMAIL PROTECTED] 
Sent: Donnerstag, 10. August 2006 11:51
To: fop-users@xmlgraphics.apache.org
Subject: Re: PDF generation

2006/8/10, Remo Liechti:
 It's me again.
 Well, to pass parameters to the XLS works fine, now. For example I can
 define the paper size etc.

 In the FAQ on

http://xmlgraphics.apache.org/fop/faq.html#blank-page-between-page-seque
 nces is written in chapter 3.2:

 If you don't want to have this blank page, use
 force-page-count=no-force.

 Well, the force-page-count parameter is not recognized by the XSL. And
I
 think it's a FOP parameter because it's in the FOP FAQ. (so this
problem
 is NOT a docbook related problem)

Actually yes. The transformation chain is the following:
DocBook XML
   |
   | XSLT transformation
   V
FO file
   |
   | FOP processing
   V
PDF file

The force-page-count is an FO property that should be set to no-force
in the FO file. But as this FO file is generated by the DocBook XSLT
stylesheets, this is those stylesheets' job to set the property to the
right value.

By default they seem to set it to something other than no-force. There
is perhaps an XSLT parameter which allow to change the way this property
is generated. If not, you'll have to change one XSLT template. On
docbook-apps they'll be able to tell you what to do.

Note the difference between XSLT parameters, which allow to easily
customize an XSLT transformation and may be set on the command-line, and
FO properties, which constrain the behaviour of the FO processor and are
only found in the FO file. This isn't the same level.

I hope you see the point. It's all a bit confusing at the beginning.

Vincent

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

This message may contain legally privileged or confidential information
and is therefore addressed to the named persons only. The recipient
should inform the sender and delete this message, if he/she is not named
as addressee.
The sender disclaims any and all liability for the integrity and
punctuality of this message. The sender has activated an automatic virus
scanning, but does not guarantee the virus free transmission of this
message.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

This message may contain legally privileged or confidential information and is 
therefore addressed to the named persons only. The recipient should inform the 
sender and delete this message, if he/she is not named as addressee.
The sender disclaims any and all liability for the integrity and punctuality of 
this message. The sender has activated an automatic virus scanning, but does 
not guarantee the virus free transmission of this message.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PDF generation

2006-08-10 Thread Vincent Hennebert

Can you please post the whole generated fo?

Thanks,
Vincent

2006/8/10, Remo Liechti:

Well, I took a look at the generated FO:

fo:page-sequence
xmlns:axf=http://www.antennahouse.com/names/XSL/Extensions;
hyphenate=true master-reference=lot language=en format=i
initial-page-number=auto force-page-count=no-force ...

Like you seem the force-page-count is set in the page-sequence, like
Vincent told me. So the XSL transaction generated the right FO.

It seems like FOP 0.92 does not care about this attribute in
page-sequence...

Any other ideas?

Remo




-Original Message-
From: Remo Liechti [mailto:[EMAIL PROTECTED]
Sent: Donnerstag, 10. August 2006 12:42
To: fop-users@xmlgraphics.apache.org
Subject: RE: PDF generation

Thanks Chris, Thanks Vincent
There was some misunderstanding on my side, sorry about that. I
understand clearly now :)

Thanks, again,

Remo


-Original Message-
From: Vincent Hennebert [mailto:[EMAIL PROTECTED]
Sent: Donnerstag, 10. August 2006 11:51
To: fop-users@xmlgraphics.apache.org
Subject: Re: PDF generation

2006/8/10, Remo Liechti:
 It's me again.
 Well, to pass parameters to the XLS works fine, now. For example I can
 define the paper size etc.

 In the FAQ on

http://xmlgraphics.apache.org/fop/faq.html#blank-page-between-page-seque
 nces is written in chapter 3.2:

 If you don't want to have this blank page, use
 force-page-count=no-force.

 Well, the force-page-count parameter is not recognized by the XSL. And
I
 think it's a FOP parameter because it's in the FOP FAQ. (so this
problem
 is NOT a docbook related problem)

Actually yes. The transformation chain is the following:
DocBook XML
   |
   | XSLT transformation
   V
FO file
   |
   | FOP processing
   V
PDF file

The force-page-count is an FO property that should be set to no-force
in the FO file. But as this FO file is generated by the DocBook XSLT
stylesheets, this is those stylesheets' job to set the property to the
right value.

By default they seem to set it to something other than no-force. There
is perhaps an XSLT parameter which allow to change the way this property
is generated. If not, you'll have to change one XSLT template. On
docbook-apps they'll be able to tell you what to do.

Note the difference between XSLT parameters, which allow to easily
customize an XSLT transformation and may be set on the command-line, and
FO properties, which constrain the behaviour of the FO processor and are
only found in the FO file. This isn't the same level.

I hope you see the point. It's all a bit confusing at the beginning.

Vincent

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

This message may contain legally privileged or confidential information
and is therefore addressed to the named persons only. The recipient
should inform the sender and delete this message, if he/she is not named
as addressee.
The sender disclaims any and all liability for the integrity and
punctuality of this message. The sender has activated an automatic virus
scanning, but does not guarantee the virus free transmission of this
message.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

This message may contain legally privileged or confidential information and is 
therefore addressed to the named persons only. The recipient should inform the 
sender and delete this message, if he/she is not named as addressee.
The sender disclaims any and all liability for the integrity and punctuality of 
this message. The sender has activated an automatic virus scanning, but does 
not guarantee the virus free transmission of this message.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PDF generation

2006-08-10 Thread Vincent Hennebert

2006/8/10, Remo Liechti:

There it is.


Ok, this is an unrelated problem. After the block containing the SPOC7:
Prototype Description text there is another fo:block with
break-after=page, which creates a new page; which is empty, as there
is no more text in the fo:flow.

I guess that more complex DocBook documents may contain some information
which will appear on the following pages. Hence the break-after. In your
case, you'll have to customize the XSLT template generating this part of
the output and remove the last fo:block break-after=page.

Note also that there are elements in the fox: namespace in your
generated fo file. Those correspond to extensions for the ancient 0.20.5
version of Fop. They aren't processed by Fop 0.92. If you use the latest
DocBook stylesheets there are two parameters to enable Fop extensions:
one for the 0.20.5 version and one for the latest one. You should
disable the former and enable the latter (IIRC it is called
fop1.extensions).


(Note for Fop-dev regarding the break-after problem:
That said, I think there's a bug as a new page is created while there is
nothing more but whitespace characters in the flow. If I remove the
indenting so that all the remaining /fo:block closing tags are sticked
together (so there is really nothing after the breaking fo:block), a new
page is still created. Is this a known issue? Is it related to the
whitespace handling problem?)

Vincent



Thanks,
Remo



-Original Message-
From: Vincent Hennebert [mailto:[EMAIL PROTECTED]
Sent: Donnerstag, 10. August 2006 12:58
To: fop-users@xmlgraphics.apache.org
Subject: Re: PDF generation

Can you please post the whole generated fo?

Thanks,
Vincent

2006/8/10, Remo Liechti:
 Well, I took a look at the generated FO:

 fo:page-sequence
 xmlns:axf=http://www.antennahouse.com/names/XSL/Extensions;
 hyphenate=true master-reference=lot language=en format=i
 initial-page-number=auto force-page-count=no-force ...

 Like you seem the force-page-count is set in the page-sequence, like
 Vincent told me. So the XSL transaction generated the right FO.

 It seems like FOP 0.92 does not care about this attribute in
 page-sequence...

 Any other ideas?

 Remo




 -Original Message-
 From: Remo Liechti [mailto:[EMAIL PROTECTED]
 Sent: Donnerstag, 10. August 2006 12:42
 To: fop-users@xmlgraphics.apache.org
 Subject: RE: PDF generation

 Thanks Chris, Thanks Vincent
 There was some misunderstanding on my side, sorry about that. I
 understand clearly now :)

 Thanks, again,

 Remo


 -Original Message-
 From: Vincent Hennebert [mailto:[EMAIL PROTECTED]
 Sent: Donnerstag, 10. August 2006 11:51
 To: fop-users@xmlgraphics.apache.org
 Subject: Re: PDF generation

 2006/8/10, Remo Liechti:
  It's me again.
  Well, to pass parameters to the XLS works fine, now. For example I
can
  define the paper size etc.
 
  In the FAQ on
 

http://xmlgraphics.apache.org/fop/faq.html#blank-page-between-page-seque
  nces is written in chapter 3.2:
 
  If you don't want to have this blank page, use
  force-page-count=no-force.
 
  Well, the force-page-count parameter is not recognized by the XSL.
And
 I
  think it's a FOP parameter because it's in the FOP FAQ. (so this
 problem
  is NOT a docbook related problem)

 Actually yes. The transformation chain is the following:
 DocBook XML
|
| XSLT transformation
V
 FO file
|
| FOP processing
V
 PDF file

 The force-page-count is an FO property that should be set to
no-force
 in the FO file. But as this FO file is generated by the DocBook XSLT
 stylesheets, this is those stylesheets' job to set the property to the
 right value.

 By default they seem to set it to something other than no-force.
There
 is perhaps an XSLT parameter which allow to change the way this
property
 is generated. If not, you'll have to change one XSLT template. On
 docbook-apps they'll be able to tell you what to do.

 Note the difference between XSLT parameters, which allow to easily
 customize an XSLT transformation and may be set on the command-line,
and
 FO properties, which constrain the behaviour of the FO processor and
are
 only found in the FO file. This isn't the same level.

 I hope you see the point. It's all a bit confusing at the beginning.

 Vincent


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: PDF generation

2006-08-10 Thread Remo Liechti
Hi Vincent
Thanks a lot for this information! I will take a closer look into this
problem, maybe I can tell the XSL to not create this page break.

I'm looking forward to hear from the FOP dev's about that whitespace
problem.

Thanks again,
Remo



-Original Message-
From: Vincent Hennebert [mailto:[EMAIL PROTECTED] 
Sent: Donnerstag, 10. August 2006 16:26
To: fop-users@xmlgraphics.apache.org
Subject: Re: PDF generation

2006/8/10, Remo Liechti:
 There it is.

Ok, this is an unrelated problem. After the block containing the SPOC7:
Prototype Description text there is another fo:block with
break-after=page, which creates a new page; which is empty, as there
is no more text in the fo:flow.

I guess that more complex DocBook documents may contain some information
which will appear on the following pages. Hence the break-after. In your
case, you'll have to customize the XSLT template generating this part of
the output and remove the last fo:block break-after=page.

Note also that there are elements in the fox: namespace in your
generated fo file. Those correspond to extensions for the ancient 0.20.5
version of Fop. They aren't processed by Fop 0.92. If you use the latest
DocBook stylesheets there are two parameters to enable Fop extensions:
one for the 0.20.5 version and one for the latest one. You should
disable the former and enable the latter (IIRC it is called
fop1.extensions).


(Note for Fop-dev regarding the break-after problem:
That said, I think there's a bug as a new page is created while there is
nothing more but whitespace characters in the flow. If I remove the
indenting so that all the remaining /fo:block closing tags are sticked
together (so there is really nothing after the breaking fo:block), a new
page is still created. Is this a known issue? Is it related to the
whitespace handling problem?)

Vincent


 Thanks,
 Remo



 -Original Message-
 From: Vincent Hennebert [mailto:[EMAIL PROTECTED]
 Sent: Donnerstag, 10. August 2006 12:58
 To: fop-users@xmlgraphics.apache.org
 Subject: Re: PDF generation

 Can you please post the whole generated fo?

 Thanks,
 Vincent

 2006/8/10, Remo Liechti:
  Well, I took a look at the generated FO:
 
  fo:page-sequence
  xmlns:axf=http://www.antennahouse.com/names/XSL/Extensions;
  hyphenate=true master-reference=lot language=en format=i
  initial-page-number=auto force-page-count=no-force ...
 
  Like you seem the force-page-count is set in the page-sequence, like
  Vincent told me. So the XSL transaction generated the right FO.
 
  It seems like FOP 0.92 does not care about this attribute in
  page-sequence...
 
  Any other ideas?
 
  Remo
 
 
 
 
  -Original Message-
  From: Remo Liechti [mailto:[EMAIL PROTECTED]
  Sent: Donnerstag, 10. August 2006 12:42
  To: fop-users@xmlgraphics.apache.org
  Subject: RE: PDF generation
 
  Thanks Chris, Thanks Vincent
  There was some misunderstanding on my side, sorry about that. I
  understand clearly now :)
 
  Thanks, again,
 
  Remo
 
 
  -Original Message-
  From: Vincent Hennebert [mailto:[EMAIL PROTECTED]
  Sent: Donnerstag, 10. August 2006 11:51
  To: fop-users@xmlgraphics.apache.org
  Subject: Re: PDF generation
 
  2006/8/10, Remo Liechti:
   It's me again.
   Well, to pass parameters to the XLS works fine, now. For example I
 can
   define the paper size etc.
  
   In the FAQ on
  
 

http://xmlgraphics.apache.org/fop/faq.html#blank-page-between-page-seque
   nces is written in chapter 3.2:
  
   If you don't want to have this blank page, use
   force-page-count=no-force.
  
   Well, the force-page-count parameter is not recognized by the XSL.
 And
  I
   think it's a FOP parameter because it's in the FOP FAQ. (so this
  problem
   is NOT a docbook related problem)
 
  Actually yes. The transformation chain is the following:
  DocBook XML
 |
 | XSLT transformation
 V
  FO file
 |
 | FOP processing
 V
  PDF file
 
  The force-page-count is an FO property that should be set to
 no-force
  in the FO file. But as this FO file is generated by the DocBook XSLT
  stylesheets, this is those stylesheets' job to set the property to
the
  right value.
 
  By default they seem to set it to something other than no-force.
 There
  is perhaps an XSLT parameter which allow to change the way this
 property
  is generated. If not, you'll have to change one XSLT template. On
  docbook-apps they'll be able to tell you what to do.
 
  Note the difference between XSLT parameters, which allow to easily
  customize an XSLT transformation and may be set on the command-line,
 and
  FO properties, which constrain the behaviour of the FO processor and
 are
  only found in the FO file. This isn't the same level.
 
  I hope you see the point. It's all a bit confusing at the beginning.
 
  Vincent

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL

Re: PDF generation

2006-08-10 Thread Manuel Mall
On Thursday 10 August 2006 23:23, Chris Bowditch wrote:
 Vincent Hennebert wrote:

 Hi Vincent,

  (Note for Fop-dev regarding the break-after problem:
  That said, I think there's a bug as a new page is created while
  there is nothing more but whitespace characters in the flow. If I
  remove the indenting so that all the remaining /fo:block closing
  tags are sticked together (so there is really nothing after the
  breaking fo:block), a new page is still created. Is this a known
  issue? Is it related to the whitespace handling problem?)

 If white-space-collapse=true then I'd say FOP is wrong to create a
 new page for just whitespace characters. However if
 white-space-collapse=false then FOP is working as expected.


Vincent,

I agree with Chris. Can you provide a slimmed down version suitable as a 
test case?

 Chris


Thanks

Manuel

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PDF generation

2006-08-10 Thread Andreas L Delmelle

On Aug 10, 2006, at 16:25, Vincent Hennebert wrote:

Hi all,



(Note for Fop-dev regarding the break-after problem:
That said, I think there's a bug as a new page is created while  
there is

nothing more but whitespace characters in the flow. If I remove the
indenting so that all the remaining /fo:block closing tags are  
sticked
together (so there is really nothing after the breaking fo:block),  
a new

page is still created. Is this a known issue? Is it related to the
whitespace handling problem?)


I don't think so.
A new page is created, either with or without trailing white-space in  
the blocks... So, how could this be related to white-space? :) (Quite  
on the contrary, the above description excludes white-space-handling  
from possibly being related, IIC)


I've been doing some browsing, but can't seem to find a reference  
that indicates that the formatter should ignore the break-after  
property on the last block in the page-sequence if it is empty --if  
nothing prohibits the page-break, then force-page-count will do no  
good. In the worst case, if you would set it to odd, it would result  
in yet another extra page being added :/


I'll keep looking for that reference, but I wouldn't be surprised if  
there are none. The conclusion that the break should be avoided seems  
more like 'expected' than 'compliant' behaviour...



Cheers,

Andreas


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PDF generation

2006-08-10 Thread Andreas L Delmelle

On Aug 10, 2006, at 19:44, Andreas L Delmelle wrote:


snip /
I'll keep looking for that reference, but I wouldn't be surprised  
if there are none. The conclusion that the break should be avoided  
seems more like 'expected' than 'compliant' behaviour...


Another _possible_ solution --haven't tried it, so no idea if it  
would really work, but in theory, you could define a simple-page- 
master with 0 width and height, and use it as a conditional-page- 
master-reference with 'blank-or-not-blank=blank'.


Since the last page won't have any content, it would qualify as a  
'blank' page, and the 'null-page' will be used.


It's a long shot...


Cheers,

Andreas


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PDF generation

2006-08-09 Thread Chris Bowditch

Remo Liechti wrote:

Hi all
I'm new to XSL and FOP and all that stuff. I need to create a PDF out of
a docbook. My docbook looks like:

book lang=en
bookinfo
titlemyTitle/title
/bookinfo


chapter
titlechapter one/title
simparatext text text/simpara
/chapter
/book

I run FOP like this:
Fop -xsl C:\xsl\fo\docbook.xsl -xml myDocBook.xml -pdf myPdf.pdf

It creates a PDF like this(I attached it to this mail):

- First page with the title - This is ok
- Page 2: title again, but small. Nothing more on the page. - not ok!
- page 3: Just empty. Why's that? - NOT OK
- page 4: The index of the book - NICE!
- page 5: My Text - ok


My questions are:

1. How do tell the XSL to not create the page 2 with the small title and
not to create an empty page?


The empty page 3 might be because the attribute force-page-count=auto 
is present on the page-sequence. This needs to 
forcae-page-count=no-force. I've no idea how to do that in Docbook. I 
also don't know why the 2nd page appears. Have you asked these questions 
on the docbook forum too?




2. How do I tell the XSL to create Bookmarks in the PDF?


I know how to do this in raw XSL-FO, again no idea how in docbook XML, 
sorry! The exact method used to creating bookmarks is different 
depending on which version of FOP you are using?




3. How Do I create header and footer for this document? (I think this is
a docbook issue). But the header and footer should not appear on the
first page as well as not on the index page.


This is possible using raw XSL-FO constructs, but I don't know how to do 
it in docbook XML.


Sorry I can't help you more, but I get the feeling most of yopur 
questions would be better suited on a docbook mailing list.


Chris




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: PDF generation

2006-08-09 Thread Remo Liechti
Hi Chris
Thanks a lot for the answers.

I think the only problem I have now is to pass the parameters to the XSL
document.

Fop -xsl C:\xsl\fo\docbook.xsl -xml myDocBook.xml -pdf myPdf.pdf

How do I pass this parameter forcae-page-count=no-force. To this xsl?
I Tried a lot of ways, nothing worked... like:

Fop -xsl C:\xsl\fo\docbook.xsl forcae-page-count=no-force -xml
myDocBook.xml -pdf myPdf.pdf


Any idea?

Remo




-Original Message-
From: Chris Bowditch [mailto:[EMAIL PROTECTED] 
Sent: Mittwoch, 9. August 2006 15:18
To: fop-users@xmlgraphics.apache.org
Subject: Re: PDF generation

Remo Liechti wrote:
 Hi all
 I'm new to XSL and FOP and all that stuff. I need to create a PDF out
of
 a docbook. My docbook looks like:
 
 book lang=en
   bookinfo
   titlemyTitle/title
   /bookinfo
 
 
   chapter
   titlechapter one/title
   simparatext text text/simpara
   /chapter
 /book
 
 I run FOP like this:
 Fop -xsl C:\xsl\fo\docbook.xsl -xml myDocBook.xml -pdf myPdf.pdf
 
 It creates a PDF like this(I attached it to this mail):
 
 - First page with the title - This is ok
 - Page 2: title again, but small. Nothing more on the page. - not ok!
 - page 3: Just empty. Why's that? - NOT OK
 - page 4: The index of the book - NICE!
 - page 5: My Text - ok
 
 
 My questions are:
 
 1. How do tell the XSL to not create the page 2 with the small title
and
 not to create an empty page?

The empty page 3 might be because the attribute force-page-count=auto 
is present on the page-sequence. This needs to 
forcae-page-count=no-force. I've no idea how to do that in Docbook. I 
also don't know why the 2nd page appears. Have you asked these questions

on the docbook forum too?

 
 2. How do I tell the XSL to create Bookmarks in the PDF?

I know how to do this in raw XSL-FO, again no idea how in docbook XML, 
sorry! The exact method used to creating bookmarks is different 
depending on which version of FOP you are using?

 
 3. How Do I create header and footer for this document? (I think this
is
 a docbook issue). But the header and footer should not appear on the
 first page as well as not on the index page.

This is possible using raw XSL-FO constructs, but I don't know how to do

it in docbook XML.

Sorry I can't help you more, but I get the feeling most of yopur 
questions would be better suited on a docbook mailing list.

Chris




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

This message may contain legally privileged or confidential information and is 
therefore addressed to the named persons only. The recipient should inform the 
sender and delete this message, if he/she is not named as addressee.
The sender disclaims any and all liability for the integrity and punctuality of 
this message. The sender has activated an automatic virus scanning, but does 
not guarantee the virus free transmission of this message.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: PDF generation

2006-08-09 Thread Remo Liechti
Okay, I have to do it in two steps:

java -jar saxon.jar -o myFormattingObject.fo myDocBook.xml
c:\doc\xsl\fo\docbook.xsl forcae-page-count=no-force

call C:\Daten\spoc7\doc\fop\Fop -fo myFormattingObject.fo -pdf
myPdf.pdf


But the empty page's still there...

Remo


-Original Message-
From: Remo Liechti [mailto:[EMAIL PROTECTED] 
Sent: Mittwoch, 9. August 2006 16:17
To: fop-users@xmlgraphics.apache.org
Subject: RE: PDF generation

Hi Chris
Thanks a lot for the answers.

I think the only problem I have now is to pass the parameters to the XSL
document.

Fop -xsl C:\xsl\fo\docbook.xsl -xml myDocBook.xml -pdf myPdf.pdf

How do I pass this parameter forcae-page-count=no-force. To this xsl?
I Tried a lot of ways, nothing worked... like:

Fop -xsl C:\xsl\fo\docbook.xsl forcae-page-count=no-force -xml
myDocBook.xml -pdf myPdf.pdf


Any idea?

Remo




-Original Message-
From: Chris Bowditch [mailto:[EMAIL PROTECTED] 
Sent: Mittwoch, 9. August 2006 15:18
To: fop-users@xmlgraphics.apache.org
Subject: Re: PDF generation

Remo Liechti wrote:
 Hi all
 I'm new to XSL and FOP and all that stuff. I need to create a PDF out
of
 a docbook. My docbook looks like:
 
 book lang=en
   bookinfo
   titlemyTitle/title
   /bookinfo
 
 
   chapter
   titlechapter one/title
   simparatext text text/simpara
   /chapter
 /book
 
 I run FOP like this:
 Fop -xsl C:\xsl\fo\docbook.xsl -xml myDocBook.xml -pdf myPdf.pdf
 
 It creates a PDF like this(I attached it to this mail):
 
 - First page with the title - This is ok
 - Page 2: title again, but small. Nothing more on the page. - not ok!
 - page 3: Just empty. Why's that? - NOT OK
 - page 4: The index of the book - NICE!
 - page 5: My Text - ok
 
 
 My questions are:
 
 1. How do tell the XSL to not create the page 2 with the small title
and
 not to create an empty page?

The empty page 3 might be because the attribute force-page-count=auto 
is present on the page-sequence. This needs to 
forcae-page-count=no-force. I've no idea how to do that in Docbook. I 
also don't know why the 2nd page appears. Have you asked these questions

on the docbook forum too?

 
 2. How do I tell the XSL to create Bookmarks in the PDF?

I know how to do this in raw XSL-FO, again no idea how in docbook XML, 
sorry! The exact method used to creating bookmarks is different 
depending on which version of FOP you are using?

 
 3. How Do I create header and footer for this document? (I think this
is
 a docbook issue). But the header and footer should not appear on the
 first page as well as not on the index page.

This is possible using raw XSL-FO constructs, but I don't know how to do

it in docbook XML.

Sorry I can't help you more, but I get the feeling most of yopur 
questions would be better suited on a docbook mailing list.

Chris




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

This message may contain legally privileged or confidential information
and is therefore addressed to the named persons only. The recipient
should inform the sender and delete this message, if he/she is not named
as addressee.
The sender disclaims any and all liability for the integrity and
punctuality of this message. The sender has activated an automatic virus
scanning, but does not guarantee the virus free transmission of this
message.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

This message may contain legally privileged or confidential information and is 
therefore addressed to the named persons only. The recipient should inform the 
sender and delete this message, if he/she is not named as addressee.
The sender disclaims any and all liability for the integrity and punctuality of 
this message. The sender has activated an automatic virus scanning, but does 
not guarantee the virus free transmission of this message.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PDF generation

2006-08-09 Thread Vincent Hennebert

Hi Remo,

you should really try to ask your questions on the docbook-apps [1]
mailing list. Those are questions related to XSLT customization rather
than transforming the resulting FO into PDF, and that list will be
much more suited.

You may also want to have a look at the documentation possibly shipped
with your DocBook stylesheets: there are lots of parameters to
customize the output. If, however, no parameter suits your needs then
you will have to write a customization layer above the stylesheets and
this requires some XSLT skills. But again, if you ask your questions
on the docbook-apps mailing-list you will get useful hints within the
hour.

HTH,
Vincent

[1] http://wiki.docbook.org/topic/DocBookAppsMailingList


2006/8/9, Remo Liechti:

Okay, I have to do it in two steps:

java -jar saxon.jar -o myFormattingObject.fo myDocBook.xml
c:\doc\xsl\fo\docbook.xsl forcae-page-count=no-force

call C:\Daten\spoc7\doc\fop\Fop -fo myFormattingObject.fo -pdf
myPdf.pdf


But the empty page's still there...

Remo


-Original Message-
From: Remo Liechti [mailto:[EMAIL PROTECTED]
Sent: Mittwoch, 9. August 2006 16:17
To: fop-users@xmlgraphics.apache.org
Subject: RE: PDF generation

Hi Chris
Thanks a lot for the answers.

I think the only problem I have now is to pass the parameters to the XSL
document.

Fop -xsl C:\xsl\fo\docbook.xsl -xml myDocBook.xml -pdf myPdf.pdf

How do I pass this parameter forcae-page-count=no-force. To this xsl?
I Tried a lot of ways, nothing worked... like:

Fop -xsl C:\xsl\fo\docbook.xsl forcae-page-count=no-force -xml
myDocBook.xml -pdf myPdf.pdf


Any idea?

Remo




-Original Message-
From: Chris Bowditch [mailto:[EMAIL PROTECTED]
Sent: Mittwoch, 9. August 2006 15:18
To: fop-users@xmlgraphics.apache.org
Subject: Re: PDF generation

Remo Liechti wrote:
 Hi all
 I'm new to XSL and FOP and all that stuff. I need to create a PDF out
of
 a docbook. My docbook looks like:

 book lang=en
   bookinfo
   titlemyTitle/title
   /bookinfo


   chapter
   titlechapter one/title
   simparatext text text/simpara
   /chapter
 /book

 I run FOP like this:
 Fop -xsl C:\xsl\fo\docbook.xsl -xml myDocBook.xml -pdf myPdf.pdf

 It creates a PDF like this(I attached it to this mail):

 - First page with the title - This is ok
 - Page 2: title again, but small. Nothing more on the page. - not ok!
 - page 3: Just empty. Why's that? - NOT OK
 - page 4: The index of the book - NICE!
 - page 5: My Text - ok


 My questions are:

 1. How do tell the XSL to not create the page 2 with the small title
and
 not to create an empty page?

The empty page 3 might be because the attribute force-page-count=auto
is present on the page-sequence. This needs to
forcae-page-count=no-force. I've no idea how to do that in Docbook. I
also don't know why the 2nd page appears. Have you asked these questions

on the docbook forum too?


 2. How do I tell the XSL to create Bookmarks in the PDF?

I know how to do this in raw XSL-FO, again no idea how in docbook XML,
sorry! The exact method used to creating bookmarks is different
depending on which version of FOP you are using?


 3. How Do I create header and footer for this document? (I think this
is
 a docbook issue). But the header and footer should not appear on the
 first page as well as not on the index page.

This is possible using raw XSL-FO constructs, but I don't know how to do

it in docbook XML.

Sorry I can't help you more, but I get the feeling most of yopur
questions would be better suited on a docbook mailing list.

Chris


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PDF generation causes Browser crash...

2005-11-17 Thread Jimmy Dixon
Ive had this myself - its a problem to do with outputting PDF to the 
browser with PHP I dont know what the answer is I just reverted to 
changing the http header content type disposition to force download as 
getting it to display in all browsers seemed like a fruitless task.


Christian Loock wrote:


Hi Everybody,

I have encountered a problem that doesn't have to be directly related to
FOP but i still hope that someone could help me with this.

Our PDFs that we generate using FOP, will always be shown in an internet
browser because we use FOP in an internet application. The problem that
one of our customers has is, that he doesn't get the PDF but a blank or
black page wich results in crashing his browser. He has installed the
newest version of Adobe Acrobat and uses Sky DSL ( Satelite DSL ).

In hope that someone could help because i have absolutely no idea why
this happens.

Best regards,

Christian 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


 



--
Jimmy Dixon, Perfiliate Technologies

email   :  [EMAIL PROTECTED]
phone   :  +44 (0)191 241 6500

Registered Office:
Perfiliate Technologies Limited
7-15 Pink Lane,
Newcastle upon Tyne. NE1 5DW
Registered No. 3783384 in the UK

Telephone +44 (0)191 241 6500
Facsimile +44 (0)191 241 9302

www.perfiliate.com

Please note that electronic mail may be monitored.

This e-mail is confidential. If you received it by mistake, please let us know 
and then delete it from your system; you should not copy, disclose, or 
distribute its contents to anyone nor act in reliance on this e-mail, as this 
is prohibited and may be unlawful. We check all emails for viruses, but please 
note that we do not accept liability for any viruses which may be transmitted 
in or with this email.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: PDF generation causes Browser crash...

2005-11-17 Thread Christian Loock
Which Header exactliy did you send?

Christian 

-Original Message-
From: Jimmy Dixon [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 17, 2005 1:08 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: PDF generation causes Browser crash...

Ive had this myself - its a problem to do with outputting PDF to the
browser with PHP I dont know what the answer is I just reverted to
changing the http header content type disposition to force download as
getting it to display in all browsers seemed like a fruitless task.

Christian Loock wrote:

Hi Everybody,

I have encountered a problem that doesn't have to be directly related 
to FOP but i still hope that someone could help me with this.

Our PDFs that we generate using FOP, will always be shown in an 
internet browser because we use FOP in an internet application. The 
problem that one of our customers has is, that he doesn't get the PDF 
but a blank or black page wich results in crashing his browser. He has 
installed the newest version of Adobe Acrobat and uses Sky DSL (
Satelite DSL ).

In hope that someone could help because i have absolutely no idea why 
this happens.

Best regards,

Christian

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  


--
Jimmy Dixon, Perfiliate Technologies

email   :  [EMAIL PROTECTED]
phone   :  +44 (0)191 241 6500

Registered Office:
Perfiliate Technologies Limited
7-15 Pink Lane,
Newcastle upon Tyne. NE1 5DW
Registered No. 3783384 in the UK
 
Telephone +44 (0)191 241 6500
Facsimile +44 (0)191 241 9302
 
www.perfiliate.com
 
Please note that electronic mail may be monitored.
 
This e-mail is confidential. If you received it by mistake, please let
us know and then delete it from your system; you should not copy,
disclose, or distribute its contents to anyone nor act in reliance on
this e-mail, as this is prohibited and may be unlawful. We check all
emails for viruses, but please note that we do not accept liability for
any viruses which may be transmitted in or with this email.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]