Re: FOP embed font -- umlauts are not displayed

2007-03-12 Thread Jeremias Maerki
When I look at the metric file it says HelveticaCyr, not Helvetica,
which might indicate an east-european variant of Helvetica in a
different encoding. I assume FOP can't deal with that kind of font, yet,
and handles it wrong. I think the best alternative for you would be to
find out whether there's a TrueType variant of the font.

On 11.03.2007 17:46:08 lidl wrote:
 
 Hi @all
 
 I have the following problem on which, I hope, you can help me.
 Im searching for an Solution for days :(...
 
 I have an xls-fo file which should use Helvetica  Helvetica Bold, so I
 created a PFM  a XML-Metrics file form a PFB-file.
 
 The output-PDF looks good, and also the font was successfullly embed by FOP,
 but only umlauts are not displayed.
 
 My xls-fo file looks like the following:
 
 ?xml version=1.0 encoding=UTF-8?
   fo:root xmlns:fn=http://www.w3.org/2005/xpath-functions;
 xmlns:fo=http://www.w3.org/1999/XSL/Format;
 xmlns:xdt=http://www.w3.org/2005/xpath-datatypes;
 xmlns:xs=http://www.w3.org/2001/XMLSchema;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   fo:layout-master-set
   fo:simple-page-master master-name=default-page 
 page-height=11in
 page-width=8.5in margin-left=0.6in margin-right=0.6in
   fo:region-body margin-top=0.79in 
 margin-bottom=0.79in/
   /fo:simple-page-master
   /fo:layout-master-set
   fo:page-sequence master-reference=default-page 
 initial-page-number=1
 format=1
   fo:flow flow-name=xsl-region-body
   fo:block
   fo:inline font-family=HelveticaHelvetica ÖÄÜ 
 öäü/fo:inline
   fo:block break-after=page
   /fo:block
   fo:block id=SV_RefID_PageTotal/
   /fo:block
   /fo:flow
   /fo:page-sequence
 /fo:root
 
 The font-reference in the FOP-config:
 ...
 font metrics-url=fonts/Helvetica/HVYU/HVYU.xml kerning=yes
 embed-url=fonts/Helvetica/HVYU/HVYU.pfb
   font-triplet name=Helvetica style=normal weight=normal/
 /font
 ...
 
 The PDF-File contents only
 Helvetia, and after that word 8 Whitespaces (1 Real, 1 for Ö, 1 for Ä and
 so on...)
 
 When I mark the (ö) whitespace and copy  paste it into a notepad i can see
 these letters correctly.
 
 So whats wrong? I can't find it.
 http://www.nabble.com/file/7083/HVYB.xml HVYB.xml 
 -- 
 View this message in context: 
 http://www.nabble.com/FOP-embed-font---%3E-umlauts-are-not-displayed-tf3385049.html#a9422252
 Sent from the FOP - Users mailing list archive at Nabble.com.
 



Jeremias Maerki


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



Re: border-top-xxx and border-bottom-xxx causing wierd errors

2007-03-12 Thread nick humphrey

i get the same exact error messages. maybe its not reading/recognizing
the endorsed folder? this is blowing my mind...

2007/3/9, Andreas L Delmelle [EMAIL PROTECTED]:

On Mar 9, 2007, at 15:48, nick humphrey wrote:

Hi,

 thanks for the reply chris =)

 Try to ensure you are using the xerces and xalan versions shipped
 with FOP
 not exactly sure how one does this..

 you lost me here:
 Use the endorsed mechanism to override any other xerces/xalan
 versions that your JDK might be picking up.

 what is the endorsed mechanism? sorry for my ignorance, and thanks in
 advance for your help.

The endorsed standards mechanism is yet another way to force
overrides, global to your JVM, for the XML API implementations.

Look for the directory $JAVA_HOME$/lib/endorsed. (Create it if it
does not exist.)
Move all the Xalan/Xerces related JARs from your $FOP_HOME$/lib
directory there.

The JARs to be moved/copied are
serializer-2.7.0.jar
xalan-2.7.0.jar
xercesImpl-2.7.1.jar
xml-apis.jar

The next time you start your JVM, it uses the versions in the lib/
endorsed directory, instead of the ones on that are bundled with the
Java distribution.


HTH!

Andreas


-
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: border-top-xxx and border-bottom-xxx causing wierd errors

2007-03-12 Thread Jeremias Maerki
Can you please post a full FO file (no XSLT) that demonstrates the
problem?

On 09.03.2007 13:51:31 nick humphrey wrote:
 hi, i'm using ubuntu 6.10 edgy linux, jdk sun java version 1.5.0_08,
 and the latest fop-trunk from svn
 in my xslt i have the following line:
 ==code==
 fo:block-container position=absolute left=0mm top=0mm font-size=10pt
 border-left-color=red   
 border-left-style=solid
 border-left-width=1mm
 
 ==/code==
 
 when i run fop from the command line it works fine:
 ./fop -xml ~/in.xml -xsl ~/in.xslt -pdf ~/out.pdf
 
 but if i change that xml line to border-top-xxx or border-bottom-xxx
 (where xxx is color style or width) i get this following errors:
 =
 9/03/2007 13:29:59 org.apache.fop.apps.FOUserAgent setTargetResolution
 INFO: target-resolution set to: 72.0dpi (px2mm=0.3528)
 9/03/2007 13:30:01 org.apache.fop.fo.FOTreeBuilder$MainFOHandler endElement
 WARNING: Mismatch: page-sequence (http://www.w3.org/1999/XSL/Format)
 vs. root (http://www.w3.org/1999/XSL/Format)
 9/03/2007 13:30:01 org.apache.fop.fo.FOTreeBuilder fatalError
 SEVERE: javax.xml.transform.TransformerException:
 java.lang.IllegalStateException: lineWidth must be set and positive,
 but it is: -2834
 9/03/2007 13:30:01 org.apache.fop.cli.Main startFOP
 SEVERE: Exception
 javax.xml.transform.TransformerException:
 java.lang.IllegalStateException: lineWidth must be set and positive,
 but it is: -2834
 at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168)
 at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
 at org.apache.fop.cli.Main.startFOP(Main.java:166)
 at org.apache.fop.cli.Main.main(Main.java:197)
 
 -
 
 ; SystemID: file:///home/myself/in.xslt; Line#: 27; Column#: 57
 javax.xml.transform.TransformerException:
 java.lang.IllegalStateException: lineWidth must be set and positive,
 but it is: -2834
 at 
 org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2416)
 at 
 org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2281)
 at 
 org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1367)
 at 
 org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:709)
 at 
 org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1284)
 at 
 org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1262)
 at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165)
 at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
 at org.apache.fop.cli.Main.startFOP(Main.java:166)
 at org.apache.fop.cli.Main.main(Main.java:197)
 Caused by: java.lang.IllegalStateException: lineWidth must be set and
 positive, but it is: -2834
 at 
 org.apache.fop.layoutmgr.BreakingAlgorithm.getLineWidth(BreakingAlgorithm.java:1087)
 at 
 org.apache.fop.layoutmgr.PageBreakingAlgorithm.getLineWidth(PageBreakingAlgorithm.java:853)
 at 
 org.apache.fop.layoutmgr.PageBreakingAlgorithm.computeDifference(PageBreakingAlgorithm.java:367)
 at 
 org.apache.fop.layoutmgr.BreakingAlgorithm.considerLegalBreak(BreakingAlgorithm.java:696)
 at 
 org.apache.fop.layoutmgr.PageBreakingAlgorithm.considerLegalBreak(PageBreakingAlgorithm.java:309)
 at 
 org.apache.fop.layoutmgr.BreakingAlgorithm.findBreakingPoints(BreakingAlgorithm.java:485)
 at 
 org.apache.fop.layoutmgr.BreakingAlgorithm.findBreakingPoints(BreakingAlgorithm.java:403)
 at 
 org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:338)
 at 
 org.apache.fop.layoutmgr.BlockContainerLayoutManager.getNextKnuthElementsAbsolute(BlockContainerLayoutManager.java:506)
 at 
 org.apache.fop.layoutmgr.BlockContainerLayoutManager.getNextKnuthElements(BlockContainerLayoutManager.java:194)
 at 
 org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLayoutManager.java:106)
 at 
 org.apache.fop.layoutmgr.PageSequenceLayoutManager$PageBreaker.getNextKnuthElements(PageSequenceLayoutManager.java:272)
 at 
 org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockList(AbstractBreaker.java:554)
 at 
 org.apache.fop.layoutmgr.PageSequenceLayoutManager$PageBreaker.getNextBlockList(PageSequenceLayoutManager.java:264)
 at 
 org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:301)
 at 
 org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:263)
 at 
 org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:157)
 at 
 org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:385)
 at 
 org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:148)
 at 
 

suggest a filename to a generated pdf

2007-03-12 Thread Zmitko, Jan
Hi,

I try do suggest a filename to the generated pdf´s. However the PDF should be 
display automaticly this meand without some further action of the user. 

This HTTP Header Information works

response.setHeader(Content-Disposition, attachment; filename= + fileName);

and this does not works

response.setHeader(Content-Disposition, inline; filename= + fileName);

Is the comibination of the values inline and filename not possible?

Thanks for any Ideas,

Jan

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



Re: suggest a filename to a generated pdf

2007-03-12 Thread Adrian Cumiskey

Hi Jan,

I think maybe you might need to quote the value of your filename 
parameter ...



Try this :-

response.setHeader(Content-Disposition, attachment; filename=\ + 
fileName + \);



Adrian.

Zmitko, Jan wrote:

Hi,

I try do suggest a filename to the generated pdf´s. However the PDF should be display automaticly this meand without some further action of the user. 


This HTTP Header Information works

response.setHeader(Content-Disposition, attachment; filename= + fileName);

and this does not works

response.setHeader(Content-Disposition, inline; filename= + fileName);

Is the comibination of the values inline and filename not possible?

Thanks for any Ideas,

Jan

-
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: Now: Path-problem

2007-03-12 Thread Adrian Cumiskey

Hi Tom,

If all your FO files reside in the same place then place a font-base 
definition in your FOP configuration file.  If your FO files are located 
in different locations make a call to userAgent.setBaseURL(baseURL) 
before processing the FO file to set the base url used for resolving.


Adrian.

Thomas Zastrow wrote:

I'm very sorry, but I have another (little) problem ... ;-)

My Java-code to transform a FO-File into a PDF-file works fine now - 
with one exception: In the FO-File, there are relative links to external 
images in the art of:


src=url(images/graphic1.svg)

where the file graphic1.svg resists in a sub-directory images  where 
the FO-file resists ...


That produces the error:

SCHWERWIEGEND: Image not available: url(images/graphic1.svg)

When I change the relative-paths (images/graphic1.svg) to absolute 
paths, it works perfect again.



So, is there a possibility to say FOP that it should use relative paths 
when parsing the FO-file??


I now that I peeve you, please be patient :-)

Best,

Tom


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



AW: suggest a filename to a generated pdf

2007-03-12 Thread Zmitko, Jan
I´ve tried 

response.setHeader(Content-Disposition, inline; filename=\ + fileName + 
\); 

(not attachment for the undermentioned reasons) and the behavior is the same 
this means the filename is not set. In the case of attachment the filename is 
allways set (with and without escaping).






-Ursprüngliche Nachricht-
Von: Adrian Cumiskey [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 12. März 2007 10:26
An: fop-users@xmlgraphics.apache.org
Betreff: Re: suggest a filename to a generated pdf


Hi Jan,

I think maybe you might need to quote the value of your filename 
parameter ...


Try this :-

response.setHeader(Content-Disposition, attachment; filename=\ + 
fileName + \);


Adrian.

Zmitko, Jan wrote:
 Hi,
 
 I try do suggest a filename to the generated pdf´s. However the PDF should be 
 display automaticly this meand without some further action of the user. 
 
 This HTTP Header Information works
 
 response.setHeader(Content-Disposition, attachment; filename= + fileName);
 
 and this does not works
 
 response.setHeader(Content-Disposition, inline; filename= + fileName);
 
 Is the comibination of the values inline and filename not possible?
 
 Thanks for any Ideas,
 
 Jan
 
 -
 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: AW: suggest a filename to a generated pdf

2007-03-12 Thread Adrian Cumiskey

Maybe this can help you...

http://www.jguru.com/faq/view.jsp?EID=252010

Zmitko, Jan wrote:
I´ve tried 

response.setHeader(Content-Disposition, inline; filename=\ + fileName + \); 


(not attachment for the undermentioned reasons) and the behavior is the same 
this means the filename is not set. In the case of attachment the filename is 
allways set (with and without escaping).






-Ursprüngliche Nachricht-
Von: Adrian Cumiskey [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 12. März 2007 10:26
An: fop-users@xmlgraphics.apache.org
Betreff: Re: suggest a filename to a generated pdf


Hi Jan,

I think maybe you might need to quote the value of your filename 
parameter ...



Try this :-

response.setHeader(Content-Disposition, attachment; filename=\ + 
fileName + \);



Adrian.

Zmitko, Jan wrote:

Hi,

I try do suggest a filename to the generated pdf´s. However the PDF should be display automaticly this meand without some further action of the user. 


This HTTP Header Information works

response.setHeader(Content-Disposition, attachment; filename= + fileName);

and this does not works

response.setHeader(Content-Disposition, inline; filename= + fileName);

Is the comibination of the values inline and filename not possible?

Thanks for any Ideas,

Jan

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



Maybe

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



How could I change vertical alignment of list item bullet?

2007-03-12 Thread Andrejus Chaliapinas
Hi,

I'm trying to use FOP 0.93 and while using similar to this syntax:

fo:list-item-label end-indent=label-end()
fo:block
fo:inline font-family=Symbol
#x2022;
/fo:inline
/fo:block
/fo:list-item-label

I get very low vertical alignment of that bullet symbol (actually it's
almost below baseline of following list item text). I've tried to use
display-align=before (both for inline and block), but that didn't help. Is
there any other possibility?

Thanks in advance.
Andrejus


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



Re: How could I change vertical alignment of list item bullet?

2007-03-12 Thread Manuel Mall
On Monday 12 March 2007 20:27, Andrejus Chaliapinas wrote:
 Hi,

 I'm trying to use FOP 0.93 and while using similar to this syntax:

 fo:list-item-label end-indent=label-end()
 fo:block
 fo:inline font-family=Symbol
   #x2022;
 /fo:inline
 /fo:block
 /fo:list-item-label

 I get very low vertical alignment of that bullet symbol (actually
 it's almost below baseline of following list item text). I've tried
 to use display-align=before (both for inline and block), but that
 didn't help. Is there any other possibility?


I don't think display-align will work. Try alignment-baseline=middle 
or alignment-baseline=central or try an explicit baseline-shift=...

 Thanks in advance.
 Andrejus

Manuel

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



RE: How could I change vertical alignment of list item bullet?

2007-03-12 Thread Andrejus Chaliapinas
  Hi,
 
  I'm trying to use FOP 0.93 and while using similar to this syntax:
 
  fo:list-item-label end-indent=label-end()
  fo:block
  fo:inline font-family=Symbol
  #x2022;
  /fo:inline
  /fo:block
  /fo:list-item-label
 
  I get very low vertical alignment of that bullet symbol (actually
  it's almost below baseline of following list item text). I've tried
  to use display-align=before (both for inline and block), but that
  didn't help. Is there any other possibility?
 
 
 I don't think display-align will work. Try alignment-baseline=middle
 or alignment-baseline=central or try an explicit baseline-shift=...
 
  Thanks in advance.
  Andrejus
 
 Manuel

I've tried this:

fo:list-item-label end-indent=label-end()
  fo:block alignment-baseline=middle
fo:inline font-family=Symbol alignment-baseline=middle
  #x2022;
/fo:inline
  /fo:block
/fo:list-item-label

then this:

fo:list-item-label end-indent=label-end()
  fo:block alignment-baseline=central
fo:inline font-family=Symbol alignment-baseline=central
  #x2022;
/fo:inline
  /fo:block
/fo:list-item-label

then this:

fo:list-item-label end-indent=label-end()
  fo:block
fo:inline font-family=Symbol baseline-shift=super
  #x2022;
/fo:inline
  /fo:block
/fo:list-item-label

but my bullet symbol still stays at the same low vertical alignment
position.

The most interesting another fact for me - today's full checkout from trunk
and build over examples gets me wrong (i.e. very low vertical alignment)
bullets for list.pdf file and correct (at least in the vertical middle of
following text) for extensive.pdf. And I can't find what is the difference
in blocks properties.

Andrejus


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



Re: How could I change vertical alignment of list item bullet?

2007-03-12 Thread Manuel Mall
On Monday 12 March 2007 22:50, Andrejus Chaliapinas wrote:
  Hmm, can you post a short sample fo exhibiting the issue?
 
 
  Manuel

 Could you take a look at first page of \examples\fo\basic\list.fo
 file from trunk and at generated pdf (list text items with text here
 is text in the list item body)? If I get that incorrect situation
 there already - I think we should try to fix it in examples first.
 Should I post that file's content here?


Andrejus,

you are correct in that this looks certainly wrong.

Wonder in which release this problem was introduced.

Any way, this needs some checking / debugging.

Thanks for reporting the issue. Any chance of raising a BugZilla for 
this so we can track it?

 Andrejus


Manuel

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



RE: How could I change vertical alignment of list item bullet?

2007-03-12 Thread Andrejus Chaliapinas
 Andrejus,
 
 you are correct in that this looks certainly wrong.
 
 Wonder in which release this problem was introduced.
 
 Any way, this needs some checking / debugging.
 
 Thanks for reporting the issue. Any chance of raising a BugZilla for
 this so we can track it?

I'm not sure when - but I had that problem (sorry for not reporting earlier,
just thought it in process for v0.93 release) with checked out trunk and
compiled code since the middle of this January already.

Also, check this file (which I don't know was built with which version, but
looks correctly instead of last one from trunk):
http://www.w3.org/Style/XSL/TestSuite/contrib/FOP/list.pdf

I'll try to submit Bugzilla entry as well soon.

Hope someone could take a prompt look at that (hopefully not that hard to
patch) issue.

Andrejus


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



Re: How could I change vertical alignment of list item bullet?

2007-03-12 Thread Jeremias Maerki

On 12.03.2007 15:29:29 Manuel Mall wrote:
 On Monday 12 March 2007 22:50, Andrejus Chaliapinas wrote:
   Hmm, can you post a short sample fo exhibiting the issue?
  
  
   Manuel
 
  Could you take a look at first page of \examples\fo\basic\list.fo
  file from trunk and at generated pdf (list text items with text here
  is text in the list item body)? If I get that incorrect situation
  there already - I think we should try to fix it in examples first.
  Should I post that file's content here?
 
 
 Andrejus,
 
 you are correct in that this looks certainly wrong.
 
 Wonder in which release this problem was introduced.

I've just checked since I was curious. It's already in 0.90. Seems to
have to do with font metrics. Take a look at the Area Tree XML. The
label has a BPD of 18936 while the body has 14400. Symbol has an
ascender of 1010 while Helvetica has 718.

Smells like a need for implementing relative-align=baseline to me.

 Any way, this needs some checking / debugging.
 
 Thanks for reporting the issue. Any chance of raising a BugZilla for 
 this so we can track it?
 
  Andrejus
 
 
 Manuel


Jeremias Maerki


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



Performance issue XSL:FO

2007-03-12 Thread Thomas Yip
Hi,

I'm generating a PDF on the fly from my servlet. I use transformer to
do XSL:FO translation:

1 StringReader xmlStream = new StringReader(xmlWriter.toString());
2 Source src = new StreamSource(xmlStream);
3 Result res = new SAXResult(fop.getDefaultHandler());
4 transformer.transform(src, res);

However line#4 seems to be taking a lot of time to execute (around 40
seconds).

When I run it using the FOP command line (with the same XML content),
for instance:

 fop -xml myXml.xml -xsl myXsl.xsl -pdf outPDF.pdf

It takes only about 3 seconds.

- Can anybody tell me why it takes so much longer from my servlet?
- Is there a way to improve the performance when run it from my
servlet?

By the way, I use FOP version 0.93.
I'm running my servlet in an application server (BEA Weblogic 9.2
using jdk150_06).

Thanks for your help.
Thomas



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



Re: Performance issue XSL:FO

2007-03-12 Thread Abel Braaksma

Thomas Yip wrote:

4 transformer.transform(src, res);

However line#4 seems to be taking a lot of time to execute (around 40
seconds).


Thomas, good to see you here. But it would be much easier for us to help 
you if you at least answered my questions that I raised in the original 
thread on the xsl-list, especially to those that are a member of both 
lists (and many are). Also, if your statement seems to be is changed 
in is, add a little code snippet that on itself illustrates the problem.


And I like to repeat my experience with FOP 0.93 here: I use it from a 
servlet with no performance hit whatsoever, but both memory consuming of 
FOP and in-memory serialization of the HTTP output stream can be causing 
this. But first and foremost: add time logging statements to make sure 
your statement above holds.


Cheers,
-- Abel Braaksma

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



Problem with table margin-left property

2007-03-12 Thread Miroslav Pukhalsky

Hi there,

I have next code:
fo:table table-layout=fixed width=100% margin-left=10mm

But in PDF I got 20mm left margin instead 10mm! May be it something 
wrong? I use FOP 0.93.


Regards,

Miroslav.

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



Re: Problem with table margin-left property

2007-03-12 Thread Andreas L Delmelle

On Mar 12, 2007, at 17:40, Miroslav Pukhalsky wrote:


I have next code:
fo:table table-layout=fixed width=100% margin-left=10mm


Check the margin or indent on the parent (or ancestor) block.

Big chance that the problem is described here:
http://wiki.apache.org/xmlgraphics-fop/IndentInheritance


HTH!

Cheers,

Andreas

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



Re: Performance issue XSL:FO

2007-03-12 Thread Andreas L Delmelle

On Mar 12, 2007, at 16:52, Thomas Yip wrote:


1 StringReader xmlStream = new StringReader(xmlWriter.toString());
2 Source src = new StreamSource(xmlStream);
3 Result res = new SAXResult(fop.getDefaultHandler());
4 transformer.transform(src, res);

However line#4 seems to be taking a lot of time to execute (around 40
seconds).


If I judge correctly, then what's causing the slowdown might just be  
line #1, but it's only when the transform is initiated that it  
becomes apparent this is a Bad idea...


Where does the xmlWriter come from? What is its type? Try to find a  
more efficient way than first converting it in into a String and  
wrapping a StringReader around it.



Cheers,

Andreas


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



Re: Problem with table margin-left property

2007-03-12 Thread Miroslav Pukhalsky

Hi Andreas,

Andreas L Delmelle wrote:


Check the margin or indent on the parent (or ancestor) block.



Parent (or ancestor) block has no any indents.

But I tried resolve my in the another way:
xsl:template match=/
fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
font-family=sans-serif font-size=6pt
fo:layout-master-set
fo:simple-page-master master-name=main
page-width=210mm
page-height=297mm
margin-top=5mm
margin-bottom=5mm
margin-left=5mm
margin-right=5mm
fo:region-body /
/fo:simple-page-master
/fo:layout-master-set

fo:page-sequence master-reference=main
fo:flow flow-name=xsl-region-body
fo:block margin-left=10mm
fo:block font-size=120% font-weight=bold
TEXT
/fo:block

fo:table table-layout=fixed width=100%
!-- skip body --
/fo:table
/fo:block
/fo:flow
/fo:page-sequence
/fo:root
/xsl:template

And text from block has margin 10 mm but table has margin 20 mm.

Regards,
Miroslav

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



RE: Performance issue XSL:FO

2007-03-12 Thread Thomas Yip
Hi Abel,

Thank you for your reply. Sorry, I copied/pasted my last email sent to
the other mailing list and forgot to be more specific.

Yes, I did log the time as follow:

 long time1 = System.currentTimeMillis();
 transformer.transform(src, res);
 long time2 = System.currentTimeMillis();

And the difference between time2 and time1 is really about 40 seconds.
In command line, I redo the same test with the same XML and it takes
only 5 seconds.

I will try to increase the memory allocated to my apps server though
to see if there's a significant improvement and I'll let you know.

However, can the performance be affected if I have a XSL file that
includes many others XSL files when it is being used in a servlet, for
instance:

[...]
xsl:include href=../template1.xsl /
xsl:include href=template2.xsl/
xsl:include href=template3.xsl /
xsl:include href=template4.xsl /
xsl:include href=template5.xsl /

[...]

!-- Body --
fo:flow flow-name=xsl-region-body
  fo:block
xsl:call-template name=template1 / !--in template1.xsl--
xsl:call-template name=template2 / !--in template2.xsl--
xsl:call-template name=template3 / !--in template3.xsl--
xsl:call-template name=template4 / !--in template4.xsl--
xsl:call-template name=template5 / !--in template5.xsl--
  /fo:block
/fo:flow
[...]

Thanks again for your help,
Thomas

-Original Message-
From: Abel Braaksma [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 12, 2007 12:05 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Performance issue XSL:FO

Thomas Yip wrote:
 4 transformer.transform(src, res);

 However line#4 seems to be taking a lot of time to execute (around
40
 seconds).

Thomas, good to see you here. But it would be much easier for us to
help 
you if you at least answered my questions that I raised in the
original 
thread on the xsl-list, especially to those that are a member of both 
lists (and many are). Also, if your statement seems to be is changed

in is, add a little code snippet that on itself illustrates the
problem.

And I like to repeat my experience with FOP 0.93 here: I use it from a

servlet with no performance hit whatsoever, but both memory consuming
of 
FOP and in-memory serialization of the HTTP output stream can be
causing 
this. But first and foremost: add time logging statements to make sure

your statement above holds.

Cheers,
-- Abel Braaksma

-
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: Problem with table margin-left property

2007-03-12 Thread Andreas L Delmelle

On Mar 12, 2007, at 18:25, Miroslav Pukhalsky wrote:

Hi Miroslav,


Andreas L Delmelle wrote:

Check the margin or indent on the parent (or ancestor) block.


Parent (or ancestor) block has no any indents.

But I tried resolve my in the another way:

snip /

fo:block margin-left=10mm
fo:block font-size=120% font-weight=bold
TEXT
/fo:block

fo:table table-layout=fixed width=100%
!-- skip body --
/fo:table
/fo:block

snip /


And text from block has margin 10 mm but table has margin 20 mm.


The indent-computation on that block seems to be correct, as it  
inherits the 10mm specified on the parent block.


The fact that the table is offset by double that amount, seems to be  
a bug, though...


I'm going to have a closer look at this as soon as I find the time.



Andreas


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



Re: Performance issue XSL:FO

2007-03-12 Thread Andreas L Delmelle

On Mar 12, 2007, at 18:43, Thomas Yip wrote:

Hi again,


Yes, I did log the time as follow:


long time1 = System.currentTimeMillis();
transformer.transform(src, res);
long time2 = System.currentTimeMillis();


And the difference between time2 and time1 is really about 40 seconds.
In command line, I redo the same test with the same XML and it takes
only 5 seconds.

I will try to increase the memory allocated to my apps server though
to see if there's a significant improvement and I'll let you know.

However, can the performance be affected if I have a XSL file that
includes many others XSL files when it is being used in a servlet, for
instance:


See my previous reply. I think the problem is not in the XSLT stage,  
but actually happens before that.


Firstly, xmlWriter.toString() probably involves conversion/encoding  
from bytes to characters. If the XML is large, then this also  
consumes a significant amount of memory, as it will allocate a  
backing char[] that is as long as the XML string. If you'd try this  
with a 50MB XML-file in a servlet environment with a relatively small  
amount of memory if calculated 'per user/process', then you're  
already bound to run into trouble...


Then a StringReader is constructed around it. This is not very costly  
(yet!).


Subsequently, you feed this StringReader into the constructor of a  
StreamSource. If you look in the Javadocs of that particular  
constructor, notice the remark that its use is actually discouraged.


Finally, the transform is initiated, and I fear that behind the  
scenes, there is absolutely no buffering done in the StringReader, so  
your XML-string gets read back in /one/ character at a time...


Conclusion: if you can, in any way, avoid the StringReader and  
construct the StreamSource using an InputStream, preferably  
BufferedInputStream, that should speed things up considerably IIC...



HTH!

Cheers,

Andreas


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



Re: Now: Path-problem

2007-03-12 Thread Thomas Zastrow

Adrian Cumiskey schrieb:

Hi Tom,

If all your FO files reside in the same place then place a font-base 
definition in your FOP configuration file.  If your FO files are 
located in different locations make a call to 
userAgent.setBaseURL(baseURL) before processing the FO file to set the 
base url used for resolving.




Adrian and Andreas,

thanx for your help, after playing around with ca. 10 variations of 
path-names, I got it! It works! Im lucky!


Best,

Tom





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



Re: Performance issue XSL:FO

2007-03-12 Thread Abel Braaksma

Thomas Yip wrote:

[...]
xsl:include href=../template1.xsl /
xsl:include href=template2.xsl/
xsl:include href=template3.xsl /
xsl:include href=template4.xsl /
xsl:include href=template5.xsl /

[...]

!-- Body --
fo:flow flow-name=xsl-region-body
  fo:block
xsl:call-template name=template1 / !--in template1.xsl--
xsl:call-template name=template2 / !--in template2.xsl--
xsl:call-template name=template3 / !--in template3.xsl--
xsl:call-template name=template4 / !--in template4.xsl--
xsl:call-template name=template5 / !--in template5.xsl--
  /fo:block
/fo:flow
[...]


Now it is XSLT, not XSL-FO. I thought the XSL-FO process was causing the 
trouble (see your own OP).


I don't see why this (including many stylesheets) would cause you 
problems with running XSLT.


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



Re: border-top-xxx and border-bottom-xxx causing wierd errors

2007-03-12 Thread nick humphrey

see attached file...
i echo the java_home variable in the fop script and it is using the
correct java version, to where i also made the endorsed directory
($JAVA_HOME/lib), but like i said, still the same errors. when i run
fop with just the fo and pdf statements:
./fop XXX.fo XXX.pdf

then some errors aren't present/repeated (like when i run with -xml
-xsl -pdf parameters), i only get this:

12/03/2007 10:17:32 org.apache.fop.apps.FOUserAgent setTargetResolution
INFO: target-resolution set to: 72.0dpi (px2mm=0.3528)
12/03/2007 10:17:34 org.apache.fop.cli.Main startFOP
SEVERE: Exception
java.lang.IllegalStateException: lineWidth must be set and positive,
but it is: -2834
   at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168)
   at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
   at org.apache.fop.cli.Main.startFOP(Main.java:166)
   at org.apache.fop.cli.Main.main(Main.java:197)

-

java.lang.IllegalStateException: lineWidth must be set and positive,
but it is: -2834
   at 
org.apache.fop.layoutmgr.BreakingAlgorithm.getLineWidth(BreakingAlgorithm.java:1087)
   at 
org.apache.fop.layoutmgr.PageBreakingAlgorithm.getLineWidth(PageBreakingAlgorithm.java:853)
   at 
org.apache.fop.layoutmgr.PageBreakingAlgorithm.computeDifference(PageBreakingAlgorithm.java:367)
   at 
org.apache.fop.layoutmgr.BreakingAlgorithm.considerLegalBreak(BreakingAlgorithm.java:696)
   at 
org.apache.fop.layoutmgr.PageBreakingAlgorithm.considerLegalBreak(PageBreakingAlgorithm.java:309)
   at 
org.apache.fop.layoutmgr.BreakingAlgorithm.findBreakingPoints(BreakingAlgorithm.java:485)
   at 
org.apache.fop.layoutmgr.BreakingAlgorithm.findBreakingPoints(BreakingAlgorithm.java:403)
   at 
org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:338)
   at 
org.apache.fop.layoutmgr.BlockContainerLayoutManager.getNextKnuthElementsAbsolute(BlockContainerLayoutManager.java:506)
   at 
org.apache.fop.layoutmgr.BlockContainerLayoutManager.getNextKnuthElements(BlockContainerLayoutManager.java:194)
   at 
org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLayoutManager.java:106)
   at 
org.apache.fop.layoutmgr.PageSequenceLayoutManager$PageBreaker.getNextKnuthElements(PageSequenceLayoutManager.java:272)
   at 
org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockList(AbstractBreaker.java:554)
   at 
org.apache.fop.layoutmgr.PageSequenceLayoutManager$PageBreaker.getNextBlockList(PageSequenceLayoutManager.java:264)
   at 
org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:301)
   at 
org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:263)
   at 
org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:157)
   at 
org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:385)
   at 
org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:148)
   at 
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:378)
   at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:194)
   at 
org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1101)
   at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
Source)
   at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
Source)
   at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
   at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
   at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
   at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
   at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
   at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
   at 
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
   at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165)
   at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
   at org.apache.fop.cli.Main.startFOP(Main.java:166)
   at org.apache.fop.cli.Main.main(Main.java:197)
=


would really like to get this working so i don't have to use jasperreports...

Nick


2007/3/12, Jeremias Maerki [EMAIL PROTECTED]:

Can you please post a full FO file (no XSLT) that demonstrates the
problem?

On 09.03.2007 13:51:31 nick humphrey wrote:
 hi, i'm using ubuntu 6.10 edgy linux, jdk sun java version 1.5.0_08,
 and the latest fop-trunk from svn
 in my xslt i have the following line:
 ==code==
 fo:block-container position=absolute left=0mm top=0mm font-size=10pt
 border-left-color=red
 border-left-style=solid
 border-left-width=1mm
 
 ==/code==

 when i run fop 

Re: Typo in AbstractRenderer :: renderBlockViewPort

2007-03-12 Thread Andreas L Delmelle

On Mar 9, 2007, at 16:29, Paul Vinkenoog wrote:

Hi Paul,

Just a little FYI: I (finally) got around to committing your  
suggested correction to the trunk.





Ultimately, the quality of FOP depends greatly upon users like
yourself, who are not afraid to take a stroll through the code,


The reason I looked at the code at all was that I wanted to
re-implement the full internal link behaviour (landing on the exact
spot, that is). I've got it working now, need to iron out a few
wrinkles and then I'll bring it up on fop-dev. I hope it's usable for
the project too.


Thanks in advance! We're awaiting your patch proposal. ;)


Cheers,

Andreas

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



A minor question

2007-03-12 Thread Thomas Zastrow

Hello,

my Java-program works fine in the meantime :-)

When I transform something with FOP, on the commandline there are 
warnings and so on like this:


12.03.2007 21:39:56 org.apache.fop.apps.FOUserAgent setTargetResolution
INFO: target-resolution set to: 72.0dpi (px2mm=0.3528)
12.03.2007 21:39:57 org.apache.fop.fo.FONode attributeWarning
WARNUNG: Warning(Unknown location): fo:table, table-layout=auto is 
currently not supported by FOP

Generated 10 pages in total.

Is it possible to put this messages into a variable, so that I can 
access them from my Java-program? I just want to display them in a 
Swing-component.


Thanx,

Tom


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



Re: Performance issue XSL:FO

2007-03-12 Thread Jeremias Maerki
On 12.03.2007 19:59:26 Abel Braaksma wrote:
 Thomas Yip wrote:
  [...]
  xsl:include href=../template1.xsl /
  xsl:include href=template2.xsl/
  xsl:include href=template3.xsl /
  xsl:include href=template4.xsl /
  xsl:include href=template5.xsl /
 
  [...]
 
  !-- Body --
  fo:flow flow-name=xsl-region-body
fo:block
  xsl:call-template name=template1 / !--in template1.xsl--
  xsl:call-template name=template2 / !--in template2.xsl--
  xsl:call-template name=template3 / !--in template3.xsl--
  xsl:call-template name=template4 / !--in template4.xsl--
  xsl:call-template name=template5 / !--in template5.xsl--
/fo:block
  /fo:flow
  [...]
 
 Now it is XSLT, not XSL-FO. I thought the XSL-FO process was causing the 
 trouble (see your own OP).
 
 I don't see why this (including many stylesheets) would cause you 
 problems with running XSLT.

I agree. Actually, the whole thing should be faster in a servlet since
you don't have the VM warmup time. Plus in a servlet you can make sure
you reuse the TransformerFactory and the FopFactory and finally reusing
the JAXP Templates object representing the stylesheet could also help
optimizing as the stylesheet wouldn't have to be parsed each time.

Anyway, if the command-line is that much faster than inside the servlet
the problem must be somewhere else: Either to little memory and the VM
is constantly garbage collecting or some other thing (maybe like Andreas
indicated) is wrong. I'd try to divide all the steps and measure them
separately to find the culprit.

Jeremias Maerki


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



root must be root element

2007-03-12 Thread Pardha Paruchuri
All,
   
  we are getting below error message while trying to run FOP 0.20.5 servlet. 
   
  javax.xml.transform.TransformerException: org.apache.fop.apps.FOPException: 
root must be root element
 at 
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:725)
 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)
 at 
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:668)
 at 
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1129)
 at 
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1107)

   
  The same code was running fine until yesterday. Could you someone help me 
what could be causing this issue. I tried running the FOP from command prompt 
just to see if it produces the same error but it ran fine so the problem is in 
running as a servlet. 
   
  Thanks
  Pardha

 
-
We won't tell. Get more on shows you hate to love
(and love to hate): Yahoo! TV's Guilty Pleasures list.

RE: root must be root element

2007-03-12 Thread Jennifer Fletcher
Hi Pardha,
 
You may have a memory issue. Can you give more memory to FOP servlet?
Also, is there plenty of disk space in the write directory?
 
If stopping/restarting the servlet with more memory doesn't work, I
suggest we open a SR with Oracle.
 
+Jennifer
 
 
-Original Message-
From: Pardha Paruchuri [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 12, 2007 2:28 PM
To: fop-users@xmlgraphics.apache.org
Subject: root must be root element
 
All,
 
we are getting below error message while trying to run FOP 0.20.5
servlet. 
 
javax.xml.transform.TransformerException:
org.apache.fop.apps.FOPException: root must be root element
at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.j
ava:725)
at
org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(Ele
mApplyTemplates.java:425)
at
org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates
.java:216)
at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Trans
formerImpl.java:2339)
at
org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(Transfo
rmerImpl.java:2160)
at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerIm
pl.java:1213)
at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.j
ava:668)
at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.j
ava:1129)
at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.j
ava:1107)
 
The same code was running fine until yesterday. Could you someone help
me what could be causing this issue. I tried running the FOP from
command prompt just to see if it produces the same error but it ran fine
so the problem is in running as a servlet. 
 
Thanks
Pardha
  
  _  

We won't tell. Get more on shows
http://us.rd.yahoo.com/evt=49980/*http:/tv.yahoo.com/collections/265%0d
%0a  you hate to love
(and love to hate): Yahoo!
http://us.rd.yahoo.com/evt=49980/*http:/tv.yahoo.com/collections/265%0d
%0a  TV's Guilty Pleasures list.


R: A minor question

2007-03-12 Thread Jeff Vannest
 Is it possible to put this messages into a variable, so that I can 
 access them from my Java-program?

Search for redirect standard out java in Google.

For example: http://www.jcreator.com/forums/index.php?showtopic=773

Jeff




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



Re: border-top-xxx and border-bottom-xxx causing wierd errors

2007-03-12 Thread Jeremias Maerki
Thanks for the test file. I was able to reproduce and fix the bug. It is
fixed in FOP Trunk:
http://svn.apache.org/viewvc?view=revrev=517415

If you can't use FOP Trunk you can work around the problem by
explicitely setting the height or block-progression-dimension property
on the block-container.

On 12.03.2007 20:43:05 nick humphrey wrote:
 see attached file...
 i echo the java_home variable in the fop script and it is using the
 correct java version, to where i also made the endorsed directory
 ($JAVA_HOME/lib), but like i said, still the same errors. when i run
 fop with just the fo and pdf statements:
 ./fop XXX.fo XXX.pdf
 
 then some errors aren't present/repeated (like when i run with -xml
 -xsl -pdf parameters), i only get this:
 
 12/03/2007 10:17:32 org.apache.fop.apps.FOUserAgent setTargetResolution
 INFO: target-resolution set to: 72.0dpi (px2mm=0.3528)
 12/03/2007 10:17:34 org.apache.fop.cli.Main startFOP
 SEVERE: Exception
 java.lang.IllegalStateException: lineWidth must be set and positive,
 but it is: -2834
snip/
 java.lang.IllegalStateException: lineWidth must be set and positive,
 but it is: -2834
 at 
 org.apache.fop.layoutmgr.BreakingAlgorithm.getLineWidth(BreakingAlgorithm.java:1087)
snip/
 =
 
 
 would really like to get this working so i don't have to use jasperreports...

:-)

snip/


Jeremias Maerki


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



out.flush()

2007-03-12 Thread Jeff Vannest
Will someone add out.flush() to the embedding example on the FOP
website...for example, at
http://xmlgraphics.apache.org/fop/0.93/embedding.html?

It seems a shame that everyone embedding FOP learns to flush() by trial and
error.

Thanks!
Jeff




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



Re: Problem with table margin-left property

2007-03-12 Thread Jeremias Maerki

On 12.03.2007 18:50:32 Andreas L Delmelle wrote:
 On Mar 12, 2007, at 18:25, Miroslav Pukhalsky wrote:
 
 Hi Miroslav,
 
  Andreas L Delmelle wrote:
  Check the margin or indent on the parent (or ancestor) block.
 
  Parent (or ancestor) block has no any indents.
 
  But I tried resolve my in the another way:
 snip /
  fo:block margin-left=10mm
  fo:block font-size=120% font-weight=bold
  TEXT
  /fo:block
 
  fo:table table-layout=fixed width=100%
  !-- skip body --
  /fo:table
  /fo:block
 snip /
 
  And text from block has margin 10 mm but table has margin 20 mm.
 
 The indent-computation on that block seems to be correct, as it  
 inherits the 10mm specified on the parent block.
 
 The fact that the table is offset by double that amount, seems to be  
 a bug, though...

No bug. Miroslav, please set start-indent=0pt and end-indent=0pt on
the table-body. That should get it right. Note, this is a weirdness of
the FO spec, not in FOP (all described in the Wiki).

If you want the behaviour you'd expect (without the above work-around)
but can live with the fact that you're activating non-compliant
behaviour you can enable the break-indent-inheritance setting to true
in the configuration.

 I'm going to have a closer look at this as soon as I find the time.

No need. :-)


Jeremias Maerki


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



Re: FOP 0.93: NullPointerException

2007-03-12 Thread Jeremias Maerki
You seem to be using custom fonts, so it is difficult for me to
reproduce the problem. In my own tests, everything worked fine. I
suspect you are using a font which has a special encoding that is not
handled properly by FOP. Are you using Type 1 fonts or TrueType fonts?
Given that the error happens in SingleByteFont I assume Type 1. In that
case, try the TrueType equivalents if you can get them. Otherwise,
please post one of the XML font metric files you generated for your
fonts.

On 12.03.2007 21:02:04 Jeff Powanda wrote:
 I'm using xsltproc.exe and FOP 0.93 to try to convert DocBook 4 (version
 1.72) to PDF output. I keep getting this NullPointerException. From
 other messages posted here, I assumed it had to do with an older version
 of Xalan included with JRE 1.5, but I've placed the FOP 0.93 JAR files
 into the JRE\lib\endorsed folder and that hasn't fixed the problem.
 Anyone have any idea what's wrong. I've attached the FO file I'm using.
 
  
 
 SEVERE: Exception
 
 java.lang.NullPointerException
 
   at
 org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168)
 
   at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
 
   at org.apache.fop.cli.Main.startFOP(Main.java:160)
 
   at org.apache.fop.cli.Main.main(Main.java:191)
 
  
 
 -
 
  
 
 java.lang.NullPointerException
 
   at
 org.apache.fop.fonts.SingleByteFont.hasChar(SingleByteFont.java:103)
 
   at org.apache.fop.fonts.LazyFont.hasChar(LazyFont.java:166)
 
   at org.apache.fop.fonts.Font.hasChar(Font.java:189)
 
   at org.apache.fop.fonts.Font.getCharWidth(Font.java:231)
snip/


Jeremias Maerki


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



Re: A minor question

2007-03-12 Thread Jeremias Maerki

On 12.03.2007 21:46:24 Thomas Zastrow wrote:
 Hello,
 
 my Java-program works fine in the meantime :-)
 
 When I transform something with FOP, on the commandline there are 
 warnings and so on like this:
 
 12.03.2007 21:39:56 org.apache.fop.apps.FOUserAgent setTargetResolution
 INFO: target-resolution set to: 72.0dpi (px2mm=0.3528)
 12.03.2007 21:39:57 org.apache.fop.fo.FONode attributeWarning
 WARNUNG: Warning(Unknown location): fo:table, table-layout=auto is 
 currently not supported by FOP
 Generated 10 pages in total.
 
 Is it possible to put this messages into a variable, so that I can 
 access them from my Java-program? I just want to display them in a 
 Swing-component.

It's not possible the way I'd want it, yet. But you can write your own
backend for Apache Jakarta Commons Logging to get at the messages. FOP
currently uses JCL for all its logging, so you can configure it the way
you want. Please consult the documentation for JCL here:
http://jakarta.apache.org/commons/logging/
http://jakarta.apache.org/commons/logging/commons-logging-1.1/guide.html#Extending_Commons_Logging

Jeremias Maerki


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



RE: root must be root element

2007-03-12 Thread Pardha Paruchuri
Jennifer,
   
  I just tried restarting the servlet and that solved the issue. It may not be 
a memory issue as it is a small document. I will keep looking into log files 
and let you know if I find anything specific.
   
  Thanks,
  Pardha

Jennifer Fletcher [EMAIL PROTECTED] wrote:


v\:* {behavior:url(#default#VML);}  o\:* {behavior:url(#default#VML);}  
w\:* {behavior:url(#default#VML);}  .shape {behavior:url(#default#VML);}
Hi Pardha,
   
  You may have a memory issue. Can you give more memory to FOP servlet?
  Also, is there plenty of disk space in the write directory?
   
  If stopping/restarting the servlet with more memory doesn’t work, I suggest 
we open a SR with Oracle.
   
  +Jennifer
   
   
  -Original Message-
From: Pardha Paruchuri [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 12, 2007 2:28 PM
To: fop-users@xmlgraphics.apache.org
Subject: root must be root element
   
All,

 

we are getting below error message while trying to run FOP 0.20.5 servlet. 

 

javax.xml.transform.TransformerException: org.apache.fop.apps.FOPException: 
root must be root element
at 
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:725)
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)
at 
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:668)
at 
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1129)
at 
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1107)

 

The same code was running fine until yesterday. Could you someone help me 
what could be causing this issue. I tried running the FOP from command prompt 
just to see if it produces the same error but it ran fine so the problem is in 
running as a servlet. 

 

Thanks

Pardha



-
  
  We won't tell. Get more on shows you hate to love
(and love to hate): Yahoo! TV's Guilty Pleasures list.



 
-
8:00? 8:25? 8:40?  Find a flick in no time
 with theYahoo! Search movie showtime shortcut.

Re: out.flush()

2007-03-12 Thread Jeremias Maerki
That's the first time I head someone mention that. Why do you think this
is necessary? The example uses a try..finally calling out.close() in the
finally section. This normally causes an implicit flush() (at least for
all implementations of OutputStream I know and which do actually
implement flush()). So I see no need for an explicit flush(). Could you
please state which OutputStream implementation are used in your code?

On 12.03.2007 22:52:30 Jeff Vannest wrote:
 Will someone add out.flush() to the embedding example on the FOP
 website...for example, at
 http://xmlgraphics.apache.org/fop/0.93/embedding.html?
 
 It seems a shame that everyone embedding FOP learns to flush() by trial and
 error.
 
 Thanks!
 Jeff


Jeremias Maerki


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



Re: root must be root element

2007-03-12 Thread Jeremias Maerki
Did you miss the namespace declaration for the FO namespace? Or are you
using a non-namespace-aware XML parser?

On 12.03.2007 22:27:44 Pardha Paruchuri wrote:
 All,

   we are getting below error message while trying to run FOP 0.20.5 servlet. 

   javax.xml.transform.TransformerException: org.apache.fop.apps.FOPException: 
 root must be root element
  at 
 org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:725)
  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)
  at 
 org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:668)
  at 
 org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1129)
  at 
 org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1107)
 

The same code was running fine until yesterday. Could you someone
 help me what could be causing this issue. I tried running the FOP from
 command prompt just to see if it produces the same error but it ran
 fine so the problem is in running as a servlet. 

Jeremias Maerki


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



Re: border-top-xxx and border-bottom-xxx causing wierd errors

2007-03-12 Thread nick humphrey

thanks a bigillion Jeremias! i'll download the trunk tomorrow and test
it out... i'm so happy that it was a bug and that i wasn't crazy
=)

2007/3/12, Jeremias Maerki [EMAIL PROTECTED]:

Thanks for the test file. I was able to reproduce and fix the bug. It is
fixed in FOP Trunk:
http://svn.apache.org/viewvc?view=revrev=517415

If you can't use FOP Trunk you can work around the problem by
explicitely setting the height or block-progression-dimension property
on the block-container.

On 12.03.2007 20:43:05 nick humphrey wrote:
 see attached file...
 i echo the java_home variable in the fop script and it is using the
 correct java version, to where i also made the endorsed directory
 ($JAVA_HOME/lib), but like i said, still the same errors. when i run
 fop with just the fo and pdf statements:
 ./fop XXX.fo XXX.pdf

 then some errors aren't present/repeated (like when i run with -xml
 -xsl -pdf parameters), i only get this:
 
 12/03/2007 10:17:32 org.apache.fop.apps.FOUserAgent setTargetResolution
 INFO: target-resolution set to: 72.0dpi (px2mm=0.3528)
 12/03/2007 10:17:34 org.apache.fop.cli.Main startFOP
 SEVERE: Exception
 java.lang.IllegalStateException: lineWidth must be set and positive,
 but it is: -2834
snip/
 java.lang.IllegalStateException: lineWidth must be set and positive,
 but it is: -2834
 at 
org.apache.fop.layoutmgr.BreakingAlgorithm.getLineWidth(BreakingAlgorithm.java:1087)
snip/
 =


 would really like to get this working so i don't have to use jasperreports...

:-)

snip/


Jeremias Maerki


-
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: root must be root element

2007-03-12 Thread Pardha Paruchuri
Thanks for the reply.
   
  Restarting the servlet solved the issue. Dont know what caused the issue, I 
could not find any other error in the log file.

Jeremias Maerki [EMAIL PROTECTED] wrote:
  Did you miss the namespace declaration for the FO namespace? Or are you
using a non-namespace-aware XML parser?

On 12.03.2007 22:27:44 Pardha Paruchuri wrote:
 All,
 
 we are getting below error message while trying to run FOP 0.20.5 servlet. 
 
 javax.xml.transform.TransformerException: org.apache.fop.apps.FOPException: 
 root must be root element
 at 
 org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:725)
 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)
 at 
 org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:668)
 at 
 org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1129)
 at 
 org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1107)
 
 
 The same code was running fine until yesterday. Could you someone
 help me what could be causing this issue. I tried running the FOP from
 command prompt just to see if it produces the same error but it ran
 fine so the problem is in running as a servlet. 

Jeremias Maerki


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



 
-
Looking for earth-friendly autos? 
 Browse Top Cars by Green Rating at Yahoo! Autos' Green Center.  

Re: FOP 0.93: NullPointerException

2007-03-12 Thread Abel Braaksma

Jeff Powanda wrote:


I’m using xsltproc.exe and FOP 0.93 to try to convert DocBook 4 
(version 1.72) to PDF output. I keep getting this 
NullPointerException. From other messages posted here, I assumed it 
had to do with an older version of Xalan included with JRE 1.5, but 
I’ve placed the FOP 0.93 JAR files into the JRE\lib\endorsed folder 
and that hasn’t fixed the problem. Anyone have any idea what’s wrong. 
I’ve attached the FO file I’m using.


SEVERE: Exception

java.lang.NullPointerException



This won't really help, but I receive the same NPE when running the 
example. In addition, Oxygen found an error in one of your first 
fo:blocks (Invalid Content error), or it was the validator, not sure. I 
couldn't really check because my Eclipse and even my whole system got 
blocked for about 2 min when I tried loading your file (never 
experienced that before with an FO file or Eclipse/Java in general:S.


Can you reproduce the same error with the smallest example file possible 
and post it here (say 2k instead of 160k?), so it becomes easier to 
check the NPE?


-- Abel

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



Re: out.flush()

2007-03-12 Thread Jeff Vannest
Closing the buffered out without flushing causes the PDF file to be closed
before all data is written to it. Originally when I started working with the
embedded FOP I had this problem...adding the flush got rid of the problem
completely.

Another user had the same problem and reported it on 3/6/07 in a message
titled, FOP 0.93 generated a damaged PDF File. Liam responded on 3/7/07 to
do a flush before the close.

According to
http://java.sun.com/j2se/1.4.2/docs/api/java/io/FilterOutputStream.html#clos
e(), the flush() should be implicit, which agrees with your response.

On a possibly related note, I only experienced the problem within the
context of my servlet, never on my local system, so I'm not ruling out a
java bug.

Jeff




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



font-weight: bolder

2007-03-12 Thread Daniel Noll

Hi all.

Is there a particular reason why when I have a font-weight=bolder, it 
doesn't actually make the text any bolder?


font-weight=bold works as one would expect.

Daniel Noll

Nuix Pty Ltd
Suite 79, 89 Jones St, Ultimo NSW 2007, AustraliaPh: +61 2 9280 0699
Web: http://nuix.com/   Fax: +61 2 9212 6902

This message is intended only for the named recipient. If you are not
the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
message or attachment is strictly prohibited.


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



RE: How could I change vertical alignment of list item bullet?

2007-03-12 Thread Andrejus Chaliapinas
Hi Jeremias,

 
 I've just checked since I was curious. It's already in 0.90. Seems to
 have to do with font metrics. Take a look at the Area Tree XML. The
 label has a BPD of 18936 while the body has 14400. Symbol has an
 ascender of 1010 while Helvetica has 718.
 
 Smells like a need for implementing relative-align=baseline to me.
 
 
 
 Jeremias Maerki

Would it be hard to fix? Should I try that myself (hmm, not so easy) or
someone else could take a look on that?

Thank you,
Andrejus


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



Re: FOP 0.93: NullPointerException

2007-03-12 Thread Jeremias Maerki
Alright, that's easy: Just don't register your own Symbol font and just
use the implicit Symbol font that's in the Base 14 font set and
everything should work.

On 13.03.2007 00:40:25 Jeff Powanda wrote:
 Yes, I'm using Type 1 fonts. I've attached a ZIP file containing the
 AFM, PFM, and XML files for the Symbol (Type 1) font.
 
 I used org.apache.fop.fonts.apps.PFMReader to generate the XML file from
 the PFM file. Here's the command I used to do that:
 
 java -cp
 ..\..\fop093\lib\commons-io-1.1.jar;..\..\fop093\build\fop.jar;..\..\fo
 p093\lib\xercesImpl.jar;..\..\fop093\lib\xalan.jar;..\..\fop093\lib\comm
 ons-logging-1.0.4.jar org.apache.fop.fonts.apps.PFMReader
 PFM/SY__.PFM output/SY__.xml
 
 Regards,
 Jeff Powanda
 Vocera Communications
 Senior Technical Writer
 408-790-4256
  
 
 -Original Message-
 From: Jeremias Maerki [mailto:[EMAIL PROTECTED] 
 Sent: Monday, March 12, 2007 3:12 PM
 To: fop-users@xmlgraphics.apache.org
 Subject: Re: FOP 0.93: NullPointerException
 
 You seem to be using custom fonts, so it is difficult for me to
 reproduce the problem. In my own tests, everything worked fine. I
 suspect you are using a font which has a special encoding that is not
 handled properly by FOP. Are you using Type 1 fonts or TrueType fonts?
 Given that the error happens in SingleByteFont I assume Type 1. In that
 case, try the TrueType equivalents if you can get them. Otherwise,
 please post one of the XML font metric files you generated for your
 fonts.
 
 On 12.03.2007 21:02:04 Jeff Powanda wrote:
  I'm using xsltproc.exe and FOP 0.93 to try to convert DocBook 4
 (version
  1.72) to PDF output. I keep getting this NullPointerException. From
  other messages posted here, I assumed it had to do with an older
 version
  of Xalan included with JRE 1.5, but I've placed the FOP 0.93 JAR files
  into the JRE\lib\endorsed folder and that hasn't fixed the problem.
  Anyone have any idea what's wrong. I've attached the FO file I'm
 using.
  
   
  
  SEVERE: Exception
  
  java.lang.NullPointerException
  
at
  org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168)
  
at
 org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
  
at org.apache.fop.cli.Main.startFOP(Main.java:160)
  
at org.apache.fop.cli.Main.main(Main.java:191)
  
   
  
  -
  
   
  
  java.lang.NullPointerException
  
at
  org.apache.fop.fonts.SingleByteFont.hasChar(SingleByteFont.java:103)
  
at org.apache.fop.fonts.LazyFont.hasChar(LazyFont.java:166)
  
at org.apache.fop.fonts.Font.hasChar(Font.java:189)
  
at org.apache.fop.fonts.Font.getCharWidth(Font.java:231)
 snip/
 
 
 Jeremias Maerki


Jeremias Maerki


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