Problem Installing fop under Linux

2002-11-11 Thread david zuccaro
Greetings!,

I'm trying to install fop.

When I try to run it I get this error:

java  org.apache.fop.apps.Fop  -fo  bgimage.fo  -pdf myfile.pdf
Exception in thread main java.lang.NoClassDefFoundError:
org/apache/avalon/framework/logger/Logger
at org.apache.fop.apps.Fop.main(Unknown Source)

Does this mean I am missing a .jar file from my CLASSPATH?

If so which one do I need to include?

This is my class path:

CLASSPATH=/usr/local/src/fop-0.20.4rc/build/fop.jar:/usr/local/src/fop-0.20.
4rc/lib/ant-1.4
.1.jar:/usr/local/src/fop-0.20.4rc/lib/batik.jar:/usr/local/src/fop-0.20.4rc
/lib/xalan-2.3.
1.jar:/usr/local/src/fop-0.20.4rc/xercesImpl-2.0.1.jar:/usr/local/src/fop-0.
20.4rc/xml-apis
.jar:/usr/local/src/fop-0.20.4rc/avalon-framework-cvs-20020315.jar

Thank you!



RE: Problem Installing fop under Linux

2002-11-11 Thread Roland Neilands
David,

 I'm trying to install fop.
0.20.4 is the newest version. RC means Release Candidate.

 java  org.apache.fop.apps.Fop  -fo  bgimage.fo  -pdf myfile.pdf
 Exception in thread main java.lang.NoClassDefFoundError:
 org/apache/avalon/framework/logger/Logger
 at org.apache.fop.apps.Fop.main(Unknown Source)

 Does this mean I am missing a .jar file from my CLASSPATH?
Probably. Get 0.20.4 1st, then compare the CLASSPATH with the actual command
line.

Regards,
Roland




RE: Problem Installing fop under Linux

2002-11-11 Thread david zuccaro
0.20.4 is what I am trying to install.

 then compare the CLASSPATH with the actual command
 line.

not sure what you mean.

This is my command line:

java  org.apache.fop.apps.Fop  -fo  bgimage.fo  -pdf myfile.pdf







RE: Problem Installing fop under Linux

2002-11-11 Thread Roland Neilands
David,

 0.20.4 is what I am trying to install.
  then compare the CLASSPATH with the actual command
  line.
 not sure what you mean.
Have a look in fop.bat : uses the -cp parameter to pass in the classpath. I
think you're missing logkit-1.0.jar.

 This is my command line:
 java  org.apache.fop.apps.Fop  -fo  bgimage.fo  -pdf myfile.pdf

Your CLASSPATH still points to 0.20.4rc. Change each path to the correct
directory.

Regards,
Roland



RE: Problem Installing fop under Linux

2002-11-11 Thread david zuccaro
I apologize Roland,

I didn't quite catch the distinction between 0.20.4 and 0.20.4rc.  I have
now installed the correct version of fop and updated the directories
appropriately.

Unfortunately I still get the same error.

 Have a look in fop.bat : uses the -cp parameter to pass in the classpath.
I
 think you're missing logkit-1.0.jar.

logkit-1.0.jar doesn't seem to come with the linux version of fop.  Is
that file just for windows os's?

If not, where could I download it from?

Regards,

David



RE: Problem Installing fop under Linux

2002-11-11 Thread Roland Neilands
David,

 logkit-1.0.jar doesn't seem to come with the linux version
 of fop.
My mistake; Open mouth, change foot.

Check each jar in the 'build'  'lib' dirs are in your CLASSPATH.

If you're happy this is correct, check the current value `echo $CLASSPATH`
when you run it.

Other suggestions:
Run it on one of the docs/examples instead.
Try `fop.sh`

Cheers,
Roland



RE: Problem Installing fop under Linux

2002-11-11 Thread david zuccaro
Doh!

I see the problem:

/usr/local/src/fop-0.20.4rc/avalon-framework-cvs-20020315.jar

should be:

/usr/local/src/fop-0.20.4rc/lib/avalon-framework-cvs-20020315.jar

Thank you very much for your help Roland.

Regards,

David


Problem reading userconfig.xml on UNIX

2002-11-11 Thread Müller, Markus
Hi there,

I have trouble using the userconfig.xml on UNIX. FOP generates these
messages:
-- some lines omitted --
[DEBUG] OPTIONS
[DEBUG] user configuration file: /u/BSK27/fop0.20.4/conf/userconfig.xml
[DEBUG] debug mode on
[DEBUG] dump configuration
[DEBUG] quiet mode on
[DEBUG] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[DEBUG] reading user configuration file
[DEBUG] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[ERROR] Could not load user configuration file
/u/BSK27/fop0.20.4/conf/userconfig.xml - error: Content is not allowed in
prolog.
[ERROR] using default values
-- snip --

Who has problems with my config file? SAX2? FOP? What's wrong? The
userconfig.xml looks like this (and works fine on Windows):

-- begin --
!--!DOCTYPE configuration SYSTEM config.dtd--
!-- 
 this file contains templates which allow an user easy 
 configuration of Fop. Actually normally you don't need this
configuration 
 file, but if you need to change configuration, you should
 always use this file and *not* config.xml. 
 Usage: java org.apache.fop.apps.Fop -c userconfig.xml -fo fo-file -pdf
pdf-file
--
-- ... --

Suggestions welcome...

Markus


Re: dynamic sizing of label-end() body-start()

2002-11-11 Thread Oleg Tkachenko
Eric Smith wrote:
I cannot see in the docs how to have the label size automatcally set
by the width of the label.  I am using  with level=multiple.
Accordingly the label may be 1. or 1.4 or 1.4.2.7 or whatever.
Anyone know how to do this?
Well, fo lists are not very smart objects and without a careful planning 
labels may wrap or overlap body. It's a stylesheet author responsibility to 
provide provisional-distance-between-starts property value that is big enough 
to cater the biggest label may occur in the list, otherwise a label value will 
be wrapped. You may consider calculating of 
provisional-distance-between-starts at xslt stage according to label length in 
em units, for example.

See http://www.dpawson.co.uk/xsl/sect3/bk/ch07.html#d0e5755.
--
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel


Re: Table and first/last page

2002-11-11 Thread Jeremias Maerki
Here's a sample of a layout-master-set that has different page headers
for the first and other pages. The important hint is the region-name
that is overridden in fo:region-before.

fo:layout-master-set
fo:simple-page-master master-name=IS-11 page-height=29.7cm 
page-width=21cm margin-left=1.5cm margin-right=1.3cm margin-top=12mm 
margin-bottom=0mm
fo:region-before region-name=doc-header extent=71mm/
fo:region-body margin-top=73mm margin-bottom=10mm/
fo:region-after extent=10mm/
/fo:simple-page-master
fo:simple-page-master master-name=IS-12 page-height=29.7cm 
page-width=21cm margin-left=1.5cm margin-right=1.3cm margin-top=34mm 
margin-bottom=0mm
fo:region-before region-name=other-page-header 
extent=17mm/
fo:region-body margin-top=19mm margin-bottom=10mm/
fo:region-after extent=10mm/
/fo:simple-page-master
fo:page-sequence-master master-name=invoice
fo:repeatable-page-master-alternatives
fo:conditional-page-master-reference 
master-reference=IS-11 page-position=first/
fo:conditional-page-master-reference 
master-reference=IS-12/
/fo:repeatable-page-master-alternatives
/fo:page-sequence-master
/fo:layout-master-set

Further down the document you'll then have the following:

fo:static-content flow-name=doc-header

fo:static-content flow-name=other-page-header

instead of 

fo:static-content flow-name=xsl-region-before


This lets you define separate page headers. What you currently can't do
is define a conditional-page-master-reference for page-position=last.
This is not implemented.


On Mon, 11 Nov 2002 11:07:35 +0100 Nwilan Glirt wrote:
 I am using FO to transform an XML document into a nice business form (like 
 an invoice). I am thinking of presenting all the postings in a table that 
 runs across as many pages as needed. My problem is, that I want to make the 
 top and bottom of the document to be different for the first page (should 
 contain address etc.), last pages (should contain a total amount) and all 
 the pages in between (should just list the postings).
 
 I have been playing around with fo:repeatable-page-master-alternatives and 
 conditional-page-master-reference, but that only seems to be affecting the 
 selection of the page-master, which only deals with the pysical aspects of 
 the page (size, margins etc), and those don't differ across the pages. I 
 feel I got something basically wrong here. I would appreciate any help!


Jeremias Maerki



Space After fo:block

2002-11-11 Thread Balajee Chandrasekaran
Hi All,
In my generated PDF file from FO... within the fo:flow element
continuous fo:block elements are separated with some space but

continuous fo:table elements are not separated by any space..

my element descriptions in fo are as follows


Table
fo:table inline-progression-dimension.minimum=1pt table-layout=fixed 
width=100%
fo:table-column column-width=proportional-column-width(1) 
column-number=1/
fo:table-header
fo:table-row
fo:table-cell
fo:block text-align=start font-size=7pt 
font-family=Courier line-height=9pt
xsl:textSome Text/xsl:text
/fo:block
/fo:table-cell
/fo:table-row
fo:table-header
fo:table-body
fo:table-row
fo:table-cell
fo:block text-align=start font-size=7pt 
font-family=Courier line-height=9pt
xsl:textSome Text/xsl:text
/fo:block
/fo:table-cell
/fo:table-row
fo:table-body
/fo:table


===
Block
fo:block text-align=start font-size=7pt font-family=Courier 
line-height=9pt
xsl:textSome Text/xsl:text
/fo:block
==

How can I make FOP stop adding the spaces after fo:block???

thanks in advance



regards
Balajee Chandrasekaran

Software Engineer
Majesco Software Inc.
Phone : 91-22-5695  Extn No 7911

Belief
Everything is possible for him who believes.
Bible




MASTEK
Investing in relationships
In the US, we're called MAJESCO

~~
Opinions expressed in this e-mail are those of the individual and not that of 
Mastek Limited, unless specifically indicated to that effect. Mastek Limited 
does not accept any responsibility or liability for it. This e-mail and 
attachments (if any) transmitted with it are confidential and/or privileged and 
solely for the use of the intended person or entity to which it is addressed. 
Any review, re-transmission, dissemination or other use of or taking of any 
action in reliance upon this information by persons or entities other than the 
intended recipient is prohibited. This e-mail and its attachments have been 
scanned for the presence of computer viruses. It is the responsibility of the 
recipient to run the virus check on e-mails and attachments before opening 
them. If you have received this e-mail in error, kindly delete this e-mail from 
all computers.
~~



Re: Problem reading userconfig.xml on UNIX

2002-11-11 Thread Oleg Tkachenko
Müller, Markus wrote:
I have trouble using the userconfig.xml on UNIX. FOP generates these
messages:
[DEBUG] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[ERROR] Could not load user configuration file
/u/BSK27/fop0.20.4/conf/userconfig.xml - error: Content is not allowed in
prolog.
Who has problems with my config file? SAX2? FOP? What's wrong? 
That's xml parser, particularly xerces as can be seen in debug. Somehow xerces 
found character data during prolog parsing (only xml declaration, doctype 
declaration, comments, pi's and whitespace allowed in a prolog, which is all 
stuff before root element start tag). Usually that means encoding problem.
Have you changed userconfig.xml encoding? Try to define encoding explicitly in 
the xml declaration.
--
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel



Re: Space After fo:block

2002-11-11 Thread Oleg Tkachenko
Balajee Chandrasekaran wrote:
In my generated PDF file from FO... within the fo:flow element
continuous fo:block elements are separated with some space but
continuous fo:table elements are not separated by any space..
I cannot reproduce your problem, I multiplied your table and then block and 
those were formatted into uniformly stacked tables and blocks. Post small fo 
example that illustrates your problem.

--
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel


page-position=last, FOP vs XEP

2002-11-11 Thread Nwilan Glirt
It has come to my attention that page-position=last is not yet implemented 
in FOP. That is a big problem for the purpose I have. I tried with XEP (from 
RenderX) and it seems to work here. The problem with XEP is a) it does note 
support pcl output, which I need, and b) it is a Windows-only-thing, which 
is also a problem.

I want to stick with FOP. Can anybody tell me when page-position=last will 
be supported in FOP?




_
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* 
http://join.msn.com/?page=features/junkmail



page-position=last vs. conditional blocks

2002-11-11 Thread Nwilan Glirt
Now that I discovered that page-position=last is not implemented in FOP, I 
am looking for alternative ways to produce first, middle and last 
specific pages. Is there any way to do some conditional stuff on blocks such 
as testing if we are currently writing the last page?



_
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail



Re: page-position=last, FOP vs XEP

2002-11-11 Thread Jeremias Maerki

On Mon, 11 Nov 2002 14:33:22 +0100 Nwilan Glirt wrote:
 It has come to my attention that page-position=last is not yet implemented 
 in FOP. That is a big problem for the purpose I have. I tried with XEP (from 
 RenderX) and it seems to work here. The problem with XEP is a) it does note 
 support pcl output, which I need, and b) it is a Windows-only-thing, which 
 is also a problem.
 
 I want to stick with FOP. Can anybody tell me when page-position=last will 
 be supported in FOP?

No, it will be done during the redesign phase, but we can't give you a
date, yet. We were facing the same problem and therefore tried to change
(or to make our customers change) the layout so we didn't need the
page-position=last functionality. Maybe it's also possible with your
layout.

Jeremias Maerki



Re: page-position=last vs. conditional blocks

2002-11-11 Thread Jeremias Maerki
If you know what's exactly on your last page (ex. the last page is a
form that the recipient of the document has to fill out) you could try
to use two page-sequences, where the second page-sequence only defines a
single page-master for the last page. But that won't work if content
flows from the n-1th page to the last page.

Anyway, during XSLT you don't get any information from FOP (even if it
had it) to determine the last page. You can do that only if in the way
outlined above. Perhaps, you have a situation like that.

I hope this helps anyway.

On Mon, 11 Nov 2002 16:17:19 +0100 Nwilan Glirt wrote:
 Now that I discovered that page-position=last is not implemented in FOP, I 
 am looking for alternative ways to produce first, middle and last 
 specific pages. Is there any way to do some conditional stuff on blocks such 
 as testing if we are currently writing the last page?


Jeremias Maerki



RE: page-position=last, FOP vs XEP, business forms

2002-11-11 Thread Ward, Christopher
Would it be posible to iterate over your list of invoices (by using
recursion with the head and tail approach in the xslt translation). But keep
a counter of the number of invoices processed this page. When the counter
hits a certain level start a new page by doing the carried forward/brought
forward part of the page break. 

That way if there are no page breaks all of the invoice lines will appear on
the one page, and if there are more invoice lines that can appear on a
single page the appropriate page break will appear.

This approach will however mean that you have a page sequence for each page.
It will also mean that you have to know how many invoice lines can appear on
a single page.

regards,
Chris



 -Original Message-
 From: Jeremias Maerki [SMTP:[EMAIL PROTECTED]
 Sent: Monday, November 11, 2002 3:41 PM
 To:   [EMAIL PROTECTED]
 Subject:  Re: page-position=last, FOP vs XEP, business forms
 
 :-) We're doing mostly invoices and such but that's exactly the kind of
 requirements that I've always tried to avoid. If you can figure out a
 good (general) solution I'd be glad if you could post it. I regret that
 I never took the time to figure it out myself. I hope somebody on this
 list has a few good ideas. I've thought about markers for the subtotals,
 but I don't know if they can help here.
 
 On Mon, 11 Nov 2002 16:33:08 +0100 Nwilan Glirt wrote:
  I hope that it is possible to work around the missing
 page-position=last. 
  What I am doing is producing a classic invoice-type document which
 needs:
 Special first page with adresses in the header and amount tranferred
 to 
  next page in case of more than one page.
 Middle pages with amount transferred from prev. page and amount 
  tranferred to next page
 Special last page with amount transferred from prev. page and total
 
  amount etc.
  
  On top of this I need a page design for first page also beeing last
 page, 
  with both the adress part and the total part!
  
  I'm not even sure this can be acchived using FO as such. Does anyone
 have 
  experiences with producing business forms such as invoices? Wanna share?
 
 
 Jeremias Maerki


Re: page-position=last vs. conditional blocks

2002-11-11 Thread Oleg Tkachenko
Nwilan Glirt wrote:
Now that I discovered that page-position=last is not implemented in
FOP, I am looking for alternative ways to produce first, middle and
last specific pages. Is there any way to do some conditional stuff on
blocks such as testing if we are currently writing the last page?
No, even FOP itself is unable to know if it's the last page - that's the core 
problem. Actually it probably requires lookahead, the only way I can imagine 
is to try to layout *every* page as last and if flow is not exhausted, 
relayout it again as not last, anyway it's a topic for fop-dev.
If you know explicitly what objects would be on the last page and you are sure 
it fits exactly 1 page you can move last page objects into a different 
fo:page-sequence object with appropriate master-reference to the last page master.

--
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel


Re: page-position=last, FOP vs XEP, business forms

2002-11-11 Thread Jeremias Maerki
Of course. This approach has been proposed a number of times, but that
only works if you really know the height of each invoice position in
advance. But at least for me, it's not that general solution I'm
looking for. Let's hope this helps at least Nwilan Glirt.

On Mon, 11 Nov 2002 15:49:00 + Ward, Christopher wrote:
 Would it be posible to iterate over your list of invoices (by using
 recursion with the head and tail approach in the xslt translation). But keep
 a counter of the number of invoices processed this page. When the counter
 hits a certain level start a new page by doing the carried forward/brought
 forward part of the page break. 
 
 That way if there are no page breaks all of the invoice lines will appear on
 the one page, and if there are more invoice lines that can appear on a
 single page the appropriate page break will appear.
 
 This approach will however mean that you have a page sequence for each page.
 It will also mean that you have to know how many invoice lines can appear on
 a single page.

Jeremias Maerki



Re: page-position=last, FOP vs XEP, business forms

2002-11-11 Thread Oleg Tkachenko
Another *hypothetical* workaround for the last page problem might be the idea 
to use area tree output. FOP in xml output mode produces area tree xml 
document and in this document one can select /AreaTree/Page[last()] - that's 
exactly areas on the last page. Then fo should be changed somehow taking into 
acount this information.

--
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel


Page subsequences exhausted. Using previous subsequence.

2002-11-11 Thread Moisio Juha
Hi, 

I'm having weird problem... I get error message Page subsequences
exhausted. Using previous subsequence.
when renderin xml  xsl to pcl. PDF and PS is ok.

Has somebody had this kind of problem?

I attached my files... 




 eka.xml  eka.xsl  jep.svg 

Regards, 


 Juha Moisio / Tietonauha Oy


[ERROR] unknown font Helvetica-Bold,normal,normal so defaulted font to any
[ERROR] unknown font Helvetica-Bold,normal,normal so defaulted font to any
[ERROR] unknown font Helvetica-Bold,normal,normal so defaulted font to any
[ERROR] unknown font Helvetica-Bold,normal,normal so defaulted font to any
[ERROR] unknown font Helvetica-Bold,normal,normal so defaulted font to any
[ERROR] Page subsequences exhausted. Using previous subsequence.
[INFO] [2]
[ERROR] java.lang.NullPointerException
org.apache.fop.apps.FOPException: java.lang.NullPointerException
at org.apache.fop.apps.CommandLineStarter.run(Unknown Source)
at org.apache.fop.apps.Fop.main(Unknown Source)

-

java.lang.RuntimeException: java.lang.NullPointerException
at
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3231)
at
org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerH
andlerImpl.java:436)
at
org.apache.xerces.parsers.AbstractSAXParser.endDocument(AbstractSAXParser.ja
va:715)
at
org.apache.xerces.impl.XMLNamespaceBinder.endDocument(XMLNamespaceBinder.jav
a:704)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.endDocument(XMLDTDValidator.java:
985)
at
org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(XMLDocumentScannerIm
pl.java:437)
at
org.apache.xerces.impl.XMLEntityManager.endEntity(XMLEntityManager.java:1159
)
at
org.apache.xerces.impl.XMLEntityManager$EntityScanner.load(XMLEntityManager.
java:3204)
at
org.apache.xerces.impl.XMLEntityManager$EntityScanner.skipSpaces(XMLEntityMa
nager.java:2876)
at
org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatc
h(XMLDocumentScannerImpl.java:987)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocume
ntFragmentScannerImpl.java:333)
at
org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserCo
nfiguration.java:529)
at
org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserCo
nfiguration.java:585)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:147)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:114
8)
at
org.apache.xalan.transformer.TrAXFilter.parse(TrAXFilter.java:134)
at org.apache.fop.apps.Driver.render(Unknown Source)
at org.apache.fop.apps.CommandLineStarter.run(Unknown Source)
at org.apache.fop.apps.Fop.main(Unknown Source)
###

This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.
For more information, connect to http://www.F-Secure.com/


eka.xml
Description: Binary data


eka.xsl
Description: Binary data


jep.svg
Description: Binary data


page-position=first

2002-11-11 Thread Scott Moore
As mentioned, page-position=last does not work.

But does page-position=first?

Scott


Re: Page subsequences exhausted. Using previous subsequence.

2002-11-11 Thread Oleg Tkachenko
Moisio Juha wrote:
I'm having weird problem... I get error message Page subsequences
exhausted. Using previous subsequence.
when renderin xml  xsl to pcl. PDF and PS is ok.
Well, error message about page sequences seems to have nothing to do 
with a real problem - you are trying to render svg image to pcl, but 
PCLRenderer doesn't support svg, see today's topic on fop-dev list:
http://marc.theaimsgroup.com/?l=fop-devm=103703269815513w=2.

--
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel


Re: how to center a table horizontally on the page

2002-11-11 Thread Oleg Tkachenko
Biying Huang wrote:
I have a table which has dynamic table-width. I need to put it in the
center of the page horizontally so I put the fo:table in a fo:block and
set text-align=center to the fo:block. But this doesn't work. The
table is always on the left.
text-align is about aligning *inline* content.
In a pure xsl-fo exist at least 2 different methods of centering a table 
on a page, both are actually tricks and unfortunately FOP doesn't 
support both of them. Therefore the only way is using a blind table, see 
http://marc.theaimsgroup.com/?l=fop-userm=102952965830886w=2.

--
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel