RE : Sources of fop-0.20.5 ?

2006-06-30 Thread salaun
Hi,

Try this url http://apache.crihan.fr/dist/xml/fop/fop-0.20.5-src.zip

Erwan.

-Message d'origine-
De : Christian Geisert [mailto:[EMAIL PROTECTED] 
Envoyé : vendredi 30 juin 2006 02:45
À : fop-users@xmlgraphics.apache.org
Objet : Re: Sources of fop-0.20.5 ?

Bruno Haible schrieb:
 Hi,
 
 Can someone please indicate where to get the sources of the fop-0.20.5
 binary package?

[..]

 The file http://www.apache.org/dist/xml/fop/fop-0.20.5-src.tar.gz
 appears to be incomplete: The classes
   org.apache.fop.fo.PropertyManager
 and   org.apache.fop.datatypes.CondLength
 refer to a class or interface
   org.apache.fop.fo.properties.Constants
 but such a class doesn't exist in the source tarball.

These sources are generated at build-time, see the codegen-target in 
build.xml.

 Has anyone managed to rebuild fop-0.20.5 from source?

Sure ;-)

Christian

P.S. Are you the Bruno Haible who did algebra lectures at Karlsruhe 
University in the early ninties?

-
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: Performance with large Tables

2006-06-30 Thread Jeremias Maerki
Results on my two-year old IBM ThinkPad X31 with a Pentium M 1.4GHz.

Sun JDK 1.4.2_12, -Xmx128M, FOP Trunk: First run 11sec, subsequent runs
6.4sec.

Sun JDK 1.5.0_07, -Xmx128M, FOP Trunk: First run 12.5sec, subsequent
runs 6.1sec.

Sun JDK 1.5.0_07, Server VM, -Xmx128M, FOP Trunk: First run 27sec,
second run 7.2sec, subsequent runs 5.2sec.

I don't have time right now to do any profiling but I still hope that
helps you a little. Looks like you should check your memory settings
and consider buying new hardware. :-)

On 29.06.2006 22:18:48 mcevikce wrote:
 
 This is the link for the fo file.
 
 http://www.4shared.com/file/2278690/5364bc01
 
 This file takes about 27sec in average to generate PDF. You will see that it
 contains a large table but from what I see on these posts the table is not
 that big. So pease let me know if you can get to run this any faster.


Jeremias Maerki


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



Re: PDF Encrption problem

2006-06-30 Thread Jeremias Maerki

On 30.06.2006 09:00:55 Chris Bowditch wrote:
 Singhal, Ramneek (Exchange) wrote:
 
  Hi
  
  I am able to create PDF with encryption. I think it was policy file
  problem. I installed RC4 providers as extension and it worked fine.
  
  Now I have another problem. I am embedding Time New Roman and Ariel
  fonts in generated PDF. If I create PDF with -noprint switch while open
  the generated PDF in Acrobet it complains that its not able to extract
  embedded fonts and all the text becomes garbage. Whereas without
  -noprint switch everthing works fine. 
 
 I seem to remember that FOP 0.20.5 had a bug which mean encryption 
 didn't work with custom fonts. This issue is fixed in 0.92beta, so why 
 not upgrade?

Nonono, the problem is still not fixed. ToUnicode tables are still
missing. Patch available in Bugzilla but it is code snatched from FOray.
To apply that proper licensing has to be established.

Jeremias Maerki


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



Re: PDF Encrption problem

2006-06-30 Thread Chris Bowditch

Jeremias Maerki wrote:


On 30.06.2006 09:00:55 Chris Bowditch wrote:


snip/

I seem to remember that FOP 0.20.5 had a bug which mean encryption 
didn't work with custom fonts. This issue is fixed in 0.92beta, so why 
not upgrade?



Nonono, the problem is still not fixed. ToUnicode tables are still
missing. Patch available in Bugzilla but it is code snatched from FOray.
To apply that proper licensing has to be established.


D'oh!

Chris



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



Re: Performance with large Tables

2006-06-30 Thread mcevikce

Thank you for running the file. There is a huge difference between your
result 6.1 sec and mine 27 sec.
It would be awsome if I can get this to run on 6.1 sec.

Are you testing this from a command line using fop.bat? Can you tell me
which libraries are you using? Also any other information about the
environment you running will help. Here is my environment:

- jdk1.5.0_06
- Saxon 8.6
- Crimson
- I got the FOP trunk about 2 weeks ago. 
- Running a webapp on JBoss 4.02.
- Servlet is making the call. Here is the code that makes the call. I belive
this is similar to what Fop.bat does.

private void transform(HttpServletRequest a_req, HttpServletResponse a_res,
String a_html) throws Exception {
TransformerFactory tfactory = 
TransformerFactoryImpl.newInstance();
Transformer transformer = tfactory.newTransformer();
SAXParserFactory factory = SAXParserFactory.newInstance();
factory.setValidating(false);
factory.setNamespaceAware(false);
//BufferedOutputStream buffOutput = null;
ByteArrayOutputStream arrayOutput = null;
try {

if (System.getProperty(debug_mode) != null
 
System.getProperty(debug_mode).trim().equals(true)) {
Log.info(a_html);
}

StopWatch.setThreadEvent(PDF-transform-start1);
a_res.reset();

ByteArrayInputStream arrayInputStream = new 
ByteArrayInputStream(
a_html.getBytes());
BufferedInputStream buffInput = new BufferedInputStream(
arrayInputStream, 1024 * 1500);
 
//buffOutput = new 
BufferedOutputStream(a_res.getOutputStream());
arrayOutput = new ByteArrayOutputStream();
//buffOutput = new BufferedOutputStream(arrayOutput);


Map parameters = new HashMap();
String pagewith = (String) 
a_req.getSession().getAttribute(
pagewitdh);
if (pagewith == null || pagewith.trim().equals()) {
Log.info(PDF will be generated with default 
page with of 2000px);
pagewith = 2000;
}
parameters.put(pagewidth, pagewith + px);
XMLReader parser = 
factory.newSAXParser().getXMLReader();
XMLFilter filter = new CSSToXSLFOFilter(null, null, 
parameters, parser);

//Setup FOP
FopFactory fopFactory = FopFactory.newInstance();
Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, 
arrayOutput);
//Make sure the XSL transformation's result is piped 
through to FOP
Result res = new SAXResult(fop.getDefaultHandler());

Source src = new SAXSource(filter,new 
InputSource(buffInput));


StopWatch.setThreadEvent(PDF-transform-end-initialize1);
transformer.transform(src, res); 
StopWatch.setThreadEvent(PDF-transform-end-convert1);

a_res.setContentType(application/pdf);
a_res.setContentLength(arrayOutput.size());

// Send content to Browser

a_res.getOutputStream().write(arrayOutput.toByteArray());
// Send content to Browser
StopWatch.setThreadEvent(PDF-transform-end-write1);
a_res.getOutputStream().flush();
//buffOutput.flush();
StopWatch.setThreadEvent(PDF-transform-end-flush1);

} catch (Exception e) {
e.printStackTrace(System.err);
} finally {
arrayOutput.close();   
}


}


-- 
View this message in context: 
http://www.nabble.com/Performance-with-large-Tables-tf1858493.html#a5120795
Sent from the FOP - Users forum at Nabble.com.


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



[EMAIL PROTECTED]

2006-06-30 Thread tony schmidt
Help unsubscribe!  I've sent a mail to this address: 
[EMAIL PROTECTED] several times without 
success...




From: Jeremias Maerki [EMAIL PROTECTED]
Reply-To: fop-users@xmlgraphics.apache.org
To: fop-users@xmlgraphics.apache.org
Subject: Re: PDF Encrption problem
Date: Fri, 30 Jun 2006 10:10:55 +0100


On 30.06.2006 09:00:55 Chris Bowditch wrote:
 Singhal, Ramneek (Exchange) wrote:

  Hi
 
  I am able to create PDF with encryption. I think it was policy file
  problem. I installed RC4 providers as extension and it worked fine.
 
  Now I have another problem. I am embedding Time New Roman and Ariel
  fonts in generated PDF. If I create PDF with -noprint switch while 
open

  the generated PDF in Acrobet it complains that its not able to extract
  embedded fonts and all the text becomes garbage. Whereas without
  -noprint switch everthing works fine.

 I seem to remember that FOP 0.20.5 had a bug which mean encryption
 didn't work with custom fonts. This issue is fixed in 0.92beta, so why
 not upgrade?

Nonono, the problem is still not fixed. ToUnicode tables are still
missing. Patch available in Bugzilla but it is code snatched from FOray.
To apply that proper licensing has to be established.

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]



Possible memory leak

2006-06-30 Thread Karthik

Jermias,

Thanks for the input. I'll try the XML - FO file - PDF approach, but my
initial tests show that the FO file gets created without any issues and I
suspect the FO - PDF conversion has issue.


Meanwhile, I was trying to get a little into the performance issue and I noticed
that the memory consumed by the java process almost spikes by 400-500 gig and
also seems that it does'nt get released after the transformation is completed.
This is how I base my observation :

The java batch process runs on a 2 CPU server which has about 8GB RAM. The heap
size was set to 1 gig. Before running the process, the java virtual memory was
showing around 600MB, and right after the FOP process started, the memory went
all the way up to 1.3 gig and stayed there. The process concatenates every 500
xml's into 1 PDF (the 500 XML's themseves are available as a concatenated XML).
I tried initially with 2000 XML's, which should have produced 4 PDF's. I enabled
Garbage collection on Websphere and kept track of it when the job ran. What I
saw was, the amount of memory GC was able to clear and make available was
getting reduced slowly say from 25% initially to all the way down to 0% and
eventually in the middle of the last PDF creation, the process got terminated. 

Each of these XML's have tables and are about 2-3 pages in size. It also uses
barcode4j.

Below is the transformation code :

FopFactory fopFactory = getFopFactory();

private void transformXMLToPDF(FopFactory fopFactory, Source src, Source xslt,
File pdf, File foFile 
throws FOPException, TransformerException, IOException
{
OutputStream out = new java.io.FileOutputStream(pdf);
out = new java.io.BufferedOutputStream(out);

 
try {
Fop fop = getFop(fopFactory, out);
TransformerFactory factory = TransformerFactory.newInstance();
Transformer transformer = factory.newTransformer(xslt);
transformer.setParameter(print-mode, true);

Result res = new SAXResult(fop.getDefaultHandler());
 
transformer.transform(src, res);

logger.im(Completed transformation!);
fop = null;
} finally {
out.close();
}

}

private FopFactory getFopFactory()
{
// configure fopFactory
return FopFactory.newInstance();
}

private synchronized Fop getFop(FopFactory fopFactory, OutputStream out) throws
FOPException
{

// configure foUserAgent 
FOUserAgent foUserAgent = fopFactory.newFOUserAgent();

return (Fop)fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, out);

}  

I'm at FOP-0.92beta.

Please provide any suggestions. I'll work on the doing the process in 2 steps
and log my obervations.

Thanks
karthik


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



Re: Possible memory leak

2006-06-30 Thread Karthik
Karthik karthiketc at yahoo.com writes:
Sorry, this post was supposed to be a follow-up of Performance issue I posted
earlier.

Thanks
karthik



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



Re: Possible memory leak

2006-06-30 Thread J.Pietschmann

Karthik wrote:

The java batch process runs on a 2 CPU server which has about 8GB RAM. The heap
size was set to 1 gig. Before running the process, the java virtual memory was
showing around 600MB, and right after the FOP process started, the memory went
all the way up to 1.3 gig and stayed there.


The memory allocated to the JVM by the OS is not a reliable indicator
for Java memory leaks, JVM implementations tend to keep memory
allocations (as does basically every program which is supposed
to be used in general in a one-shot mode),
A peak indicating that the whole allowed heap size has actually
been allocated is not unusual for FOP while processing large
input.

J.Pietschmann

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