Re: using multiple page sequences

2004-03-12 Thread Fabrizio Tringali
Hi Brett,
It's not about "faith", spanning datas across multiple page sequences 
brings an huge memory saving.
We solve issue of constant OutOfMemory errors (according to heap 
allocation) going to about 2 MB memory consumption on fully written 100 
pages documents.

You have to identify where in your document could be inserted a page break
or
decide to break intentionally after N rows of datas (1 record on your XML 
file can be M rows on document so M*N is the total rows on document)

In the second case put logic for break when ciclying your datas templates 
using something like this ($STOP is max number of data rows for page):










title 1


title 2


   





























Hope this help
fabrizio
At 02.32 12/03/2004, you wrote:
Hi all,
I am having out of memory issues when transforming my FO -> PDF using
fop-0.20.5rc2. I read that using multiple page sequences in the XSL and
therefore in the FO means that fop will release some memory. I don't see how
I can do this. My XML file is generated dynamically from a database so I
don't know how big it will be. Is there any solutions I can use that uses
multiple page sequences or possible change the xml structure, if not is
there another FOP transformer that isn't as memory intensive. Thanks in
advanced for any help. If I havn't provided enough info please ask and I can
get back to you.
Defend your privacy! Encrypt your email today! 
http://www.bytefusion.com/secexmail 

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


Re: [fop] FOP for XML -> FO?

2003-04-11 Thread Fabrizio Tringali
because that is an XSLT transformation

bye

From: "Robert P. J. Day" <[EMAIL PROTECTED]>
> 
>   it's not mentioned in the online help, so i just wanted
> to verify that there's no XML -> FO transform supported
> by FOP, which would allow me to examine the intermediate
> FO before going on to generate the final PDF.  
> 
>   is this the case?
> 
> rday


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



Re: File not found error

2003-02-10 Thread Fabrizio Tringali
this for me works

String xsltSystemId = "file:///C:/m1/Project1/someFile.xsl";
Transformer transformer = factory.newTransformer(new
StreamSource(xsltSystemId));

bye


From: "Matthew Lancashire" <[EMAIL PROTECTED]>


> I get a file not found error when I do the .transform
>
>
> javax.xml.transform.TransformerException: java.io.FileNotFoundException:
> C:\m1\Project1\< (The filename, directory name, or volume label syntax is
> incorrect)
> at
>
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:
> 686)
>


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



Re: Generating ASCII output

2003-02-10 Thread Fabrizio Tringali
I agree on
"in general terms an XSL Formatting engine is the wrong tool for generating
Character Text output",

but if you "must" use TXTRenderer because you need something that simulate
PdfOutput etc. etc.
you can set textCPI and textLPI so:

TXTRenderer renderer = new TXTRenderer();
renderer.textCPI=12;
renderer.textLPI=6.1f;
driver.setRenderer(renderer);

hope this help





From: "Illiano, Vincent"


> Thanks for the tip.  I may indeed end up doing what you suggest - use
Xalan
> directly to get text output.  But before I take that plunge, some have
> mentioned tweaking textCPI and textLPI.  How is this done?  In the
> stylesheet?  If it requires modifying the FOP Java code, I'd rather not ;)
>
> Thanks again, -Vincent
> >


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



Re: string to domsource

2003-02-07 Thread Fabrizio Tringali
byte[] ret = null;
InputStream is;
String xsltSystemId = "file:///C:/someFile.xsl";
String xml = somMethodToCreateXML();
org.apache.fop.apps.Driver driver = new
org.apache.fop.apps.Driver();
//Setup Renderer (output format)
driver.setRenderer(org.apache.fop.apps.Driver.RENDER_PDF);
//Setup output
OutputStream out = new java.io.ByteArrayOutputStream();
driver.setOutputStream(out);
//Setup XSLT
TransformerFactory factory = TransformerFactory.newInstance();
Transformer transformer = factory.newTransformer(new
StreamSource(xsltSystemId));
//Setup input for XSLT transformation
Source src = new StreamSource(new java.io.StringReader(xml));
//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);
ret = ((ByteArrayOutputStream)out).toByteArray();
out.close();

maybe can go
hi


From: "Matthew Lancashire" <[EMAIL PROTECTED]>


> I want to pass a string to FOP instead of a file
> I can do this by putting my string into a domSource.
>
> How do I do this though.


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



Re: RENDER_TXT

2003-02-07 Thread Fabrizio Tringali
you have to play with textCPI, textLPI properties of renderer and with
line-height of rows
hi

From: "bhati001" <[EMAIL PROTECTED]>


> I am using FOP for transforming xml to pdf and since it was so easy
generate
> txt just by changing the rendering, i did that too.
>
> But I noticed something wierd, FOP while generating txt would
occassionally,
> without any pattern, join the top line with the bottom line and the bottom
> line text would overwrite that upper line. It is difficult to explain but
it
> looked like the text was meshed. the pdf output was fine.
>
> I am wondering whether anyone else noticed this. now i am using plain xslt
> to output text.
>
> B.


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



Re: Generating ASCII output

2003-02-07 Thread Fabrizio Tringali
you have to play with textCPI, textLPI and line-height values

hi





From: "Illiano, Vincent" <[EMAIL PROTECTED]>


> Hi List,
>
> I've built a document-generation system around FOP to create both PDF and
> ASCII text documents.  To create the ASCII text output file, I use
the -txt
> command line argument to FOP.  I have a couple of small problems with the
> ASCII text output.  Every 30 lines or so in the generated output file, a
> line of output is written over the previous output line. The next line,
> instead of being written on a new line, is written again over the previous
> line.  Visually, the 2nd line overlays the previous line.  Characters on
the
> previous line will show in the output if the next line contains a space at
> that character position.
>
> Another problem I'm seeing is that every so often, there is no space
between
> words in the text output.
>
> So I'm wondering if I've defined my document correctly for ASCII output.
Am
> I using the wrong font-family, font-size, line-height?  There is are my
> current settings:
>
>  line-height="10.4pt">
> 
>
> Thanks for any information on this.  -Vincent
>


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



Re: Using FopServlet with ISO-8859-1

2003-02-03 Thread Fabrizio Tringali
I've got the same problem on solaris 7/8 and it was not the browser but the
web server.
I solve it setting some locale on OS, something like:
LC_COLLATE=it_IT.ISO8859-1
LC_CTYPE=it_IT.ISO8859-1
LC_MESSAGES=it
LC_MOLC_COLLATE=it.ISO8859-15
LC_NUMERIC=it_IT.ISO8859-1
LC_TIME=it_IT.ISO8859-1

hi


- Original Message -
From: "Rob Staveley (Tom)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 03, 2003 6:34 PM
Subject: Using FopServlet with ISO-8859-1


> I've got an XML document encoded with ISO-8859-1 for which I have an
XSL-FO
> which also outputs ISO-8859-1. This works nicely using the command line
Fop.
> However, using the same XML and XSL with FopServlet I find that accented
> characters get clobbered in the retrieved PDF. It happens with Mozilla and
> IE. Any ideas?
>
> PS: I've tried using UTF-8 as the output encoding in the XSL and get the
> same problem.
>
>
> -
> 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: fop + servlet + multisession

2003-02-03 Thread Fabrizio Tringali
ciao Gian Piero,

this is the snippet to set the log level to debug
--
//Setup logger
Logger logger = new ConsoleLogger(ConsoleLogger.LEVEL_DEBUG);
driver.setLogger(logger);
MessageHandler.setScreenLogger(logger);
--


"and sometimes the servlet is called twice( why??)"
it's a bug of  IE 5.0/5.5



hope this help

fabrizio

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



Re: blanks and txtrenderer

2003-01-07 Thread Fabrizio Tringali
I don't know why, but I solve the problem of "inserted empty lines" 
specifying   line-height="10pt"   for each row in tables

hope this help

From: "alex elsholz" <[EMAIL PROTECTED]>

> Hi,
> 
> i've problems with the layout using the txt-renderer. sometimes
> one blank comes to 3, sometimes to 10, sometimes to one.
> Sometimes empty lines were inserted. When i use the pdf or the awt
> renderer it works fine. has anybody an idea?
> 
> alex


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



Re: fop.jar with patches

2003-01-02 Thread Fabrizio Tringali
OK, but I need the patched version for "NullPointerException on
Txt-Rendering" bug

Thanks
Fabrizio

From: "Joerg Pietschmann"
> On Thursday 02 January 2003 12:27, Fabrizio Tringali wrote:
> > anybody knows how can I take a fop.jar file with the ultimate patches?
>
> Just download the 0.20.5rc distribution. Currently there aren't
> any relevant new patches.


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



fop.jar with patches

2003-01-02 Thread Fabrizio Tringali
Happy New Year to everybody,

anybody knows how can I take a fop.jar file with the ultimate patches?

I'm behind a firewall and so I can't synchronize my source files by CVS. 

thanks
Fabrizio

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



Re: Using String for XML source

2002-12-20 Thread Fabrizio Tringali



For me this work on 0.20.5rc
 
 
    File 
xslt = new File ("some.xsl");    File 
pdf = new File("some.pdf");    String 
xml = createXML();
    
//Construct driver    
org.apache.fop.apps.Driver driver = new 
org.apache.fop.apps.Driver();    
//Setup logger    Logger logger = new 
ConsoleLogger(ConsoleLogger.LEVEL_DEBUG);    
driver.setLogger(logger);    
MessageHandler.setScreenLogger(logger);    
//Setup Renderer (output format)    
driver.setRenderer(org.apache.fop.apps.Driver.RENDER_PDF);    
//Setup output    OutputStream out = 
new java.io.FileOutputStream(pdf);    
driver.setOutputStream(out);    
//Setup XSLT    TransformerFactory 
factory = 
TransformerFactory.newInstance();    
Transformer transformer = factory.newTransformer(new 
StreamSource(xslt));    //Setup input 
for XSLT transformation    Source src 
= "" StreamSource(new 
java.io.StringReader(xml));    
//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);    
out.close();
 
hope this help
 
 

  I'd like to generate xml string from a different 
  source ( using directly some class instead of reading from a file 
  and creating a String variable )...  my xml source doen't 
  inclusde any reference to external source... so
  I tryed to open result using a StringReader... 
  but a lot of exception come up when I compiled my class.. 
   perhaps, systemID is always required...
   
  Could someone help me?
   
  thanks in 
advance


Re: TXTRenderer Setting the encoding

2002-12-20 Thread Fabrizio Tringali
I have the same exception (Alex, Can you say me if the trace is the same?)

Anybody knows the reason??

hi


[INFO] building formatting object tree
[INFO] setting up fonts
[INFO] rendering areas to TEXT
; SystemID: file:///C:/temp/styleTXT.xsl
javax.xml.transform.TransformerException: java.lang.NullPointerException
 at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
erImpl.java:2344)
 at
org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(Transformer
Impl.java:2160)
 at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j
ava: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)
 at asdfg.TestVari.test(TestVari.java:224)
 at asdfg.TestVari.main(TestVari.java:444)
-
java.lang.NullPointerException
 at
org.apache.fop.render.txt.TXTRenderer.startRenderer(TXTRenderer.java:1702)
 at
org.apache.fop.apps.StreamRenderer.startRenderer(StreamRenderer.java:136)
 at org.apache.fop.fo.FOTreeBuilder.startDocument(FOTreeBuilder.java:194)
 at
org.apache.xalan.transformer.ResultTreeHandler.flushDocEvent(ResultTreeHandl
er.java:826)
 at
org.apache.xalan.transformer.ResultTreeHandler.flushPending(ResultTreeHandle
r.java:934)
 at
org.apache.xalan.transformer.ResultTreeHandler.startElement(ResultTreeHandle
r.java:243)
 at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:
673)
 at
org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApp
lyTemplates.java:425)

 at
org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.jav
a:216)
 at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
erImpl.java:2339)
 at
org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(Transformer
Impl.java:2160)
 at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j
ava: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)
 at asdfg.TestVari.test(TestVari.java:224)
 at asdfg.TestVari.main(TestVari.java:444)


"alex elsholz" <[EMAIL PROTECTED]> wrote:


> Hi,
>
> when i use the 0.20.5 fop i get a nullpointer when i use the txtrenderer
> when the
> renderer tries to use the member options (because it isnt initialized) in
> line 1607.
>
> i think its a bug, he should use the default utf-8 encoding in this case.
>
> but how can i set the variable?
>
> i tried Configuration.put(txt.encoding", "."), but without success.
>
> alex



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



Re: multiple sequence how-to??

2002-12-17 Thread Fabrizio Tringali
FOPException: page-sequence must be child of root, not fo:flow

Any other ideas or I have to change other lines ??

thanks


- Original Message -
From: "Oleg Tkachenko" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, December 15, 2002 12:23 PM
Subject: Re: multiple sequence how-to??


> Fabrizio Tringali wrote:
> > According to http://xml.apache.org/fop/faq.html#faq-N1011A "Use multiple
> > page sequences" I have to span across multiple sequences my flow.
> >
> > Can anyone show me a simple example to include in a xsl file to
implement
> > multiple sequences ??
>
> Follow this pattern:
>
> 
> 
> 
> 
> 
>
> --
> Oleg Tkachenko
> eXperanto team
> Multiconn Technologies, Israel
>
>
> -
> 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]



multiple sequence how-to??

2002-12-13 Thread Fabrizio Tringali
According to http://xml.apache.org/fop/faq.html#faq-N1011A "Use multiple
page sequences" I have to span across multiple sequences my flow.

Can anyone show me a simple example to include in a xsl file to implement
multiple sequences ??

Tnx

///   this is my XML input file
/


  
13/12/2002
SDA
ROMA 1
  
  

  01-02-2002
  
2002-02-01
K0
MI
1
K0
1
  
  
2002-02-01
K1
MI
1
K1
2
  
  
2002-02-01
K2
MI
1
K2
3
  
  
2002-02-01
K5
MI
1
K5
6
  
  
2002-02-01
K6
MI
1
K6
7
  
  
2002-02-01
K7
MI
1
K7
8
  

  
  
0
  

///   end of XML input file
/





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



page-sequence & master-name ?

2002-12-13 Thread Fabrizio Tringali
I see everywhere in the examples the tag 
but my XMLSpy doesn't validate this
tag according to
http://zvon.org/xxl/xslfoReference/Output/el_page-sequence.html
Which is the right way? If the above tag is correct why the validator throws
exception?
Tkx



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