Re: [POLL] Your experience with FOP 0.90alpha1 so far???

2005-12-08 Thread Roland Neilands

Jeremias,

7. It seems to have the old bug of leaving zero sized files around after 
errors


Cheers,
Roland

Roland Neilands wrote:


Jeremias,

I haven't test it thoroughly yet, but you asked, so but here's what 
I've seen:


1. Images are not scaled & overrun block-container height & width. The 
images seem washed-out & pixelated (gif). This is a stopper, I was 
hoping it would work better than 20.5.
position="absolute">

   
 src="file:images/{$logo}" scaling="uniform"/>

 

2. I had to move region-before after region-body in the 
simple-page-master. This makes no sense ;), but I assume this is from 
the spec. Not a problem.


3. NB. Had to replace  with 



4. No line numbers on errors anymore? This was very useful for 
debugging stylesheets.


5. There seems to be extra space inserted between lines now. This 
breaks existing stylesheets static-content layout - is there some 
default attribute I can turn off for this? (space-before, padding?)


6. PCL - no chance of at least keeping the old renderer?

FWIW: I know these are mostly my compliance issues, but a FAQ on these 
kind of differences would help greatly.


Cheers,
Roland

Jeremias Maerki wrote:


Dear users of Apache FOP,

version 0.90alpha1 is now two weeks old. In this time we've already
received a number of bug reports and even some patches. Thanks to
those involved and to everybody who has sent us feedback on the new
version so far.

Still, it's been a little quiet for my taste. :-) So, I'd like to ask
everybody who has tried 0.90alpha1 (or the latest FOP Trunk) so far to
tell us his/her first impression of the new code. Is it crap beyond what
is thought possible? *g* If there are problems, what are they (except
those we already documented, of course)? Or could it even be that you've
already rendered a few non-trivial documents and it didn't even look
that bad? We'd really appreciate some more feedback.

If there are people who would like to contribute more than bug reports
and feedback, but don't know how, please speak up. We can always use
additional help and will be glad to get you on the right track.

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



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



Re: [POLL] Your experience with FOP 0.90alpha1 so far???

2005-12-08 Thread Roland Neilands
Yes that helps, on the external-graphic. Well that makes .90 quite 
acceptable for some documents then.


Cheers,
Roland

Andreas L Delmelle wrote:


On Dec 9, 2005, at 00:57, Roland Neilands wrote:

Roland,

Concerning 1)

1. Images are not scaled & overrun block-container height & width.  
The images seem washed-out & pixelated (gif). This is a stopper, I  
was hoping it would work better than 20.5.
position="absolute">

   
 

 



Have you tried playing with 'content-height' and 'content-width'  
instead of plain height/width?



Cheers,

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: [POLL] Your experience with FOP 0.90alpha1 so far???

2005-12-08 Thread mm
> On Dec 9, 2005, at 00:57, Roland Neilands wrote:
>
> Roland,
>
> Concerning 1)
>> 1. Images are not scaled & overrun block-container height & width.
>> The images seem washed-out & pixelated (gif). This is a stopper, I
>> was hoping it would work better than 20.5.
>> > position="absolute">
>>
>>  
>>  
>
> Have you tried playing with 'content-height' and 'content-width'
> instead of plain height/width?
>

Check http://issues.apache.org/bugzilla/show_bug.cgi?id=37136 it may help
as well.

>
> Cheers,
>
> Andreas
>

Manuel


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



Re: [POLL] Your experience with FOP 0.90alpha1 so far???

2005-12-08 Thread Andreas L Delmelle

On Dec 9, 2005, at 00:57, Roland Neilands wrote:

Roland,

Concerning 1)
1. Images are not scaled & overrun block-container height & width.  
The images seem washed-out & pixelated (gif). This is a stopper, I  
was hoping it would work better than 20.5.
position="absolute">

   
 

 


Have you tried playing with 'content-height' and 'content-width'  
instead of plain height/width?



Cheers,

Andreas

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



Re: How to pass input of xml tranfs. to xslt transf. ?

2005-12-08 Thread Andreas L Delmelle

On Dec 8, 2005, at 21:58, J.Pietschmann wrote:


Andreas L Delmelle wrote:
of your XML data shows up in the result document... AFAICT, your  
source XML contains only:

Hello
To this you apply templates and create the root.


There is a  around the fo:inline. Note the
spelling mismatch, ...


Ouch! Totally missed that one. It's A Good Thing there's more than  
two eyes watching the list :-)


Cheers,

Andreas


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



Re: Page Sequences

2005-12-08 Thread Andreas L Delmelle

On Dec 8, 2005, at 23:01, Clifton Craig wrote:

I'm banging my head on this so maybe I'll look into the quick fix  
since this
is the 2nd or 3rd time someone has brought it up. Is it a jar or  
something

that would be easy to install?


Not exactly... although not too much effort either.

Check out the source via SVN:
  http://svn.apache.org/repos/asf/xmlgraphics/fop/branches/ 
fop-0_20_2-maintain


... and build-it-yourself.


HTH!

Cheers,

Andreas


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



Re: [POLL] Your experience with FOP 0.90alpha1 so far???

2005-12-08 Thread Roland Neilands

Jeremias,

I haven't test it thoroughly yet, but you asked, so but here's what I've 
seen:


1. Images are not scaled & overrun block-container height & width. The 
images seem washed-out & pixelated (gif). This is a stopper, I was 
hoping it would work better than 20.5.
position="absolute">

   
 src="file:images/{$logo}" scaling="uniform"/>

 

2. I had to move region-before after region-body in the 
simple-page-master. This makes no sense ;), but I assume this is from 
the spec. Not a problem.


3. NB. Had to replace  with 



4. No line numbers on errors anymore? This was very useful for debugging 
stylesheets.


5. There seems to be extra space inserted between lines now. This breaks 
existing stylesheets static-content layout - is there some default 
attribute I can turn off for this? (space-before, padding?)


6. PCL - no chance of at least keeping the old renderer?

FWIW: I know these are mostly my compliance issues, but a FAQ on these 
kind of differences would help greatly.


Cheers,
Roland

Jeremias Maerki wrote:


Dear users of Apache FOP,

version 0.90alpha1 is now two weeks old. In this time we've already
received a number of bug reports and even some patches. Thanks to
those involved and to everybody who has sent us feedback on the new
version so far.

Still, it's been a little quiet for my taste. :-) So, I'd like to ask
everybody who has tried 0.90alpha1 (or the latest FOP Trunk) so far to
tell us his/her first impression of the new code. Is it crap beyond what
is thought possible? *g* If there are problems, what are they (except
those we already documented, of course)? Or could it even be that you've
already rendered a few non-trivial documents and it didn't even look
that bad? We'd really appreciate some more feedback.

If there are people who would like to contribute more than bug reports
and feedback, but don't know how, please speak up. We can always use
additional help and will be glad to get you on the right track.

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



Scott E. Boedecker is out of the office.

2005-12-08 Thread SEBoedecker
I will be out of the office starting  12/08/2005 and will not return until
12/12/2005.

I will respond to your message when I return.


-
This e-mail and any attachments are intended only for the individual or
company to which it is addressed and may contain information which is
privileged, confidential and prohibited from disclosure or unauthorized use
under applicable law.  If you are not the intended recipient of this
e-mail, you are hereby notified that any use, dissemination, or copying of
this e-mail or the information contained in this e-mail is strictly
prohibited by the sender.  If you have received this transmission in error,
please return the material received to the sender and delete all copies
from your system.


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



Re: Page Sequences

2005-12-08 Thread Clifton Craig
I'm banging my head on this so maybe I'll look into the quick fix since this 
is the 2nd or 3rd time someone has brought it up. Is it a jar or something 
that would be easy to install?

On Thursday 08 December 2005 3:43 pm, J.Pietschmann wrote:
> Clifton Craig wrote:
> > So the only time tables are realeased are at the end of a page sequence?
>
> Yes. The problem is actually all the stuff used during content
> layout, which is otherwise released after a page has been rendered.
> There is a quick fix in the source repository for this.
>
> J.Pietschmann
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Clifton C. Craig, Software Engineer
[EMAIL PROTECTED]

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



Re: How to pass input of xml tranfs. to xslt transf. ?

2005-12-08 Thread J.Pietschmann

Andreas L Delmelle wrote:
of your XML data shows up in the result document... AFAICT, your source 
XML contains only:


Hello

To this you apply templates and create the root.


There is a  around the fo:inline. Note the
spelling mismatch, therefore it selects nothing -> no content to
watch.

J.Pietschmann


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



Re: How to pass input of xml tranfs. to xslt transf. ?

2005-12-08 Thread J.Pietschmann

[EMAIL PROTECTED] wrote:

OK, the ByteArrayOutputStream solves the NullPointer Exception. The only
problem left is there is none of my xml data in the pdf. I only get the
static header of the xsl document :o/


The most likely reason is that you don't generate FO objects
for the real content. If the PDF generation worked before,
using serialization of the intermediate XML, then you've
probably tried to "generate tags".
The easies way to track down the problem is to replace the
FOP Driver by an identity transformation which serializes to
the servlet's output stream so that you can download the
FO document with a browser (or, better, using a command line
client to save it into a file). It the FO looks ok, and
produces the expected output if run through the FOP command
lien application, check whether your transformation uses
disable-output-escaping.

J.Pietschmann

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



Re: Page Sequences

2005-12-08 Thread J.Pietschmann

Clifton Craig wrote:

So the only time tables are realeased are at the end of a page sequence?


Yes. The problem is actually all the stuff used during content
layout, which is otherwise released after a page has been rendered.
There is a quick fix in the source repository for this.

J.Pietschmann


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



Re: How to pass input of xml tranfs. to xslt transf. ?

2005-12-08 Thread Andreas L Delmelle

On Dec 8, 2005, at 20:25, [EMAIL PROTECTED] wrote:


Hi,

thanks for the advice I split up the transformation but couldn't find
anything wrong.

The xslt file misses in the output the template & style tags but I  
suppose

that's ok.


Depends on what do you mean by "OK"? Your XSLT doesn't contain any  
templates other than one matching the root node of your source XML.  
Did you leave the others out intentionally? If not, that explains why  
none of your XML data shows up in the result document... AFAICT, your  
source XML contains only:


Hello

To this you apply templates and create the root. Then, the XSLT  
processor goes looking for Hello element nodes to iterate over, but  
doesn't find any... The only child node is a Hello text node.


IIC: try removing the xsl:for-each, and you should at least get some  
result...



HTH!

Cheers,

Andreas



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



Re: How to pass input of xml tranfs. to xslt transf. ?

2005-12-08 Thread Peter . Neu
Hi,

thanks for the advice I split up the transformation but couldn't find
anything wrong. 

The xslt file misses in the output the template & style tags but I suppose
that's ok. I got rid of the complicated XmlTransformer and pasted the xml
creation directly into the servlet but still no luck. So I have reduced
everything to it's most basic components but I still don't see what's wrong.
Just to be sure I attached the servlet and the xls sheet (created & tested
in Stylevision). 

Do you see anyhing wrong?

cheers,
Pete


> --- Ursprüngliche Nachricht ---
> Von: Jeremias Maerki <[EMAIL PROTECTED]>
> An: fop-users@xmlgraphics.apache.org
> Betreff: Re: How to pass input of xml tranfs. to xslt transf. ?
> Datum: Thu, 08 Dec 2005 16:25:01 +0100
> 
> Nothing's wrong with the sequence. Now that you've got a complete
> processing pipeline there and you have problems, you have to split it up
> at defined points to get at the intermediate results so you can identify
> the problem. For example:
> 
> Instead of...
> SAXResult result = new SAXResult(driver.getContentHandler());
> ...you can use...
> StreamResult result = new StreamResult(new File("C:/Temp/temp.xml"));
> 
> That will write the output from the XSLT transformation to a file which
> you can inspect. If you want to see what the XML you produce looks like,
> switch from XSLT transformation to identity transformation
> (newTransformerHandler())
> to skip the XSLT stage.
> 
> You've probably got a bug in your XSLT. Now it's your turn.
> 
> On 08.12.2005 16:18:51 Peter.Neu wrote:
> > OK, the ByteArrayOutputStream solves the NullPointer Exception. The only
> > problem left is there is none of my xml data in the pdf. I only get the
> > static header of the xsl document :o/
> > 
> > Do we have to change the sequence somehow?
> 
> Jeremias Maerki
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-- 
GMX DSL-Flatrate 1 Jahr kostenlos* + WLAN-Router ab 0,- Euro*
Bis 31.12.2005 einsteigen! Infos unter: http://www.gmx.net/de/go/dsl
http://www.w3.org/1999/XSL/Transform"; xmlns:fo="http://www.w3.org/1999/XSL/Format"; xmlns:xs="http://www.w3.org/2001/XMLSchema"; xmlns:fn="http://www.w3.org/2004/07/xpath-functions"; xmlns:xdt="http://www.w3.org/2004/07/xpath-datatypes";>



























BinaryStreamServlet.java
Description: Binary data
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Fonts Metric File - Overriding Name

2005-12-08 Thread Andreas L Delmelle

On Dec 8, 2005, at 18:42, Paul Moloney wrote:

Hi,

Before looking any further, I'd like to make sure that this...


java -cp build\fop.jar;lib\avalon-framework-c
vs-20020806.jar;lib\xml-apis.jar;lib\xercesImpl-2.2.1.jar;lib 
\xalan-2.4.1.jar or
g.apache.fop.fonts.apps.PFMReader -f "LetterGothic"  
lettergothic.pfm lettergothic.xml

   ^^^
... is not a typo, and perhaps it could also help to show us...


I would expect the resulting XML file to have the line:

LetterGothic

However, the font-name is different.


... what name you *do* get as a result?



Cheers,

Andreas


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



Fonts Metric File - Overriding Name

2005-12-08 Thread Paul Moloney
I'm trying to generate a font metrics files for a Type 1 font, Letter 
Gothic, and

I'm not getting the expected result.

When I generate font metrics file, using the following command:

java -cp build\fop.jar;lib\avalon-framework-c
vs-20020806.jar;lib\xml-apis.jar;lib\xercesImpl-2.2.1.jar;lib\xalan-2.4.1.jar 
or
g.apache.fop.fonts.apps.PFMReader -f "LetterGothic" lettergothic.pfm 
lettergothic.xml


I would expect the resulting XML file to have the line:

LetterGothic

However, the font-name is different. Am I using the -fn switch 
incorrectly?


Thanks,

P.

-pm

http://oceanclub.blogspot.com

"I can't listen to that much Wagner. I start getting the urge to
conquer Poland." 


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



Re: Page Sequences

2005-12-08 Thread Glen Mazza

Chris Bowditch wrote:


Clifton Craig wrote:




J,
So the only time tables are realeased are at the end of a page 
sequence? That would explain my dilemma. Even though I use multiple 
smaller tables per row instead of one big table all of the smaller 
tables are held until the page sequence ends? That sux.



Non constructive comments are *not* welcome. You must realise that the 
possibility of back tracking makes the task of knowing when to release 
objects very tricky. If you think you are up to the challenge of 
writing algorithms to do layout more efficiently then please share 
them. Otherwise refrain from making such negative comments.


Chris




I disagree with you, Chris, there was nothing wrong with Clifton's 
comments.  He was just giving his legitimate opinions on the matter.


Also, Chris, for your statement "if you think you are up to the 
challenge of writing algorithms to do layout more efficiently then 
please share them", that is quite remarkable coming from you. 

I *was* up to the challenge of trying to attain better algorithms, and 
refine what we had to make sure everything was being done efficiently.  
Jeremias disparaged these efforts by calling this relatively unimportant 
"code guilding"[1] at the time, and you furthered that by declaring that 
I didn't care whether or not people use FOP[2], just because algorithm 
comprehension and refinement was my emphasis then.


When you see to it that when someone who discusses algorithm refinement 
on FOP-DEV is to be smeared with not caring about whether or not people 
use FOP, do you not see the contradiction in then requesting people to 
share their ideas to refine FOP?  Been there, done that with you.


Glen

[1] http://marc.theaimsgroup.com/?l=fop-dev&m=111730351322137&w=2
[2] http://marc.theaimsgroup.com/?l=fop-dev&m=111753251927198&w=2



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



Re: FOP 0.90 alpha: problem with table borders and page breaks

2005-12-08 Thread Dominic Brügger

Thank you very much Jeremias :-)

I tested with the current svn version and it worked! This was actually 
quite a big issue in our current project...


Jeremias Maerki wrote:


Problem fixed in Subversion:
http://svn.apache.org/viewcvs?rev=355105&view=rev

:-)

On 08.12.2005 14:23:30 Jeremias Maerki wrote:
 


Hi Dominic

This is a known issue with 0.90alpha1. See table_border_padding.xml in [1].
A cell that has no more content but whose row continues on the next page
will not produce new cell borders right an the subsequent page right now.
Since you've run into this problem I might just as well have a look at
it. Shouldn't be too hard to fix.

Other than adding additional blocks with only a space in them (one for
each additional line) to make the (invisible) content break over to the
next page, there's currently no work-around.

[1] http://xmlgraphics.apache.org/fop/knownissues.html

On 08.12.2005 13:49:33 Dominic Brügger wrote:
   


Hello,

I'm using FOP 0.90 alpha. I encountered a problem with table borders and 
page breaks. In the  example below there is one cell with little content 
and a second one with a lot more of content. On the first page the 
border of both cells is displayed correctly. After a page break only the 
second cell has a border and the first one (which is empty after the 
page break) has no border!


Is this an error of the alpha version? Will it be fixed? Or does anybody 
knows a workaround?


Thanks a lot...

Dominic
 


Jeremias Maerki
   




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]



[POLL] Your experience with FOP 0.90alpha1 so far???

2005-12-08 Thread Jeremias Maerki
Dear users of Apache FOP,

version 0.90alpha1 is now two weeks old. In this time we've already
received a number of bug reports and even some patches. Thanks to
those involved and to everybody who has sent us feedback on the new
version so far.

Still, it's been a little quiet for my taste. :-) So, I'd like to ask
everybody who has tried 0.90alpha1 (or the latest FOP Trunk) so far to
tell us his/her first impression of the new code. Is it crap beyond what
is thought possible? *g* If there are problems, what are they (except
those we already documented, of course)? Or could it even be that you've
already rendered a few non-trivial documents and it didn't even look
that bad? We'd really appreciate some more feedback.

If there are people who would like to contribute more than bug reports
and feedback, but don't know how, please speak up. We can always use
additional help and will be glad to get you on the right track.

Thanks,
Jeremias Maerki


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



Re: How to pass input of xml tranfs. to xslt transf. ?

2005-12-08 Thread Jeremias Maerki
Nothing's wrong with the sequence. Now that you've got a complete
processing pipeline there and you have problems, you have to split it up
at defined points to get at the intermediate results so you can identify
the problem. For example:

Instead of...
SAXResult result = new SAXResult(driver.getContentHandler());
...you can use...
StreamResult result = new StreamResult(new File("C:/Temp/temp.xml"));

That will write the output from the XSLT transformation to a file which
you can inspect. If you want to see what the XML you produce looks like,
switch from XSLT transformation to identity transformation 
(newTransformerHandler())
to skip the XSLT stage.

You've probably got a bug in your XSLT. Now it's your turn.

On 08.12.2005 16:18:51 Peter.Neu wrote:
> OK, the ByteArrayOutputStream solves the NullPointer Exception. The only
> problem left is there is none of my xml data in the pdf. I only get the
> static header of the xsl document :o/
> 
> Do we have to change the sequence somehow?

Jeremias Maerki


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



Re: How to pass input of xml tranfs. to xslt transf. ?

2005-12-08 Thread Peter . Neu
OK, the ByteArrayOutputStream solves the NullPointer Exception. The only
problem left is there is none of my xml data in the pdf. I only get the
static header of the xsl document :o/

Do we have to change the sequence somehow?




> --- Ursprüngliche Nachricht ---
> Von: Jeremias Maerki <[EMAIL PROTECTED]>
> An: fop-users@xmlgraphics.apache.org
> Betreff: Re: How to pass input of xml tranfs. to xslt transf. ?
> Datum: Thu, 08 Dec 2005 16:04:32 +0100
> 
> I'm not sure why you get an error that "handler is null". The setup
> looks ok now. The only thing that's missing is the ByteArrayOutputStream
> that FOP writes the PDF output to. In order to make PDF displaying work
> you need to know the size of the PDF so there's no way around buffering
> the PDF into a byte array. See some changes inline below.
> 
> On 08.12.2005 15:50:48 Peter.Neu wrote:
> > First of all. Thanks for taking so much time for my problem :o)
> > 
> > I tried to include your code. It's attached below:
> > 
> > 1. the transformer factory with the implementation I use does not
> support
> > this call: this.transformerFactory.newTransformerHandler(xsltSrc); - so
> I
> > modified it a bit.
> > 
> > 2. When I run the code I get the error that the handler is null :o/
> > 
> > 3. I'm still not sure how to output the stuff to the browser.
> > 
> > cheers,
> > Pete
> > 
> > Code:
> > 
> > SAXTransformerFactory tf = (SAXTransformerFactory)
> > SAXTransformerFactory.newInstance();
> > // my static xsl file in here
> > Source xsltSrc = new StreamSource((new
> > File(session.getServletContext().getRealPath("/xml/nbw.xsl";
> > TransformerHandler handler = tf.newTransformerHandler(xsltSrc);
> > 
> > //Prepare FOP here
> > Driver driver = new Driver();
> > driver.setLogger(this.log2);
> > driver.setRenderer(Driver.RENDER_PDF);
> > 
> //Setup a buffer to obtain the content length
> //Use the ByteArrayOutputStream from Jakarta Commons IO. It's more
> //memory-efficient
> ByteArrayOutputStream out2 = new ByteArrayOutputStream();
> driver.setOutputStream(out2);
> > 
> > SAXResult result = new SAXResult(driver.getContentHandler());
> > handler.setResult(result);
> > 
> > 
> > XmlTransformer xmlt = new XmlTransformer();
> > xmlt.doXMLTransform(handler);
> > /* this  is nothing but
> > *   handler.startDocument();
> > handerl.startElement("BLA");
> > handerl.endElement("BLA");
> > hd.endDocument();
> > */
> > 
> > //Prepare response
> > response.setContentType("application/pdf");
> > //  response.setContentLength(out2.size());
> > 
> > //Send content to Browser
> 
> response.getOutputStream().write(out2.toByteArray());
> 
> > response.getOutputStream().flush();
> > 
> > 
> > -
> > 
> > > --- Ursprüngliche Nachricht ---
> > > Von: Jeremias Maerki <[EMAIL PROTECTED]>
> > > An: fop-users@xmlgraphics.apache.org
> > > Betreff: Re: How to pass input of xml tranfs. to xslt transf. ?
> > > Datum: Thu, 08 Dec 2005 14:53:19 +0100
> > > 
> > > It's unclear what this XmlTransformer does exactly. You only
> instantiate
> > > a new instance but you do nothing with it.
> > > 
> > > Anyway, I'll try to rework your code so you can pipe this stuff
> > > together:
> > > 
> > > 1. You don't need the FileOutputStream anymore.
> > > 2. No need to configure the serializer if you just pipe the stuff
> > > through.
> > > 3. Since you do only an identity transform you don't need the first
> > > TransformerHandler. Instead set up the XSLT transformation as a
> > > TransformerHandler.
> > > 
> > > SAXTransformerFactory tf =
> > > (SAXTransformerFactory)SAXTransformerFactory.newInstance();
> > > 
> > > // my static xsl file in here
> > > Source xsltSrc = new StreamSource((new File(("nbw.xsl";
> > > TransformerHandler handler =
> > > this.transformerFactory.newTransformerHandler(xsltSrc);
> > > 
> > > //Prepare FOP here
> > > 
> > > SAXResult result = new SAXResult(driver.getContentHandler());
> > > handler.setResult(streamResult);
> > > 
> > > XmlTransformer xmlt = new XmlTransformer(handler);
> > > //Start the XML generation, however you do this (see question above)
> > > xmlt.doSomething();
> > > 
> > > This should send the SAX events generated by your XmlTransformer (not
> an
> > > ideal name IMO) through the TransformerHandler (for the XSLT
> transform)
> > > and its output further on to FOP.
> > > 
> > > On 08.12.2005 14:31:23 Peter.Neu wrote:
> > > > protected void JAXPTransform(HttpSession session,
> > > HttpServletResponse response, HttpServletRequest req) throws Exception
> {
> > > > 
> > > > 
> > > > // Here I provide a file output stream for the result of the
> sax
> > > transformation -> what I need is some kind of stream
> > > >   
> > > > File xmlfile = new
> > > File(session.getServletContext().getRealPath("/xml/"), "nbw.xml");
> > > > OutputStream out = new java.io.FileOutputStream(xmlfile);
> > > > 
> > > > // set the stream result 

Re: FOP 0.90 alpha: problem with table borders and page breaks

2005-12-08 Thread Jeremias Maerki
Problem fixed in Subversion:
http://svn.apache.org/viewcvs?rev=355105&view=rev

:-)

On 08.12.2005 14:23:30 Jeremias Maerki wrote:
> Hi Dominic
> 
> This is a known issue with 0.90alpha1. See table_border_padding.xml in [1].
> A cell that has no more content but whose row continues on the next page
> will not produce new cell borders right an the subsequent page right now.
> Since you've run into this problem I might just as well have a look at
> it. Shouldn't be too hard to fix.
> 
> Other than adding additional blocks with only a space in them (one for
> each additional line) to make the (invisible) content break over to the
> next page, there's currently no work-around.
> 
> [1] http://xmlgraphics.apache.org/fop/knownissues.html
> 
> On 08.12.2005 13:49:33 Dominic Brügger wrote:
> > Hello,
> > 
> > I'm using FOP 0.90 alpha. I encountered a problem with table borders and 
> > page breaks. In the  example below there is one cell with little content 
> > and a second one with a lot more of content. On the first page the 
> > border of both cells is displayed correctly. After a page break only the 
> > second cell has a border and the first one (which is empty after the 
> > page break) has no border!
> > 
> > Is this an error of the alpha version? Will it be fixed? Or does anybody 
> > knows a workaround?
> > 
> > Thanks a lot...
> > 
> > Dominic
> 
> 
> Jeremias Maerki


Jeremias Maerki


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



Re: How to pass input of xml tranfs. to xslt transf. ?

2005-12-08 Thread Jeremias Maerki
I'm not sure why you get an error that "handler is null". The setup
looks ok now. The only thing that's missing is the ByteArrayOutputStream
that FOP writes the PDF output to. In order to make PDF displaying work
you need to know the size of the PDF so there's no way around buffering
the PDF into a byte array. See some changes inline below.

On 08.12.2005 15:50:48 Peter.Neu wrote:
> First of all. Thanks for taking so much time for my problem :o)
> 
> I tried to include your code. It's attached below:
> 
> 1. the transformer factory with the implementation I use does not support
> this call: this.transformerFactory.newTransformerHandler(xsltSrc); - so I
> modified it a bit.
> 
> 2. When I run the code I get the error that the handler is null :o/
> 
> 3. I'm still not sure how to output the stuff to the browser.
> 
> cheers,
> Pete
> 
> Code:
> 
> SAXTransformerFactory tf = (SAXTransformerFactory)
> SAXTransformerFactory.newInstance();
> // my static xsl file in here
> Source xsltSrc = new StreamSource((new
> File(session.getServletContext().getRealPath("/xml/nbw.xsl";
> TransformerHandler handler = tf.newTransformerHandler(xsltSrc);
> 
> //Prepare FOP here
> Driver driver = new Driver();
> driver.setLogger(this.log2);
> driver.setRenderer(Driver.RENDER_PDF);
> 
//Setup a buffer to obtain the content length
//Use the ByteArrayOutputStream from Jakarta Commons IO. It's more
//memory-efficient
ByteArrayOutputStream out2 = new ByteArrayOutputStream();
driver.setOutputStream(out2);
> 
> SAXResult result = new SAXResult(driver.getContentHandler());
> handler.setResult(result);
> 
> 
> XmlTransformer xmlt = new XmlTransformer();
> xmlt.doXMLTransform(handler);
> /* this  is nothing but
> *   handler.startDocument();
> handerl.startElement("BLA");
> handerl.endElement("BLA");
> hd.endDocument();
> */
> 
> //Prepare response
> response.setContentType("application/pdf");
> //  response.setContentLength(out2.size());
> 
> //Send content to Browser

response.getOutputStream().write(out2.toByteArray());

> response.getOutputStream().flush();
> 
> 
> -
> 
> > --- Ursprüngliche Nachricht ---
> > Von: Jeremias Maerki <[EMAIL PROTECTED]>
> > An: fop-users@xmlgraphics.apache.org
> > Betreff: Re: How to pass input of xml tranfs. to xslt transf. ?
> > Datum: Thu, 08 Dec 2005 14:53:19 +0100
> > 
> > It's unclear what this XmlTransformer does exactly. You only instantiate
> > a new instance but you do nothing with it.
> > 
> > Anyway, I'll try to rework your code so you can pipe this stuff
> > together:
> > 
> > 1. You don't need the FileOutputStream anymore.
> > 2. No need to configure the serializer if you just pipe the stuff
> > through.
> > 3. Since you do only an identity transform you don't need the first
> > TransformerHandler. Instead set up the XSLT transformation as a
> > TransformerHandler.
> > 
> > SAXTransformerFactory tf =
> > (SAXTransformerFactory)SAXTransformerFactory.newInstance();
> > 
> > // my static xsl file in here
> > Source xsltSrc = new StreamSource((new File(("nbw.xsl";
> > TransformerHandler handler =
> > this.transformerFactory.newTransformerHandler(xsltSrc);
> > 
> > //Prepare FOP here
> > 
> > SAXResult result = new SAXResult(driver.getContentHandler());
> > handler.setResult(streamResult);
> > 
> > XmlTransformer xmlt = new XmlTransformer(handler);
> > //Start the XML generation, however you do this (see question above)
> > xmlt.doSomething();
> > 
> > This should send the SAX events generated by your XmlTransformer (not an
> > ideal name IMO) through the TransformerHandler (for the XSLT transform)
> > and its output further on to FOP.
> > 
> > On 08.12.2005 14:31:23 Peter.Neu wrote:
> > > protected void JAXPTransform(HttpSession session,
> > HttpServletResponse response, HttpServletRequest req) throws Exception {
> > > 
> > > 
> > > // Here I provide a file output stream for the result of the sax
> > transformation -> what I need is some kind of stream
> > >   
> > > File xmlfile = new
> > File(session.getServletContext().getRealPath("/xml/"), "nbw.xml");
> > > OutputStream out = new java.io.FileOutputStream(xmlfile);
> > > 
> > > // set the stream result for the transformation
> > > StreamResult streamResult = new StreamResult((out));
> > > SAXTransformerFactory tf = (SAXTransformerFactory)
> > SAXTransformerFactory.newInstance();
> > > TransformerHandler hd = tf.newTransformerHandler();
> > > Transformer serializer = hd.getTransformer();
> > > 
> > > serializer.setOutputProperty(OutputKeys.ENCODING, "ISO-8859-1");
> > > serializer.setOutputProperty(OutputKeys.INDENT, "yes");
> > > 
> > > hd.setResult(streamResult);
> > > 
> > > // the whole creation of the xml is done in the XmlTransformer
> > which writes to the output file but should write it to some kind of stream
> > >  

Re: How to pass input of xml tranfs. to xslt transf. ?

2005-12-08 Thread Peter . Neu
First of all. Thanks for taking so much time for my problem :o)

I tried to include your code. It's attached below:

1. the transformer factory with the implementation I use does not support
this call: this.transformerFactory.newTransformerHandler(xsltSrc); - so I
modified it a bit.

2. When I run the code I get the error that the handler is null :o/

3. I'm still not sure how to output the stuff to the browser.

cheers,
Pete

Code:

SAXTransformerFactory tf = (SAXTransformerFactory)
SAXTransformerFactory.newInstance();
// my static xsl file in here
Source xsltSrc = new StreamSource((new
File(session.getServletContext().getRealPath("/xml/nbw.xsl";
TransformerHandler handler = tf.newTransformerHandler(xsltSrc);

//Prepare FOP here
Driver driver = new Driver();
driver.setLogger(this.log2);
driver.setRenderer(Driver.RENDER_PDF);


SAXResult result = new SAXResult(driver.getContentHandler());
handler.setResult(result);


XmlTransformer xmlt = new XmlTransformer();
xmlt.doXMLTransform(handler);
/* this  is nothing but
*   handler.startDocument();
handerl.startElement("BLA");
handerl.endElement("BLA");
hd.endDocument();
*/

//Prepare response
response.setContentType("application/pdf");
//  response.setContentLength(out2.size());

//Send content to Browser
//response.getOutputStream().write(out2.toByteArray());
response.getOutputStream().flush();


-

> --- Ursprüngliche Nachricht ---
> Von: Jeremias Maerki <[EMAIL PROTECTED]>
> An: fop-users@xmlgraphics.apache.org
> Betreff: Re: How to pass input of xml tranfs. to xslt transf. ?
> Datum: Thu, 08 Dec 2005 14:53:19 +0100
> 
> It's unclear what this XmlTransformer does exactly. You only instantiate
> a new instance but you do nothing with it.
> 
> Anyway, I'll try to rework your code so you can pipe this stuff
> together:
> 
> 1. You don't need the FileOutputStream anymore.
> 2. No need to configure the serializer if you just pipe the stuff
> through.
> 3. Since you do only an identity transform you don't need the first
> TransformerHandler. Instead set up the XSLT transformation as a
> TransformerHandler.
> 
> SAXTransformerFactory tf =
> (SAXTransformerFactory)SAXTransformerFactory.newInstance();
> 
> // my static xsl file in here
> Source xsltSrc = new StreamSource((new File(("nbw.xsl";
> TransformerHandler handler =
> this.transformerFactory.newTransformerHandler(xsltSrc);
> 
> //Prepare FOP here
> 
> SAXResult result = new SAXResult(driver.getContentHandler());
> handler.setResult(streamResult);
> 
> XmlTransformer xmlt = new XmlTransformer(handler);
> //Start the XML generation, however you do this (see question above)
> xmlt.doSomething();
> 
> This should send the SAX events generated by your XmlTransformer (not an
> ideal name IMO) through the TransformerHandler (for the XSLT transform)
> and its output further on to FOP.
> 
> On 08.12.2005 14:31:23 Peter.Neu wrote:
> > protected void JAXPTransform(HttpSession session,
> HttpServletResponse response, HttpServletRequest req) throws Exception {
> > 
> > 
> > // Here I provide a file output stream for the result of the sax
> transformation -> what I need is some kind of stream
> >   
> > File xmlfile = new
> File(session.getServletContext().getRealPath("/xml/"), "nbw.xml");
> > OutputStream out = new java.io.FileOutputStream(xmlfile);
> > 
> > // set the stream result for the transformation
> > StreamResult streamResult = new StreamResult((out));
> > SAXTransformerFactory tf = (SAXTransformerFactory)
> SAXTransformerFactory.newInstance();
> > TransformerHandler hd = tf.newTransformerHandler();
> > Transformer serializer = hd.getTransformer();
> > 
> > serializer.setOutputProperty(OutputKeys.ENCODING, "ISO-8859-1");
> > serializer.setOutputProperty(OutputKeys.INDENT, "yes");
> > 
> > hd.setResult(streamResult);
> > 
> > // the whole creation of the xml is done in the XmlTransformer
> which writes to the output file but should write it to some kind of stream
> > XmlTransformer xmlt = new XmlTransformer(hd);
> > 
> > //from here on just the basic servlet example from here : 
> > // http://xmlgraphics.apache.org/fop/0.20.5/servlets.html#xslt
> > Driver driver = new Driver();
> > driver.setLogger(this.log2);
> > driver.setRenderer(Driver.RENDER_PDF);
> > 
> > //Setup a buffer to obtain the content length
> > ByteArrayOutputStream out2 = new ByteArrayOutputStream();
> > driver.setOutputStream(out2);
> > 
> > //Setup Transformer
> > BufferedReader r = req.getReader();
> > 
> > 
> > this.transformerFactory = TransformerFactory.newInstance();
> > 
> > // my static xsl file in here
> > Source xsltSrc = new StreamSource((new File(("nbw.xsl";
> > Transform

Re: Page Sequences

2005-12-08 Thread Chris Bowditch

Clifton Craig wrote:


Chris,

My apologies as I didn't mean those comments to sting. What I should have said 
was, "that sux for me". Or even better, "it sux to be me". I was only venting 
from my current situation and I wasn't attempting to trash talk the product 
at all. FOP is the perfect fit for our project and there are few (if any) 
alternatives that work as well. No I am not up to writing more efficient 
algorithms as I am but a peon developer who is barely able to keep up with 
the algorithms required to effectively interface with such a product. Thanx 
for keeping me in line. No hard feelings.




Thanks for clearing that up Craig. All is forgiven. It is so easy to 
misunderstand on e-mail sometimes...


Chris



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



Re: How to pass input of xml tranfs. to xslt transf. ?

2005-12-08 Thread Jeremias Maerki
It's unclear what this XmlTransformer does exactly. You only instantiate
a new instance but you do nothing with it.

Anyway, I'll try to rework your code so you can pipe this stuff
together:

1. You don't need the FileOutputStream anymore.
2. No need to configure the serializer if you just pipe the stuff
through.
3. Since you do only an identity transform you don't need the first
TransformerHandler. Instead set up the XSLT transformation as a
TransformerHandler.

SAXTransformerFactory tf = 
(SAXTransformerFactory)SAXTransformerFactory.newInstance();

// my static xsl file in here
Source xsltSrc = new StreamSource((new File(("nbw.xsl";
TransformerHandler handler = 
this.transformerFactory.newTransformerHandler(xsltSrc);

//Prepare FOP here

SAXResult result = new SAXResult(driver.getContentHandler());
handler.setResult(streamResult);

XmlTransformer xmlt = new XmlTransformer(handler);
//Start the XML generation, however you do this (see question above)
xmlt.doSomething();

This should send the SAX events generated by your XmlTransformer (not an
ideal name IMO) through the TransformerHandler (for the XSLT transform)
and its output further on to FOP.

On 08.12.2005 14:31:23 Peter.Neu wrote:
> protected void JAXPTransform(HttpSession session, HttpServletResponse 
> response, HttpServletRequest req) throws Exception {
> 
> 
> // Here I provide a file output stream for the result of the sax 
> transformation -> what I need is some kind of stream
>   
> File xmlfile = new 
> File(session.getServletContext().getRealPath("/xml/"), "nbw.xml");
> OutputStream out = new java.io.FileOutputStream(xmlfile);
> 
> // set the stream result for the transformation
> StreamResult streamResult = new StreamResult((out));
> SAXTransformerFactory tf = (SAXTransformerFactory) 
> SAXTransformerFactory.newInstance();
> TransformerHandler hd = tf.newTransformerHandler();
> Transformer serializer = hd.getTransformer();
> 
> serializer.setOutputProperty(OutputKeys.ENCODING, "ISO-8859-1");
> serializer.setOutputProperty(OutputKeys.INDENT, "yes");
> 
> hd.setResult(streamResult);
> 
> // the whole creation of the xml is done in the XmlTransformer which 
> writes to the output file but should write it to some kind of stream
> XmlTransformer xmlt = new XmlTransformer(hd);
> 
> //from here on just the basic servlet example from here : 
> // http://xmlgraphics.apache.org/fop/0.20.5/servlets.html#xslt
> Driver driver = new Driver();
> driver.setLogger(this.log2);
> driver.setRenderer(Driver.RENDER_PDF);
> 
> //Setup a buffer to obtain the content length
> ByteArrayOutputStream out2 = new ByteArrayOutputStream();
> driver.setOutputStream(out2);
> 
> //Setup Transformer
> BufferedReader r = req.getReader();
> 
> 
> this.transformerFactory = TransformerFactory.newInstance();
> 
> // my static xsl file in here
> Source xsltSrc = new StreamSource((new File(("nbw.xsl";
> Transformer transformer = 
> this.transformerFactory.newTransformer(xsltSrc);
> 
> //Make sure the XSL transformation's result is piped through to FOP
> Result res = new SAXResult(driver.getContentHandler());
> 
> //Setup input
> // This is the point where im stuck -> I don't know how to insert a 
> stream in here
>Source src = new StreamSource(new File("foo.xml"));
> 
> //Start the transformation and rendering process
> transformer.transform(src, res);
> 
> //Prepare response
> response.setContentType("application/pdf");
> response.setContentLength(out2.size());
> 
> //Send content to Browser
> response.getOutputStream().write(out2.toByteArray());
> response.getOutputStream().flush();
> 
> 
> }



Jeremias Maerki


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



Re: Page Sequences

2005-12-08 Thread Clifton Craig
Chris,

My apologies as I didn't mean those comments to sting. What I should have said 
was, "that sux for me". Or even better, "it sux to be me". I was only venting 
from my current situation and I wasn't attempting to trash talk the product 
at all. FOP is the perfect fit for our project and there are few (if any) 
alternatives that work as well. No I am not up to writing more efficient 
algorithms as I am but a peon developer who is barely able to keep up with 
the algorithms required to effectively interface with such a product. Thanx 
for keeping me in line. No hard feelings.

-- 
Clifton C. Craig, Software Engineer
[EMAIL PROTECTED]

On Thursday 08 December 2005 3:56 am, Chris Bowditch wrote:
> Clifton Craig wrote:
>
> 
>
> > J,
> > So the only time tables are realeased are at the end of a page sequence?
> > That would explain my dilemma. Even though I use multiple smaller tables
> > per row instead of one big table all of the smaller tables are held until
> > the page sequence ends? That sux.
>
> Non constructive comments are *not* welcome. You must realise that the
> possibility of back tracking makes the task of knowing when to release
> objects very tricky. If you think you are up to the challenge of writing
> algorithms to do layout more efficiently then please share them.
> Otherwise refrain from making such negative comments.
>
> Chris
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

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



Re: How to pass input of xml tranfs. to xslt transf. ?

2005-12-08 Thread Peter . Neu
Hi,

sorry maybe I created a little misunderstanding here. I attached some source
code as a .txt file to clear up things.

cheers,
Pete




> --- Ursprüngliche Nachricht ---
> Von: Jeremias Maerki <[EMAIL PROTECTED]>
> An: fop-users@xmlgraphics.apache.org
> Betreff: Re: How to pass input of xml tranfs. to xslt transf. ?
> Datum: Thu, 08 Dec 2005 14:13:03 +0100
> 
> Can you please give a little more context (i.e. more code)? I don't
> understand what exactly you want to do. I thought you had a SAX XML
> source, not an XML file source.
> 
> On 08.12.2005 13:56:27 Peter.Neu wrote:
> > Hello,
> > 
> > I have a hard time getting the Obj2Pdf Example to work with my
> application.
> > I was browsing through the FAQ and found another example 
> > 
> > http://xmlgraphics.apache.org/fop/0.20.5/servlets.html#xslt
> > 
> > But also here is the problem I don't know how to pass the generated xml
> file
> > to a File object. 
> > 
> > The critical line is this one: 
> > Source src = new StreamSource(new File("foo.xml")); <- Streaming?
> > 
> > How can I stream my xml document in this object? My transformation is a
> > simple SAX transformation.
> > 
> > cheers,
> > Pete
> > 
> > 
> > > --- Ursprüngliche Nachricht ---
> > > Von: [EMAIL PROTECTED]
> > > An: fop-users@xmlgraphics.apache.org
> > > Betreff: Re: How to pass input of xml tranfs. to xslt transf. ?
> > > Datum: Thu, 8 Dec 2005 08:54:10 +0100 (MET)
> > > 
> > > Hello Jeremias,
> > > 
> > > good your are in the cet time zone,too ;o). 
> > > My code also uses sax so the refactoring process will not be that
> long.
> > > Anyway it's always good to have a working example so I'll adapt to
> that. 
> > > I'll be back with details when I'm done refactoring.
> > > 
> > > cheers,
> > > Pete
> > > 
> > > 
> > > 
> > > 
> > > > --- Ursprüngliche Nachricht ---
> > > > Von: Jeremias Maerki <[EMAIL PROTECTED]>
> > > > An: fop-users@xmlgraphics.apache.org
> > > > Betreff: Re: How to pass input of xml tranfs. to xslt transf. ?
> > > > Datum: Thu, 08 Dec 2005 08:32:55 +0100
> > > > 
> > > > Pete,
> > > > 
> > > > I see. No, in this case you're not missing anything although you may
> not
> > > > need to rewrite your whole code just to accomodate the new pattern.
> > > > Generating XML using SAX events is one way to generate XML, a good
> way
> > > > but not necessarily the only one. Remember that JAXP is quite
> flexible
> > > > and that you could use a DOMSource, for example, if you've already
> got
> > > > code that generates a DOM from your data. The purpose of the
> examples in
> > > > the examples/embedding directory are to show a gradual approach to
> the
> > > > patterns that we suggest people use. The benefit out of this is a
> > > > flexible and quick solution.
> > > > 
> > > > On 08.12.2005 08:20:49 Peter.Neu wrote:
> > > > > Hi Jeremias,
> > > > > 
> > > > > I was refering to Obj2PDF because this is the only example which
> shows
> > > > how
> > > > > to generate XML and then pass it to the FOP Transformation.
> XML2PDF
> > > > works
> > > > > with a static and already existing xml file. So the whole point
> was
> > > how
> > > > to
> > > > > pass a generated xml file to fop without writing it to the file
> > > system.
> > > > > Using the Obj2PDF requires a lot of refactoring in my code but
> that is
> > > > the
> > > > > only option I got I suppose, or am I missing something?
> > > > > 
> > > > > cheers,
> > > > > Pete 
> > > > > 
> > > > > > --- Ursprüngliche Nachricht ---
> > > > > > Von: Jeremias Maerki <[EMAIL PROTECTED]>
> > > > > > An: fop-users@xmlgraphics.apache.org
> > > > > > Betreff: Re: How to pass input of xml tranfs. to xslt transf. ?
> > > > > > Datum: Wed, 07 Dec 2005 21:44:38 +0100
> > > > > > 
> > > > > > Yes, that's basically it, though ExampleObj2PDF is a bit
> special.
> > > > > > ExampleXML2PDF is the more generic example. And yes, it works in
> a
> > > > > > webapp.
> > > > > > 
> > > > > > On 07.12.2005 21:39:58 Peter.Neu wrote:
> > > > > > > Hi Glenn
> > > > > > > 
> > > > > > > did you mean this example? Taken from [1]. Does this work in a
> > > > webapp?
> > > > > > > 
> > > > > > > 
> > > > > > > //Setup output
> > > > > > > OutputStream out = new java.io.FileOutputStream(pdf);
> > > > > > >   try {
> > > > > > >   driver.setOutputStream(out);
> > > > > > >   //Setup XSLT
> > > > > > >   TransformerFactory factory =
> > > TransformerFactory.newInstance();
> > > > > > >   Transformer transformer = factory.newTransformer(new
>
> > >  
> > > >
> > > > > > > StreamSource(xslt));
> > > > > > >  //Setup input for XSLT transformation
> > > > > > >  Source src = team.getSourceForProjectTeam();
> > > > > > > //Resulting SAX events (the generated FO) must be piped
> > > through
> > > > to
> > > > > > FOP
> > > > > > >  Result res = new SAXResult(driver.getContentHandler());
> > > > > > > 
> > > > > > >//Start XSLT transformation and FOP processing
> > > > > > > transformer.transform(src,
> > > > > > >

Re: FOP 0.90 alpha: problem with table borders and page breaks

2005-12-08 Thread Jeremias Maerki
Hi Dominic

This is a known issue with 0.90alpha1. See table_border_padding.xml in [1].
A cell that has no more content but whose row continues on the next page
will not produce new cell borders right an the subsequent page right now.
Since you've run into this problem I might just as well have a look at
it. Shouldn't be too hard to fix.

Other than adding additional blocks with only a space in them (one for
each additional line) to make the (invisible) content break over to the
next page, there's currently no work-around.

[1] http://xmlgraphics.apache.org/fop/knownissues.html

On 08.12.2005 13:49:33 Dominic Brügger wrote:
> Hello,
> 
> I'm using FOP 0.90 alpha. I encountered a problem with table borders and 
> page breaks. In the  example below there is one cell with little content 
> and a second one with a lot more of content. On the first page the 
> border of both cells is displayed correctly. After a page break only the 
> second cell has a border and the first one (which is empty after the 
> page break) has no border!
> 
> Is this an error of the alpha version? Will it be fixed? Or does anybody 
> knows a workaround?
> 
> Thanks a lot...
> 
> Dominic


Jeremias Maerki


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



Re: How to pass input of xml tranfs. to xslt transf. ?

2005-12-08 Thread Jeremias Maerki
Can you please give a little more context (i.e. more code)? I don't
understand what exactly you want to do. I thought you had a SAX XML
source, not an XML file source.

On 08.12.2005 13:56:27 Peter.Neu wrote:
> Hello,
> 
> I have a hard time getting the Obj2Pdf Example to work with my application.
> I was browsing through the FAQ and found another example 
> 
> http://xmlgraphics.apache.org/fop/0.20.5/servlets.html#xslt
> 
> But also here is the problem I don't know how to pass the generated xml file
> to a File object. 
> 
> The critical line is this one: 
> Source src = new StreamSource(new File("foo.xml")); <- Streaming?
> 
> How can I stream my xml document in this object? My transformation is a
> simple SAX transformation.
> 
> cheers,
> Pete
> 
> 
> > --- Ursprüngliche Nachricht ---
> > Von: [EMAIL PROTECTED]
> > An: fop-users@xmlgraphics.apache.org
> > Betreff: Re: How to pass input of xml tranfs. to xslt transf. ?
> > Datum: Thu, 8 Dec 2005 08:54:10 +0100 (MET)
> > 
> > Hello Jeremias,
> > 
> > good your are in the cet time zone,too ;o). 
> > My code also uses sax so the refactoring process will not be that long.
> > Anyway it's always good to have a working example so I'll adapt to that. 
> > I'll be back with details when I'm done refactoring.
> > 
> > cheers,
> > Pete
> > 
> > 
> > 
> > 
> > > --- Ursprüngliche Nachricht ---
> > > Von: Jeremias Maerki <[EMAIL PROTECTED]>
> > > An: fop-users@xmlgraphics.apache.org
> > > Betreff: Re: How to pass input of xml tranfs. to xslt transf. ?
> > > Datum: Thu, 08 Dec 2005 08:32:55 +0100
> > > 
> > > Pete,
> > > 
> > > I see. No, in this case you're not missing anything although you may not
> > > need to rewrite your whole code just to accomodate the new pattern.
> > > Generating XML using SAX events is one way to generate XML, a good way
> > > but not necessarily the only one. Remember that JAXP is quite flexible
> > > and that you could use a DOMSource, for example, if you've already got
> > > code that generates a DOM from your data. The purpose of the examples in
> > > the examples/embedding directory are to show a gradual approach to the
> > > patterns that we suggest people use. The benefit out of this is a
> > > flexible and quick solution.
> > > 
> > > On 08.12.2005 08:20:49 Peter.Neu wrote:
> > > > Hi Jeremias,
> > > > 
> > > > I was refering to Obj2PDF because this is the only example which shows
> > > how
> > > > to generate XML and then pass it to the FOP Transformation. XML2PDF
> > > works
> > > > with a static and already existing xml file. So the whole point was
> > how
> > > to
> > > > pass a generated xml file to fop without writing it to the file
> > system.
> > > > Using the Obj2PDF requires a lot of refactoring in my code but that is
> > > the
> > > > only option I got I suppose, or am I missing something?
> > > > 
> > > > cheers,
> > > > Pete 
> > > > 
> > > > > --- Ursprüngliche Nachricht ---
> > > > > Von: Jeremias Maerki <[EMAIL PROTECTED]>
> > > > > An: fop-users@xmlgraphics.apache.org
> > > > > Betreff: Re: How to pass input of xml tranfs. to xslt transf. ?
> > > > > Datum: Wed, 07 Dec 2005 21:44:38 +0100
> > > > > 
> > > > > Yes, that's basically it, though ExampleObj2PDF is a bit special.
> > > > > ExampleXML2PDF is the more generic example. And yes, it works in a
> > > > > webapp.
> > > > > 
> > > > > On 07.12.2005 21:39:58 Peter.Neu wrote:
> > > > > > Hi Glenn
> > > > > > 
> > > > > > did you mean this example? Taken from [1]. Does this work in a
> > > webapp?
> > > > > > 
> > > > > > 
> > > > > > //Setup output
> > > > > > OutputStream out = new java.io.FileOutputStream(pdf);
> > > > > >   try {
> > > > > >   driver.setOutputStream(out);
> > > > > >   //Setup XSLT
> > > > > >   TransformerFactory factory =
> > TransformerFactory.newInstance();
> > > > > >   Transformer transformer = factory.newTransformer(new
> >  
> > >
> > > > > > StreamSource(xslt));
> > > > > >  //Setup input for XSLT transformation
> > > > > >  Source src = team.getSourceForProjectTeam();
> > > > > > //Resulting SAX events (the generated FO) must be piped
> > through
> > > to
> > > > > FOP
> > > > > >  Result res = new SAXResult(driver.getContentHandler());
> > > > > > 
> > > > > >//Start XSLT transformation and FOP processing
> > > > > > transformer.transform(src,
> > > > > > res);
> > > > > > 
> > > > > >
> > > > >
> > > >
> > >
> >
> [1]http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/tags/fop-0_20_5/examples/embedding/java/embedding/ExampleObj2PDF.java?view=markup
> > > > > > 
> > > > > > 
> > > > > > cheers,
> > > > > > Pete
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > > --- Ursprüngliche Nachricht ---
> > > > > > > Von: Glen Mazza <[EMAIL PROTECTED]>
> > > > > > > An: fop-users@xmlgraphics.apache.org
> > > > > > > Betreff: Re: How to pass input of xml tranfs. to xslt transf. ?
> > > > > > > Datum: Wed, 07 Dec 2005 12:41:24 -0500
> > > > > > > 
> > > > > > > Don't use XSLTInputHandler.  Use J

Re: How to pass input of xml tranfs. to xslt transf. ?

2005-12-08 Thread Peter . Neu
Hello,

I have a hard time getting the Obj2Pdf Example to work with my application.
I was browsing through the FAQ and found another example 

http://xmlgraphics.apache.org/fop/0.20.5/servlets.html#xslt

But also here is the problem I don't know how to pass the generated xml file
to a File object. 

The critical line is this one: 
Source src = new StreamSource(new File("foo.xml")); <- Streaming?

How can I stream my xml document in this object? My transformation is a
simple SAX transformation.

cheers,
Pete


> --- Ursprüngliche Nachricht ---
> Von: [EMAIL PROTECTED]
> An: fop-users@xmlgraphics.apache.org
> Betreff: Re: How to pass input of xml tranfs. to xslt transf. ?
> Datum: Thu, 8 Dec 2005 08:54:10 +0100 (MET)
> 
> Hello Jeremias,
> 
> good your are in the cet time zone,too ;o). 
> My code also uses sax so the refactoring process will not be that long.
> Anyway it's always good to have a working example so I'll adapt to that. 
> I'll be back with details when I'm done refactoring.
> 
> cheers,
> Pete
> 
> 
> 
> 
> > --- Ursprüngliche Nachricht ---
> > Von: Jeremias Maerki <[EMAIL PROTECTED]>
> > An: fop-users@xmlgraphics.apache.org
> > Betreff: Re: How to pass input of xml tranfs. to xslt transf. ?
> > Datum: Thu, 08 Dec 2005 08:32:55 +0100
> > 
> > Pete,
> > 
> > I see. No, in this case you're not missing anything although you may not
> > need to rewrite your whole code just to accomodate the new pattern.
> > Generating XML using SAX events is one way to generate XML, a good way
> > but not necessarily the only one. Remember that JAXP is quite flexible
> > and that you could use a DOMSource, for example, if you've already got
> > code that generates a DOM from your data. The purpose of the examples in
> > the examples/embedding directory are to show a gradual approach to the
> > patterns that we suggest people use. The benefit out of this is a
> > flexible and quick solution.
> > 
> > On 08.12.2005 08:20:49 Peter.Neu wrote:
> > > Hi Jeremias,
> > > 
> > > I was refering to Obj2PDF because this is the only example which shows
> > how
> > > to generate XML and then pass it to the FOP Transformation. XML2PDF
> > works
> > > with a static and already existing xml file. So the whole point was
> how
> > to
> > > pass a generated xml file to fop without writing it to the file
> system.
> > > Using the Obj2PDF requires a lot of refactoring in my code but that is
> > the
> > > only option I got I suppose, or am I missing something?
> > > 
> > > cheers,
> > > Pete 
> > > 
> > > > --- Ursprüngliche Nachricht ---
> > > > Von: Jeremias Maerki <[EMAIL PROTECTED]>
> > > > An: fop-users@xmlgraphics.apache.org
> > > > Betreff: Re: How to pass input of xml tranfs. to xslt transf. ?
> > > > Datum: Wed, 07 Dec 2005 21:44:38 +0100
> > > > 
> > > > Yes, that's basically it, though ExampleObj2PDF is a bit special.
> > > > ExampleXML2PDF is the more generic example. And yes, it works in a
> > > > webapp.
> > > > 
> > > > On 07.12.2005 21:39:58 Peter.Neu wrote:
> > > > > Hi Glenn
> > > > > 
> > > > > did you mean this example? Taken from [1]. Does this work in a
> > webapp?
> > > > > 
> > > > > 
> > > > > //Setup output
> > > > > OutputStream out = new java.io.FileOutputStream(pdf);
> > > > >   try {
> > > > >   driver.setOutputStream(out);
> > > > >   //Setup XSLT
> > > > >   TransformerFactory factory =
> TransformerFactory.newInstance();
> > > > >   Transformer transformer = factory.newTransformer(new
>  
> >
> > > > > StreamSource(xslt));
> > > > >  //Setup input for XSLT transformation
> > > > >  Source src = team.getSourceForProjectTeam();
> > > > > //Resulting SAX events (the generated FO) must be piped
> through
> > to
> > > > FOP
> > > > >  Result res = new SAXResult(driver.getContentHandler());
> > > > > 
> > > > >//Start XSLT transformation and FOP processing
> > > > > transformer.transform(src,
> > > > > res);
> > > > > 
> > > > >
> > > >
> > >
> >
>
[1]http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/tags/fop-0_20_5/examples/embedding/java/embedding/ExampleObj2PDF.java?view=markup
> > > > > 
> > > > > 
> > > > > cheers,
> > > > > Pete
> > > > > 
> > > > > 
> > > > > 
> > > > > > --- Ursprüngliche Nachricht ---
> > > > > > Von: Glen Mazza <[EMAIL PROTECTED]>
> > > > > > An: fop-users@xmlgraphics.apache.org
> > > > > > Betreff: Re: How to pass input of xml tranfs. to xslt transf. ?
> > > > > > Datum: Wed, 07 Dec 2005 12:41:24 -0500
> > > > > > 
> > > > > > Don't use XSLTInputHandler.  Use JAXP[1] instead.
> > > > > > 
> > > > > > Glen
> > > > > > 
> > > > > > [1]
> > http://xmlgraphics.apache.org/fop/0.20.5/embedding.html#examples
> > > > > > 
> > > > > > [EMAIL PROTECTED] wrote:
> > > > > > 
> > > > > > >Hello,
> > > > > > >
> > > > > > >I struggling to create a webapps that creates pdf's for xml
> > > > documents.
> > > > > > The
> > > > > > >problem is: I can't pipe the output of my SAX transformation to
> > the 
> > > > > > >XSLTInputHandler. 
> > > > > > >

FOP 0.90 alpha: problem with table borders and page breaks

2005-12-08 Thread Dominic Brügger

Hello,

I'm using FOP 0.90 alpha. I encountered a problem with table borders and 
page breaks. In the  example below there is one cell with little content 
and a second one with a lot more of content. On the first page the 
border of both cells is displayed correctly. After a page break only the 
second cell has a border and the first one (which is empty after the 
page break) has no border!


Is this an error of the alpha version? Will it be fixed? Or does anybody 
knows a workaround?


Thanks a lot...

Dominic



http://www.w3.org/1999/XSL/Format";>
 
   
 
 
 
   
 

 
   
 Page 
   

   

 
 Problem table:
 

 
   
   

   
 
   border-style="solid">

 
 A cell with little text.
 
   
   border-style="solid">

 
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 A cell with very lot of text!
 
   
 
   
 

   
 


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



Re: Page Sequences

2005-12-08 Thread Chris Bowditch

Clifton Craig wrote:




J,
So the only time tables are realeased are at the end of a page sequence? That 
would explain my dilemma. Even though I use multiple smaller tables per row 
instead of one big table all of the smaller tables are held until the page 
sequence ends? That sux.


Non constructive comments are *not* welcome. You must realise that the 
possibility of back tracking makes the task of knowing when to release 
objects very tricky. If you think you are up to the challenge of writing 
algorithms to do layout more efficiently then please share them. 
Otherwise refrain from making such negative comments.


Chris



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