Re: Background Color

2002-02-27 Thread Guillaume Laforge



I thought that when you define your 
fo:region-body in your fo:simple-page-master (in the 
fo:layout-master-set) you could define a background-color attribute... 
but unfortunately, it doesnt work :o/ Maybe it's not yet implemented 
?

  - Original Message - 
  From: 
  Ian Taylor 
  To: [EMAIL PROTECTED] 
  Sent: Wednesday, February 27, 2002 10:33 
  AM
  Subject: Background Color
  How do you change the background color of a whole page? I am 
  applying it to all my tables at the moment but there are white areas 
  between them that I would like to be 
blue.Thanks


Re: Options

2002-02-27 Thread Jeremias Maerki
 I saw the code pieces on the metioned website but I did not understand ist:
 
 Having the driver-object defined in the first box on the site and the
 option -object from the third box, how can I plug the option to the driver?

Well, the documentation might be misleading. You don't have to plug in
anything, because new Options... uses static stuff in the background.
So, just do new Options somewhere before your call to FOP and it
should work.

Cheers,
Jeremias Märki

mailto:[EMAIL PROTECTED]

OUTLINE AG
Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
Fon +41 41 317 20 20 - Fax +41 41 317 20 29
Internet http://www.outline.ch



Problem with Charset

2002-02-27 Thread dav sem
Hi,
I have a problem with charset,
I retrive from DB XML with charset ISO-8859-1.
This XML contain some character like à è ì ò ù (I'm italian)
When I exec Driver.Run() I obtain
the seguent error:
FOPException An invalid XML character (Unicode: 0xf9)
was found in the element content (my xml tag) of the document!
What is the way to solve this problem
Regards
DS.





_
MSN Photos è il metodo più semplice per condividere, modificare e stampare 
le tue foto preferite. http://photos.msn.it/Support/WorldWide.aspx



Re: Options

2002-02-27 Thread C Brian O'Kelley
So I can call options once (at application start) and it will affect all 
transformations thereafter?
That's nice, as I think I was calling this every transformation.
Brian

On Wed, 27 February 2002, Jeremias Maerki wrote:

 
  I saw the code pieces on the metioned website but I did not understand ist:
  
  Having the driver-object defined in the first box on the site and the
  option -object from the third box, how can I plug the option to the driver?
 
 Well, the documentation might be misleading. You don't have to plug in
 anything, because new Options... uses static stuff in the background.
 So, just do new Options somewhere before your call to FOP and it
 should work.
 
 Cheers,
 Jeremias Märki
 
 mailto:[EMAIL PROTECTED]
 
 OUTLINE AG
 Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
 Fon +41 41 317 20 20 - Fax +41 41 317 20 29
 Internet http://www.outline.ch




Re: Options

2002-02-27 Thread Cyril Rognon
Hi all,
I think this thread would be more usefull on the dev list, but since it's 
here already...

Usually, use of static classes can mess with server environnement that are 
able to elegantly restart themselves without shutting down the JVM they use.

If classes are not taken off memory, values held by static classes remain
There is a design pattern that is meant to handle this case : the 
Singleton. you make the class instanciable just once at a time. This is 
easily made in Java.

I don't know if this answer the question, but that's my $0.02 thought.
At 00:31 28/02/2002 +1000, you wrote:
Jeremias,
Pardon my ignorance, but could you sketch out the nature of the problem 
for me?



RE: region boundaries

2002-02-27 Thread Arved Sandstrom
Comments below.

-Original Message-
From: Alexandre Denes dos Santos [mailto:[EMAIL PROTECTED]
Sent: February 27, 2002 11:02 AM
To: [EMAIL PROTECTED]
Subject: region boundaries

Hi all,

I'm having a problem with regions. In the simplecol4 example, I changed the
page layout  as showed above:

  fo:layout-master-set

!-- layout for the first page --
fo:simple-page-master master-name=only
  page-height=29.7cm
  page-width=21cm
  margin-top=3cm
  margin-bottom=2cm
  margin-left=2.5cm
  margin-right=2.5cm
  fo:region-body   margin-top=1cm margin-bottom=1cm
column-count=3 column-gap=0.15in/
  fo:region-before extent=4cm/
  fo:region-after extent=4cm/
/fo:simple-page-master

  /fo:layout-master-set
  The remaining of the example is the same.

When I print the page using acroread, all the margins are ok,  but the body
overlapped the before and after regions (the init of the body is at 1.5cm
from the top margin and 1cm from the bottom margin). The text of the after
region was printed four lines before the end of the body region, like a
watermark.

In my understanding, the extent of the region-after and region-before is the
length of the region, and the region-body should use all the remaining space
in the center (something like the BorderLayout in Java). Is this correct?

Can someone tell me how the extent works and how can I define a static
length for the before and after regions?

Thanks in advance

Denes

*

Because of the margings on the page-master, you effectively have a working
area of height (29.7cm - 3cm - 2cm) = 24.7cm, and a width of (21cm - 2.5cm -
2.5cm) = 16cm.

There are no changes made to reference-orientation, so the margin directions
on the *region-body* correspond to the page-master directions. As a result,
the region-body (which does _not_ use all the remaining space in the centre)
is inset 1cm from the top, 1cm from the bottom, and 0cm from both left and
right, ending up with a height (also block-progression-dimension in this
case, with the default 'paginate'   'overflow' settings) of (24.7cm - 1cm -
1cm) = 22.7cm, and a width (also inline-progression-dimension) of 16cm.

The before  after regions will overlap by 3cm because the extents on the
outside regions, AND the margins on the region-body, are both measured from
the edges of the content-rectangle of the page: the 24.7cm x 16cm rectangle.

If you set the margin-top and margin-bottom on the region-body to 5cm you
would have 1cm clearance. In which case the region-body height would be
14.7cm.

AHS





newbie in town

2002-02-27 Thread Meltem Kogelbauer

Hi All,

I have download FOB and want to use it as a standalone application to test
XML transformnations to PDF using XSLT.

Using this command line in command promt;

D:\fop-0.20.3fob -xml test.xml -xsl test.xsl -pdf test.pdf

it build the formatting object tree, parses the document and then stops the
renderer giving the following error:

'master-reference' for 'fo:page-sequence' matches no 'simple-page-master' or
'page-sequence-master'

here is the XML

greeting
  Hello, World!
/greeting


and, here is 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:output method=xml/

  xsl:template match=/
fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
  fo:layout-master-set
fo:simple-page-master margin-right=75pt margin-left=75pt 
  page-height=11in page-width=8.5in
  margin-bottom=25pt margin-top=25pt master-name=main
  fo:region-before extent=25pt/
  fo:region-body margin-top=50pt margin-bottom=50pt/
  fo:region-after extent=25pt/
/fo:simple-page-master
fo:page-sequence-master master-name=standard
  fo:repeatable-page-master-alternatives
fo:conditional-page-master-reference master-name=main
odd-or-even=any/
  /fo:repeatable-page-master-alternatives
/fo:page-sequence-master
  /fo:layout-master-set
  
  fo:page-sequence master-name=standard
fo:flow flow-name=xsl-region-body
  xsl:apply-templates select=greeting/
/fo:flow
  /fo:page-sequence
/fo:root
  /xsl:template

  xsl:template match=greeting
fo:block line-height=76pt font-size=72pt text-align=center
  xsl:value-of select=./
/fo:block
  /xsl:template

/xsl:stylesheet


I cannot get the PDF output, please help.

Meltem


Re: markers

2002-02-27 Thread Chuck Paussa
Hi Bart,
I've done some playing with markers also and gotten them to work pretty 
well. One of the things I've noticed is that FOP complains mightily 
about both fo:marker must be an initial child and marker-class-name' 
must be unique for same parent.but, they are recoverable errors and can 
be ignored.

Here's an XML and XSL to demonstrate the capabilities. Notice that I 
place a marker at the beginning and end of each marked block (That's 
strictly illegal! But it works) I also have placed an x in the illegal 
marker contents so you can see the illegal retrieval. I do that so that 
the functions first-including-carryover and last-ending-within-page will 
work. Arved did a great job of implementing markers, you just have to 
break the rules for now (and be prepared to unbreak the rules  when FOP 
has a correct implementation)

fop -xsl dictionary.xsl -xml dictionary.xml -pdf dictionary.pdf
Chuck
Bart Locanthi wrote:
does fop support markers? i'm having trouble getting them to work.
my input looks like
...
fo:flow
 fo:block
   fo:block
 fo:marker marker-class-name=chapchapter one/fo:marker
 ...
   /fo:block
 /fo:block
 fo:block
   fo:block
 fo:marker marker-class-name=chapchapter two/fo:marker
...
note that the markers share a common great-grandparent.
the error message i get from any fop-0.20.[23] is:
[ERROR]: fo:marker must be an initial child,and 'marker-class-name' 
must be unique for same parent.

i'm following all the rules, i think, but no joy.
sounds like a simple misconception on my part but i'm stumped.

root
	blockOne/block
	blockTwo/block
	blockThr/block
	blockFou/block
	blockFiv/block
	blockSix/block
	blockSev/block
	blockEig/block
	blockNin/block
	blockTen/block
	blockEle/block
	blockTwe/block
	blockThi/block
	blockFor/block
	blockFif/block
	blockSex/block
	blockSiv/block
	blockEgg/block
	blockNon/block
/root?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;
		exclude-result-prefixes=fo

xsl:output method=xml version=4.0 omit-xml-declaration=yes indent=yes/

xsl:template match=/

			fo:root
fo:layout-master-set
	fo:simple-page-master master-name  =page-first
			page-height  =8.5in
			page-width   =11in
		fo:region-body margin-top   =5cm
		margin-bottom=.5in
		margin-left  =.5in
		margin-right =.5in
		column-count =3/
		fo:region-before extent=6cm/
	/fo:simple-page-master
/fo:layout-master-set

fo:page-sequence master-name=page-first
	fo:static-content flow-name=xsl-region-before
		fo:table
			fo:table-column column-width=5.5in/
			fo:table-column column-width=5.5in/
			fo:table-body
fo:table-row
	fo:table-cell
		fo:block keep-together=auto
			first-starting-within-page:
			fo:retrieve-marker retrieve-class-name=entry retrieve-boundary=page retrieve-position=first-starting-within-page/
		/fo:block
	/fo:table-cell
	fo:table-cell
		fo:block keep-together=auto text-align=end
			first-including-carryover :
			fo:retrieve-marker retrieve-class-name=entry retrieve-boundary=page retrieve-position=first-including-carryover/
		/fo:block
	/fo:table-cell
/fo:table-row
fo:table-row
	fo:table-cell
		fo:block keep-together=auto
			last-starting-within-page :
			fo:retrieve-marker retrieve-class-name=entry retrieve-boundary=page retrieve-position=last-starting-within-page/
		/fo:block
	/fo:table-cell
	fo:table-cell
		fo:block keep-together=auto text-align=end
			last-ending-within-page   :
			fo:retrieve-marker retrieve-class-name=entry retrieve-boundary=page retrieve-position=last-ending-within-page/
		/fo:block
	/fo:table-cell
/fo:table-row
			/fo:table-body
		/fo:table
	/fo:static-content
	fo:flow flow-name=xsl-region-body

		xsl:for-each select=/root/block
			xsl:variable name=this select=./
			fo:blockfo:marker marker-class-name=entryxsl:value-of select=.//fo:marker
	xsl:value-of select=concat($this,' ')/xsl:value-of select=concat($this,' ')/xsl:value-of select=concat($this,' ')/xsl:value-of select=concat($this,' ')/xsl:value-of select=concat($this,' ')/
	xsl:value-of select=concat($this,' ')/xsl:value-of select=concat($this,' ')/xsl:value-of select=concat($this,' ')/xsl:value-of select=concat($this,' ')/xsl:value-of select=concat($this,' ')/
	xsl:value-of select=concat($this,' ')/xsl:value-of select=concat($this,' ')/xsl:value-of select=concat($this,' ')/xsl:value-of select=concat($this,' ')/xsl:value-of select=concat($this,' ')/
	xsl:value-of select=concat($this,' ')/xsl:value-of select=concat($this,' ')/xsl:value-of select=concat($this,' ')/xsl:value-of select=concat($this,' ')/xsl:value-of 

Re: newbie in town

2002-02-27 Thread Jeremias Maerki
 'master-reference' for 'fo:page-sequence' matches no 'simple-page-master' or
 'page-sequence-master'

You have to change some of the master-name attributes to
master-reference to be conformant with the XSL REC.

 fo:conditional-page-master-reference master-name=main
 odd-or-even=any/

fo:conditional-page-master-reference master-reference=main 
odd-or-even=any/

fo:page-sequence master-reference=standard

Cheers,
Jeremias Märki

mailto:[EMAIL PROTECTED]

OUTLINE AG
Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
Fon +41 41 317 20 20 - Fax +41 41 317 20 29
Internet http://www.outline.ch



dynamic image in PDF

2002-02-27 Thread Chris Faulkner
Hi

I have a servlet which creates imagery. I want to embed this in a PDF document 
and I've been playing around with FOP in JSP. I can get PDF generated but only 
on static image references, using external-
graphic. What I need to know is - is there anyway of generating the image 
dynamically, with the reference to the servlet embedded in the .fo ? 

I can see there is a fo:instream- foreign-object but the examples just show 
examples of SVG. Is there anyway to extend this and if so, doesanyone have 
examples ?

Thanks

Chris 







Have anyone used FOA tool

2002-02-27 Thread Mathy V Arumugam
I am having problem with bringing up the main window Formatting Object
Authoring Tool window.  All the other windows come up ok.

Thanks
Mathy



RE: markers

2002-02-27 Thread Arved Sandstrom
Interesting...I didn't realise that that much was still functional. :-) I
will have to revisit and see what the scope of potential fixes is.

AHS

-Original Message-
From: Chuck Paussa [mailto:[EMAIL PROTECTED]
Sent: February 27, 2002 12:48 PM
To: [EMAIL PROTECTED]
Subject: Re: markers


Hi Bart,

I've done some playing with markers also and gotten them to work pretty
well. One of the things I've noticed is that FOP complains mightily
about both fo:marker must be an initial child and marker-class-name'
must be unique for same parent.but, they are recoverable errors and can
be ignored.

Here's an XML and XSL to demonstrate the capabilities. Notice that I
place a marker at the beginning and end of each marked block (That's
strictly illegal! But it works) I also have placed an x in the illegal
marker contents so you can see the illegal retrieval. I do that so that
the functions first-including-carryover and last-ending-within-page will
work. Arved did a great job of implementing markers, you just have to
break the rules for now (and be prepared to unbreak the rules  when FOP
has a correct implementation)

fop -xsl dictionary.xsl -xml dictionary.xml -pdf dictionary.pdf

Chuck



Re: region boundaries

2002-02-27 Thread Alexandre Denes dos Santos
Thanks to Arved Sandstrom for the explanation.

I have only one more question: if the extention of the region-before is
defined by the magin-top extention of the region body, what is the use of
the parameter extent in the declaration of the region-before? It´s just for
clipping?

Denes

- Original Message -
From: Arved Sandstrom [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 27, 2002 12:27 PM
Subject: RE: region boundaries


 Comments below.

 -Original Message-
 From: Alexandre Denes dos Santos [mailto:[EMAIL PROTECTED]
 Sent: February 27, 2002 11:02 AM
 To: [EMAIL PROTECTED]
 Subject: region boundaries

 Hi all,

 I'm having a problem with regions. In the simplecol4 example, I changed
the
 page layout  as showed above:

   fo:layout-master-set

 !-- layout for the first page --
 fo:simple-page-master master-name=only
   page-height=29.7cm
   page-width=21cm
   margin-top=3cm
   margin-bottom=2cm
   margin-left=2.5cm
   margin-right=2.5cm
   fo:region-body   margin-top=1cm margin-bottom=1cm
 column-count=3 column-gap=0.15in/
   fo:region-before extent=4cm/
   fo:region-after extent=4cm/
 /fo:simple-page-master

   /fo:layout-master-set
   The remaining of the example is the same.

 When I print the page using acroread, all the margins are ok,  but the
body
 overlapped the before and after regions (the init of the body is at 1.5cm
 from the top margin and 1cm from the bottom margin). The text of the after
 region was printed four lines before the end of the body region, like a
 watermark.

 In my understanding, the extent of the region-after and region-before is
the
 length of the region, and the region-body should use all the remaining
space
 in the center (something like the BorderLayout in Java). Is this correct?

 Can someone tell me how the extent works and how can I define a static
 length for the before and after regions?

 Thanks in advance

 Denes

 *

 Because of the margings on the page-master, you effectively have a working
 area of height (29.7cm - 3cm - 2cm) = 24.7cm, and a width of (21cm -
2.5cm -
 2.5cm) = 16cm.

 There are no changes made to reference-orientation, so the margin
directions
 on the *region-body* correspond to the page-master directions. As a
result,
 the region-body (which does _not_ use all the remaining space in the
centre)
 is inset 1cm from the top, 1cm from the bottom, and 0cm from both left and
 right, ending up with a height (also block-progression-dimension in this
 case, with the default 'paginate'   'overflow' settings) of (24.7cm -
1cm -
 1cm) = 22.7cm, and a width (also inline-progression-dimension) of 16cm.

 The before  after regions will overlap by 3cm because the extents on the
 outside regions, AND the margins on the region-body, are both measured
from
 the edges of the content-rectangle of the page: the 24.7cm x 16cm
rectangle.

 If you set the margin-top and margin-bottom on the region-body to 5cm you
 would have 1cm clearance. In which case the region-body height would be
 14.7cm.

 AHS





RE: region boundaries

2002-02-27 Thread Arved Sandstrom
The margins on the region-body define only the insets of the edges of the
region-body from the edges of the page content rectangle. The dimensions of
the outside regions, perpendicular to the edges, are defined by the extent
value.

If we have this SPM:

fo:simple-page-master master-name=only
page-height=29.7cm
page-width=21cm
margin-top=3cm
margin-bottom=2cm
margin-left=2.5cm
margin-right=2.5cm
fo:region-body margin-top=5cm margin-bottom=5cm
column-count=3 column-gap=0.15in/
fo:region-before extent=4cm/
fo:region-after extent=4cm/
/fo:simple-page-master

then we end up with a layout like I picture in the attached figure.

Regards,
AHS

-Original Message-
From: Alexandre Denes dos Santos [mailto:[EMAIL PROTECTED]
Sent: February 27, 2002 1:39 PM
To: [EMAIL PROTECTED]
Subject: Re: region boundaries


Thanks to Arved Sandstrom for the explanation.

I have only one more question: if the extention of the region-before is
defined by the magin-top extention of the region body, what is the use of
the parameter extent in the declaration of the region-before? It´s just for
clipping?

Denes

- Original Message -
From: Arved Sandstrom [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 27, 2002 12:27 PM
Subject: RE: region boundaries


 Comments below.

 -Original Message-
 From: Alexandre Denes dos Santos [mailto:[EMAIL PROTECTED]
 Sent: February 27, 2002 11:02 AM
 To: [EMAIL PROTECTED]
 Subject: region boundaries

 Hi all,

 I'm having a problem with regions. In the simplecol4 example, I changed
the
 page layout  as showed above:

   fo:layout-master-set

 !-- layout for the first page --
 fo:simple-page-master master-name=only
   page-height=29.7cm
   page-width=21cm
   margin-top=3cm
   margin-bottom=2cm
   margin-left=2.5cm
   margin-right=2.5cm
   fo:region-body   margin-top=1cm margin-bottom=1cm
 column-count=3 column-gap=0.15in/
   fo:region-before extent=4cm/
   fo:region-after extent=4cm/
 /fo:simple-page-master

   /fo:layout-master-set
   The remaining of the example is the same.

 When I print the page using acroread, all the margins are ok,  but the
body
 overlapped the before and after regions (the init of the body is at 1.5cm
 from the top margin and 1cm from the bottom margin). The text of the after
 region was printed four lines before the end of the body region, like a
 watermark.

 In my understanding, the extent of the region-after and region-before is
the
 length of the region, and the region-body should use all the remaining
space
 in the center (something like the BorderLayout in Java). Is this correct?

 Can someone tell me how the extent works and how can I define a static
 length for the before and after regions?

 Thanks in advance

 Denes

 *

 Because of the margings on the page-master, you effectively have a working
 area of height (29.7cm - 3cm - 2cm) = 24.7cm, and a width of (21cm -
2.5cm -
 2.5cm) = 16cm.

 There are no changes made to reference-orientation, so the margin
directions
 on the *region-body* correspond to the page-master directions. As a
result,
 the region-body (which does _not_ use all the remaining space in the
centre)
 is inset 1cm from the top, 1cm from the bottom, and 0cm from both left and
 right, ending up with a height (also block-progression-dimension in this
 case, with the default 'paginate'   'overflow' settings) of (24.7cm -
1cm -
 1cm) = 22.7cm, and a width (also inline-progression-dimension) of 16cm.

 The before  after regions will overlap by 3cm because the extents on the
 outside regions, AND the margins on the region-body, are both measured
from
 the edges of the content-rectangle of the page: the 24.7cm x 16cm
rectangle.

 If you set the margin-top and margin-bottom on the region-body to 5cm you
 would have 1cm clearance. In which case the region-body height would be
 14.7cm.

 AHS


attachment: spm1.jpg

Re: Background Color

2002-02-27 Thread Josh Campbell
I'm pretty sure you can't at this stage. FOP accepts it in the 
fo:region-body without errors but doesn't do anything about it.
I used a table cell with a height attribute and put the color in that. 
Everything else went inside that cell.

Josh
Ian Taylor wrote:
How do you change the background color of a whole page? I am applying 
it to all my tables at the moment but there are white areas between 
them that I would like to be blue.

Josh Campbell
ZYPE - Graphical Interface Design
Phone: 03 3862094
Mobile: 021 400 472
Web: www.zype.co.nz



XMLSpy - FOP

2002-02-27 Thread Savino, Matt C
Has anyone gotten FO transformations to work on XMLSpy w/FOP .20.2? No
matter what I try I keep getting the following error:

Output of external XSL converter:

The filename, directory name, or volume label syntax is incorrect.

thx a lot,

Matt Savino
Senior Systems Analyst
Quest Diagnostics Clinical Trials