RE: Page background color

2005-01-10 Thread Dennis Myrén
I finally achieved the layout I wanted.
Thank you for your help.

I just needed to know a bit more about how the regions work.

(I use PDF as the output format, and use points as units rather than pixels as 
I did in the example.)



-Original Message-
From: J.Pietschmann [mailto:[EMAIL PROTECTED] 
Sent: 8. januar 2005 21:04
To: [EMAIL PROTECTED]
Subject: Re: Page background color

Dennis Myrén wrote:
 However, I started trying just to get the background color to be applied 
 across all regions, and I have not succeeded.
 
 Please tell me what I am doing wrong with this simple document.
 Only the region-body region gets blue background color.

Your region-before and -after have no extent, i.e. they get an
extent of zero. You'll have to defione a region-start and -end
as well.

Which output format are you using? Measurements in px should not
be used except for bitmapped output formats.

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]



FOP 20.5 and Java 1.5

2005-01-10 Thread David Frankson
Title: FOP 20.5 and Java 1.5






 I recently upgraded my system to Java 1.5 and I'm experiencing problems with generating pdfs using FOP. Some xsl:fo files, but not all, generate output that Acrobat chokes on. If I look at the raw PDF output, it is different. Other files produce output that renders fine. I haven't narrowed anything down yet, I thought I'd see if anyone else has tried FOP on Java 1.5?

Dave






Re: Unbound Error

2005-01-10 Thread Luke Shannon
You are correct.

Thanks,

Luke

- Original Message - 
From: Chris Bowditch [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 10, 2005 5:44 AM
Subject: Re: Unbound Error


 Luke Shannon wrote:
  Hello Andreas;
 
  This is the nature of my problem. The block lies outside of the root. It
is
  in a template. I start in root, write some generic stuff and than
depending
  on the params jump of the one of several templates to write out the
content.
 
  Each template needs to contains its own formatting schema. I was hoping
to
  do this by embedding the content in a fo block.
 
  If this is allowed, do I have any other options? I would like to avoid
  complicating the root template with 13 different output options.

 I think you just need to define the fo namespace at the top of your
 xsl:stylesheet, e.g.

 xsl:stylesheet xmlns:fo=http://www.w3.org/1999/XSL/Format;
 xsl:template match=/
 fo:root
 ...
 /fo:root
 /xsl:template

 ...

 /xsl:stylesheet

 snip/

 Chris


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



Document Questions

2005-01-10 Thread Luke Shannon
Hello;

I am working on creating all the various layouts our product supports in FO.

Having some issues.

The code below runs when it is time to get the FO input:

!-- fo root: all document properties go inside this tag --
fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
!-- configure the page attributes --
fo:layout-master-set
fo:simple-page-master master-name=simple page-height=29.7cm
page-width=21cm margin-top=1cm margin-bottom=2cm margin-left=2.5cm
margin-right=2.5cm
fo:region-body margin-top=3cm/
fo:region-before extent=3cm/
fo:region-after extent=1.5cm/
/fo:simple-page-master
/fo:layout-master-set
!-- ouput the content --
fo:page-sequence master-reference=simple
xsl:call-template name=s2_pdf /
/fo:page-sequence
/fo:root


Here is the template it calls:

xsl:template name=s2_pdf
fo:flow flow-name=xsl-region-start
fo:block 
IMG SRC={$spacepath} WIDTH=9 HEIGHT=1 /
/fo:block
/fo:flow
fo:flow flow-name=xsl-region-body
!-- text 1 --
fo:block font-family=Arial font-size=12pt font-weight=bold
break-after=auto space-after=10pt text-align=left
xsl:call-template name=text_display_and_edit
xsl:with-param name=text_number select=number('1') /
xsl:with-param name=text_firstname select=string('TEXT') /
xsl:with-param name=texttype select=string('norich') /
/xsl:call-template
/fo:block
!-- text 2 --
fo:block font-family=Arial font-size=12pt font-weight=normal
text-align=left
xsl:call-template name=text_display_and_edit
xsl:with-param name=text_number select=number('2') /
xsl:with-param name=text_firstname select=string('TEXT') /
xsl:with-param name=texttype select=string('norich') /
/xsl:call-template
/fo:block
/fo:flow

I have 2 problems.

1. With the image tag the way that it is, I get an error claiming the tag
needs an accompaning /img. This is confusing to me because the tag above
contains a /.
2. If I take the image tag out I get a message complaining about more than
one flow in a page sequence. How else can I write to different xsl: regions
of the same page? Should I just use tables for this?

Thanks,

Luke


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



Re: Document Questions

2005-01-10 Thread Christopher Milton
Where is the closing /xsl:template?

--- Luke Shannon [EMAIL PROTECTED] wrote:
 Hello;
 
 I am working on creating all the various layouts our product supports in FO.
 
 Having some issues.
 
 The code below runs when it is time to get the FO input:
 
 !-- fo root: all document properties go inside this tag --
 fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
 !-- configure the page attributes --
 fo:layout-master-set
 fo:simple-page-master master-name=simple page-height=29.7cm
 page-width=21cm margin-top=1cm margin-bottom=2cm margin-left=2.5cm
 margin-right=2.5cm
 fo:region-body margin-top=3cm/
 fo:region-before extent=3cm/
 fo:region-after extent=1.5cm/
 /fo:simple-page-master
 /fo:layout-master-set
 !-- ouput the content --
 fo:page-sequence master-reference=simple
 xsl:call-template name=s2_pdf /
 /fo:page-sequence
 /fo:root
 
 
 Here is the template it calls:
 
 xsl:template name=s2_pdf
 fo:flow flow-name=xsl-region-start
 fo:block 
 IMG SRC={$spacepath} WIDTH=9 HEIGHT=1 /
 /fo:block
 /fo:flow
 fo:flow flow-name=xsl-region-body
 !-- text 1 --
 fo:block font-family=Arial font-size=12pt font-weight=bold
 break-after=auto space-after=10pt text-align=left
 xsl:call-template name=text_display_and_edit
 xsl:with-param name=text_number select=number('1') /
 xsl:with-param name=text_firstname select=string('TEXT') /
 xsl:with-param name=texttype select=string('norich') /
 /xsl:call-template
 /fo:block
 !-- text 2 --
 fo:block font-family=Arial font-size=12pt font-weight=normal
 text-align=left
 xsl:call-template name=text_display_and_edit
 xsl:with-param name=text_number select=number('2') /
 xsl:with-param name=text_firstname select=string('TEXT') /
 xsl:with-param name=texttype select=string('norich') /
 /xsl:call-template
 /fo:block
 /fo:flow
 
 I have 2 problems.
 
 1. With the image tag the way that it is, I get an error claiming the tag
 needs an accompaning /img. This is confusing to me because the tag above
 contains a /.
 2. If I take the image tag out I get a message complaining about more than
 one flow in a page sequence. How else can I write to different xsl: regions
 of the same page? Should I just use tables for this?
 
 Thanks,
 
 Luke
 
 
 -
 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: Document Questions

2005-01-10 Thread Luke Shannon
Hi;

I have scrapped the code I originally posted in favour of tables.

My code runs without error now, but the document is blank?

Any tips would be appreciated:

Code starts here:

!-- fo root: all document properties go inside this tag --
fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
!-- configure the page attributes --
fo:layout-master-set
fo:simple-page-master master-name=simple page-height=29.7cm
page-width=21cm margin-top=1cm margin-bottom=2cm margin-left=2.5cm
margin-right=2.5cm
fo:region-body margin-top=3cm/
fo:region-before extent=3cm/
fo:region-after extent=1.5cm/
/fo:simple-page-master
/fo:layout-master-set
!-- ouput the content --
fo:page-sequence master-reference=simple
xsl:call-template name=s2_pdf /
/fo:page-sequence
/fo:root

Template Defined Here:

xsl:template name=s2_pdf
fo:flow flow-name=xsl-region-body
fo:table
fo:table-body
fo:table-row
!-- image cell --
fo:table-cell number-columns-spanned=2
fo:block
fo:external-graphic src=url({$spacepath})/
/fo:block
/fo:table-cell
/fo:table-row
fo:table-row
!-- text number one cell --
fo:table-cell
fo:block font-family=Arial font-size=12pt font-weight=bold
break-after=auto space-after=10pt text-align=left
xsl:call-template name=text_display_and_edit
xsl:with-param name=text_number select=number('1') /
xsl:with-param name=text_firstname select=string('TEXT') /
xsl:with-param name=texttype select=string('norich') /
/xsl:call-template
/fo:block
/fo:table-cell
!-- text number two cell --
fo:table-cell
fo:block font-family=Arial font-size=12pt font-weight=bold
break-after=auto space-after=10pt text-align=left
xsl:call-template name=text_display_and_edit
xsl:with-param name=text_number select=number('2') /
xsl:with-param name=text_firstname select=string('TEXT') /
xsl:with-param name=texttype select=string('norich') /
/xsl:call-template
/fo:block
/fo:table-cell
/fo:table-row
/fo:table-body
/fo:table
/fo:flow
/xsl:template

Thanks,

Luke



- Original Message - 
From: Luke Shannon [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 10, 2005 2:43 PM
Subject: Document Questions


 Hello;

 I am working on creating all the various layouts our product supports in
FO.

 Having some issues.

 The code below runs when it is time to get the FO input:

 !-- fo root: all document properties go inside this tag --
 fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
 !-- configure the page attributes --
 fo:layout-master-set
 fo:simple-page-master master-name=simple page-height=29.7cm
 page-width=21cm margin-top=1cm margin-bottom=2cm margin-left=2.5cm
 margin-right=2.5cm
 fo:region-body margin-top=3cm/
 fo:region-before extent=3cm/
 fo:region-after extent=1.5cm/
 /fo:simple-page-master
 /fo:layout-master-set
 !-- ouput the content --
 fo:page-sequence master-reference=simple
 xsl:call-template name=s2_pdf /
 /fo:page-sequence
 /fo:root


 Here is the template it calls:

 xsl:template name=s2_pdf
 fo:flow flow-name=xsl-region-start
 fo:block 
 IMG SRC={$spacepath} WIDTH=9 HEIGHT=1 /
 /fo:block
 /fo:flow
 fo:flow flow-name=xsl-region-body
 !-- text 1 --
 fo:block font-family=Arial font-size=12pt font-weight=bold
 break-after=auto space-after=10pt text-align=left
 xsl:call-template name=text_display_and_edit
 xsl:with-param name=text_number select=number('1') /
 xsl:with-param name=text_firstname select=string('TEXT') /
 xsl:with-param name=texttype select=string('norich') /
 /xsl:call-template
 /fo:block
 !-- text 2 --
 fo:block font-family=Arial font-size=12pt font-weight=normal
 text-align=left
 xsl:call-template name=text_display_and_edit
 xsl:with-param name=text_number select=number('2') /
 xsl:with-param name=text_firstname select=string('TEXT') /
 xsl:with-param name=texttype select=string('norich') /
 /xsl:call-template
 /fo:block
 /fo:flow

 I have 2 problems.

 1. With the image tag the way that it is, I get an error claiming the tag
 needs an accompaning /img. This is confusing to me because the tag above
 contains a /.
 2. If I take the image tag out I get a message complaining about more than
 one flow in a page sequence. How else can I write to different xsl:
regions
 of the same page? Should I just use tables for this?

 Thanks,

 Luke


 -
 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: Document Questions

2005-01-10 Thread J.Pietschmann
Luke Shannon wrote:
fo:region-body margin-top=3cm/
fo:region-before extent=3cm/
fo:region-after extent=1.5cm/
Minor problem here: your body region overlaps region-after.
fo:table
fo:table-body
No fo:table-columns here. Bad. FOP 0.20.5 can't do table auto
layout.
Also, you should have got a warning about using a fixed table
layout. Look carefully.
xsl:with-param name=text_number select=number('1') /
Utterly redundant XPath type conversion.
xsl:with-param name=text_firstname select=string('TEXT') /
xsl:with-param name=texttype select=string('norich') /
More redundant XPath type conversions.
J.Pietschmann
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Document Questions

2005-01-10 Thread Luke Shannon
Thanks. It was the missing column declarations. I don't know all of the
pieces of this system, I am guessing this was giving an error but somewhere
in the code that exception was being caught and not reported.

My issue now is getting the document to find the image source I want to use.

fo:block
fo:external-graphic src=url(hockey_canada0104.jpg)/
/fo:block

What path should I be putting before the image name? One from the tomcat bin
directory to the location of the image on the server? Right now the image
gets dumped in the same place the PDF is saved to.

Thanks for the help,

Luke
- Original Message - 
From: J.Pietschmann [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 10, 2005 5:12 PM
Subject: Re: Document Questions


 Luke Shannon wrote:
  fo:region-body margin-top=3cm/
  fo:region-before extent=3cm/
  fo:region-after extent=1.5cm/

 Minor problem here: your body region overlaps region-after.

  fo:table
  fo:table-body

 No fo:table-columns here. Bad. FOP 0.20.5 can't do table auto
 layout.
 Also, you should have got a warning about using a fixed table
 layout. Look carefully.

  xsl:with-param name=text_number select=number('1') /
 Utterly redundant XPath type conversion.

  xsl:with-param name=text_firstname select=string('TEXT') /
  xsl:with-param name=texttype select=string('norich') /
 More redundant XPath type conversions.

 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]



Re: Document Questions

2005-01-10 Thread The Web Maestro
On Jan 10, 2005, at 3:14 PM, Luke Shannon wrote:
snip
My issue now is getting the document to find the image source I want 
to use.

fo:block
fo:external-graphic src=url(hockey_canada0104.jpg)/
/fo:block
What path should I be putting before the image name? One from the 
tomcat bin
directory to the location of the image on the server? Right now the 
image
gets dumped in the same place the PDF is saved to.

Thanks for the help,
Luke
Not seeing the set up your using (userconfig.xml? OS platform, etc.), 
here're a few links which could provide the answer

http://xml.apache.org/fop/faq.html#cannot-find-external-graphics
http://xml.apache.org/fop/fo.html#external-resources
http://xml.apache.org/fop/graphics.html
HTH!
Web Maestro Clay
--
[EMAIL PROTECTED] - http://homepage.mac.com/webmaestro/
My religion is simple. My religion is kindness.
- HH The 14th Dalai Lama of Tibet
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]