table with border using fop-0.93

2007-08-15 Thread Baeckham
Hi,

I am trying create tables in PDF. Therefor I use this template:

xsl:template match=table
fo:table table-layout=auto border=[EMAIL PROTECTED] 
padding=[EMAIL PROTECTED]
fo:table-body
xsl:apply-templates select=tr /
/fo:table-body
/fo:table
/xsl:template

Borders around the table and between the cells are not displayed - even when I 
set a hardcoded border width:
fo:table table-layout=auto border=1 padding=[EMAIL PROTECTED]

Does anyone know the reason and/or a solution?

Steffen

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



can not create an FOP instance anymore

2007-08-06 Thread Baeckham
Hi,

I am using FOp to create PDF documents dynamically. Suddenly it stopped to 
work. I do't know why. The reason is that a instance of the class 
org.apache.fop.apps.Fop can not be created. Why??

The FopFactory an the FOUserAgent are created but not the Fop itself.

Here the code:
private Fop getFop(String format, OutputStream out) throws FOPException {
if (fop == null) {
FopFactory fopFactory = FopFactory.newInstance();
FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, 
foUserAgent, out);
}
return fop;
}

Maybe I changed something unnoticed. A library or something. Debugging the FOP 
shows no problems, the DefaultHandler is build. But the call 

fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, out);

does not return anything  ?

Thanx for any hints. I am really at a loss

Steffen


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



setParameter(versionParam, 2.0)

2007-07-31 Thread Baeckham
Hi,

in many examples demonstrating the usage of FOP I see this lines:

// Set the value of a param in the stylesheet
transformer.setParameter(versionParam, 2.0)

(transformer is an instance of the class javax.xml.transform.Transformer)

What is this parameter for? Does anyone know? The comment is not helping me 
very much. Is this parameter really necessary? I don't see any differences 
using it or not.

Steffen

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



does fop use xalan internally

2007-07-30 Thread Baeckham
Just a short question for a better understanding of FOP.

Does Apache FOP use Xalan internally for creating the XSL-FO structure? May I 
replace this XSLT processor with an other one?

Thanks for your feedback.

Steffen

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



multithreading

2007-07-23 Thread Baeckham
Hi,

just a short question: does FOP has multithreading capabilities? In this case 
on a multi-core/cpu-system FOP uses multiple core doing the processing?

Steffen

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



tipps for linking

2007-06-19 Thread Baeckham
Hi,

I trying to create a PDF using FOP. This PDF is built of several HTML pages. 
At the beginning I created a table of content. All entries in this toc are 
linked to their targets. This works perfectly. I used the generate-id() 
function for creating the ids.

the toc entries:
fo:table-cell
fo:block text-align=begin
fo:page-number-citation font-style=normal 
ref-id={generate-id()} /
/fo:block
/fo:table-cell

the pages:
xsl:template match=page
fo:block break-before='page' id={generate-id()}
xsl:apply-templates /
/fo:block
/xsl:template

Now my problem is, that a page may contain a link to another page. Now for 
this kind of linking I think I can not use these generated ids, isn't it. 

For external links I used this:
xsl:template match=a
fo:basic-link external-destination=[EMAIL PROTECTED]
text-decoration=underline color=blue
xsl:value-of select=. /
/fo:basic-link
/xsl:template

Internal links, should link to a page, template see above, this template uses 
a generated ID.

xsl:template match=A
fo:basic-link internal-destination=what to specify here
text-decoration=underline color=blue
xsl:value-of select=. /
/fo:basic-link
/xsl:template

Shall I avoid generated IDs? I need both a table of content, and internal 
links to pages.

Thanx for any hints.

Steffen

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



table-of-content

2007-06-18 Thread Baeckham
Hi,

I am am looking for a way to create a table of content using FOP.

I found some informations on the web but I do not understand them very well.

May someone provide me with a little, simple example.

Thanks
Steffen


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



page numbering

2007-06-18 Thread Baeckham
Hi,

I want to have a table of content on my pdf, the page numbering should start 
at the next page (the first page after the toc).

How can I do this, do I need two fo:page-sequence ?

Thanx for any hints.

Steffen

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



Re: page numbering

2007-06-18 Thread Baeckham
Hi,

thanks, I got i it (almost) using two page-sequences ... But between the two 
page-sequences occurs an empty page. Using just one page-sequence there is no 
empty page.

What might be the reason?

The first page-sequence is for the table of content, the second one is for 
displaying the data.

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

!-- toc--
fo:page-sequence master-reference=simple
fo:flow flow-name=xsl-region-body
xsl:apply-templates select=pages /
/fo:flow
/fo:page-sequence

!-- pages--
fo:page-sequence master-reference=simple
initial-page-number=1
fo:static-content flow-name=xsl-region-after
fo:block line-height=10pt 
font-size=10pt
text-align=center
fo:page-number /
/fo:block
/fo:static-content
fo:flow flow-name=xsl-region-body
xsl:for-each select=pages
xsl:apply-templates 
select=page /
/xsl:for-each
/fo:flow
/fo:page-sequence
/fo:root
/xsl:template

Steffen

Am Monday, 18. June 2007 schrieb Trevor Keast:
 You can start the page numbering at any given number.  You can use the
 fo:page-sequence tag in the following fashion:

 fo:page-sequence master-reference=myMaster initial-page-number=1

 Hope this helps,

 Trevor.

 Baeckham wrote:
  Hi,
 
  I want to have a table of content on my pdf, the page numbering should
  start at the next page (the first page after the toc).
 
  How can I do this, do I need two fo:page-sequence ?
 
  Thanx for any hints.
 
  Steffen
 
  -
  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]

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



Re: page numbering

2007-06-18 Thread Baeckham
You are right, force-page-count=no-force helped. :)

Thanks or your support. 
Steffen

Am Monday, 18. June 2007 schrieb J.Pietschmann:
 Baeckham wrote:
  thanks, I got i it (almost) using two page-sequences ... But between the
  two page-sequences occurs an empty page. Using just one page-sequence
  there is no empty page.
 
  What might be the reason?

 Have a look at http://www.w3.org/TR/xsl/#force-page-count

 J.Pietschmann

 -
 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]



gif image in fop 0.93 not supported???

2007-05-25 Thread Baeckham
Hi,

I read on the FOP website, that gif images are supported in rtf output. I am 
using fop version 0.93.

With pdf and postscript everything is OK. But with rtf I get this error:

org.apache.fop.render.rtf.rtflib.rtfdoc.RtfExternalGraphic$ExternalGraphicException
 
org.apache.fop.render.rtf.rtflib.rtfdoc.RtfExternalGraphic$ExternalGraphicException:
 
The tag fo:external-graphic does not support gif - image type.

Does anyone know what to do? 

Steffen

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



list in list - list with sublist

2007-05-24 Thread Baeckham
Hi,

I want to convert a xml containing this structure (xhtml) into a pdf:
ul
liasa/li
lisasa/li
lisasa/li
ul
lisadasdsad/li
lisasasd324324a/li
lisa2343242342sa/li
/ul
liasa/li
lisasa/li
lisasa/li
/ul

It should look like this, after transformation:
* asa
* sasa
* sasa
* sadasdsad
* sasasd324324a
* sa2343242342sa
* asa
* sasa
* sasa

My solution looks like this, it works for a simple list, but not for list in 
a list.

 xsl:template match=ul
fo:list-block start-indent=5mm end-indent=10mm 
provisional-distance-between-starts=5mm
xsl:apply-templates/
/fo:list-block
/xsl:template

xsl:template match=li
fo:list-item
fo:list-item-label end-indent=label-end()
fo:block*/fo:block
/fo:list-item-label
fo:list-item-body start-indent=body-start()
fo:block
xsl:value-of select=./
/fo:block
xsl:apply-templates/
/fo:list-item-body
/fo:list-item
/xsl:template

Does any knows how to do this?

Steffen