Re: Concurrent modification exception getting an instance of ICC_Profile

2011-02-01 Thread Julien Aymé
Hi Andreas,

You're right, I had forgotten that this was an AWT issue, and we
should be the one to fix the issue.
So thanks for the patch :-)

Julien

2011/2/1 Andreas Delmelle andreas.delme...@telenet.be:
 On 31 Jan 2011, at 10:38, Julien Aymé wrote:

 Hi Alexios, Julien,

 2011/1/31 Alexios Giotis alex.gio...@gmail.com:

 Any ideas why calling java.awt.color.ICC_Profile.getInstance() throws 
 java.util.ConcurrentModificationException ?

 It seems that you just found out a race condition in
 ProfileDeferralMgr.
 snip /

 I don't think it was meant for concurrent usage, but could be wrong. I was 
 always under the impression that AWT expects the calling code to synchronize 
 wherever appropriate. We have noticed similar issues in the past, with the 
 AWT font-related classes.
 AFAIK, AWT makes no claim whatsoever about being thread-safe, so the issue 
 should be fixed on our end.

 It seems that a similar issue was encountered an fixed in Fop 0.95:
 http://www.mail-archive.com/fop-dev@xmlgraphics.apache.org/msg11808.html

 Maybe we should check where ICC_Profile.getInstance is used on FOP
 codebase and synchronize this method (sync on ICC_Profile.class ?)

 IIC, the issue here arises from within XMLGraphics. There are, however, still 
 two distinct places in FOP's code that can trigger the issue 
 (ColorSpaceCache.getString() and PDFRenderingUtil.addDefaultOutputProfile()). 
 Those, I have taken care of in the patch attached to Bugzilla 50698 
 (https://issues.apache.org/bugzilla/show_bug.cgi?id=50698), which will likely 
 find its way into Trunk soon.

 A similar fix would still need to make it into XMLGraphics in order to avoid 
 the race condition in this particular case.


 Regards

 Andreas
 ---


 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Concurrent modification exception getting an instance of ICC_Profile

2011-01-31 Thread Julien Aymé
It seems that you just found out a race condition in
ProfileDeferralMgr. (A quick view on any decompiler show that a race
condition can occur when :
- Thread A enters registerDeferral, deferring is still true, thread A
checks !deffering -OK
- Thread B enters activateProfiles, set deferring to false, calls
vector.iterator()
- Thread A adds new ProfileActivator in the vector
- Thread B calls iterator.next() - CME

It seems that a similar issue was encountered an fixed in Fop 0.95:
http://www.mail-archive.com/fop-dev@xmlgraphics.apache.org/msg11808.html

Maybe we should check where ICC_Profile.getInstance is used on FOP
codebase and synchronize this method (sync on ICC_Profile.class ?)

You could try to submit a bug to sun bug database, since there is no
indication that ICC_Profile.getInstance is not thread-safe (at least
it could be documented) :-)

HTH,
Julien

2011/1/31 Alexios Giotis alex.gio...@gmail.com:
 Hi,

 I occasionally get the exception below using java version 1.6.0_21, 64-Bit 
 Server VM and FOP 1.0 to transform FOP intermediate format to Postscript with 
 more than one threads. Of course, each thread uses a new instance of 
 org.apache.fop.render.intermediate.util.IFConcatenator. Any ideas why calling 
 java.awt.color.ICC_Profile.getInstance() throws 
 java.util.ConcurrentModificationException ?


 Caused by: java.util.ConcurrentModificationException
 at java.util.AbstractList$Itr.checkForComodification(Unknown Source)
 at java.util.AbstractList$Itr.next(Unknown Source)
 at sun.awt.color.ProfileDeferralMgr.activateProfiles(Unknown Source)
 at java.awt.color.ICC_Profile.getInstance(Unknown Source)
 at 
 org.apache.xmlgraphics.image.loader.impl.ImageLoaderRawJPEG.buildICCProfile(ImageLoaderRawJPEG.java:236)
 at 
 org.apache.xmlgraphics.image.loader.impl.ImageLoaderRawJPEG.loadImage(ImageLoaderRawJPEG.java:198)
 at 
 org.apache.xmlgraphics.image.loader.pipeline.ImageProviderPipeline.execute(ImageProviderPipeline.java:154)
 at 
 org.apache.xmlgraphics.image.loader.pipeline.ImageProviderPipeline.execute(ImageProviderPipeline.java:99)
 at 
 org.apache.xmlgraphics.image.loader.ImageManager.getImage(ImageManager.java:268)
 at 
 org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingImageHandler(AbstractIFPainter.java:143)
 at 
 org.apache.fop.render.ps.PSPainter.drawImageUsingImageHandler(PSPainter.java:167)
 at 
 org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingURI(AbstractIFPainter.java:270)
 at org.apache.fop.render.ps.PSPainter.drawImage(PSPainter.java:185)
 at 
 org.apache.fop.render.intermediate.IFParser$Handler$ImageHandler.endElement(IFParser.java:676)
 at 
 org.apache.fop.render.intermediate.IFParser$Handler.endElement(IFParser.java:352)
 at 
 org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1102)
 at org.xml.sax.helpers.XMLFilterImpl.endElement(Unknown Source)
 at 
 com.idocs.export2.placeholder.PlaceholderFilter.endElement(PlaceholderFilter.java:61)
 at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
 at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown 
 Source)
 at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown 
 Source)
 at 
 org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
  Source)
 at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
 Source)
 at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
 at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
 at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
 at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
 at org.xml.sax.helpers.XMLFilterImpl.parse(Unknown Source)
 at 
 org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)
 at org.apache.fop.render.intermediate.IFParser.parse(IFParser.java:104)
 at 
 org.apache.fop.render.intermediate.util.IFConcatenator.appendDocument(IFConcatenator.java:102)



 Thanks,
 Alexis Giotis
 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: font-substitution -FOP1.0

2010-11-04 Thread Julien Aymé
Hi,

I've had such a bug once, which has not been fixed in trunk yet:
FOP Bug #49301
https://issues.apache.org/bugzilla/show_bug.cgi?id=49301

There is an error in code which prevents user from finding a Font with
weight: 700.

HTH,
Regards,

Julien

2010/11/4 Varra, Mamatha mv...@allstate.com:
 Hi Eric,



 Thanks for ur quick reply.

 We are using custom fonts. Normally we use font-family-serif for all pdfs,
 and we use normal font,bold and italic styles.



 Thanks,

 Mamatha.



 

 From: Eric Douglas [mailto:edoug...@blockhouse.com]
 Sent: Thursday, November 04, 2010 12:22 PM
 To: fop-users@xmlgraphics.apache.org
 Subject: RE: font-substitution -FOP1.0



 Are you supplying custom fonts or using auto-detect?  Do you have the other
 font?  Typically normal font and bold font are in separate files.



 

 From: Varra, Mamatha [mailto:mv...@allstate.com]
 Sent: Thursday, November 04, 2010 8:08 AM
 To: fop-users@xmlgraphics.apache.org
 Subject: font-substitution -FOP1.0

 Hi All,

 We are upgrading fop 0.95 to 1.0 versions. I could generate the PDF as
 expected but I could see some warnings related to font-substitution in my
 console. I tried to figure out, but couldn’t. Does anyone have seen these
 warnings? Your help is greatly appreciated.

 Console warnings:

 FOUserAgent   W org.apache.fop.events.LoggingEventListener processEvent Font
 Symbol,normal,700 not found. Substituting with Symbol,normal,400.

 FOUserAgent   W org.apache.fop.events.LoggingEventListener processEvent Font
 ZapfDingbats,normal,700 not found. Substituting with
 ZapfDingbats,normal,400.

 Thanks,

 Mamatha.

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: FOP Output Stream

2010-09-07 Thread Julien Aymé
Hello,

you might want to use a temp file first, and then, send the data to
the client using a serialization trick in which you don't have to load
the whole file in memory before serializing the object.
I've attached a .java file which shows how to achieve that.

HTH,

Regards,
Julien


2010/9/6 Jeremias Maerki d...@jeremias-maerki.ch:
 With such an API, you probably don't have a choice but to use a single
 byte array, unless you can send over ordered chunks.

 On 02.09.2010 15:10:43 Eric Douglas wrote:
 I'm not sure.  It's embedded code.  I'm guessing they're using sockets.  I'm 
 just calling cloneAsClientObject.
 http://www.basis.com/onlinedocs/documentation/sysguimethods5/bbjapi_cloneasclientobject.htm


 -Original Message-
 From: Julien Aymé [mailto:julien.a...@gmail.com]
 Sent: Thursday, September 02, 2010 8:39 AM
 To: fop-users@xmlgraphics.apache.org
 Subject: Re: FOP Output Stream

 Hello,

 How do you send the generated output from the server to the client?
 If you're sending bytes through a Socket, then a SocketOutputStream is the 
 best way (use Socket#getOutputStream).
 If you're saving the bytes into a temp file, then you could use a 
 FileOutputStream.

 (Both of them must be wrapped in a BufferedOutputStream for better 
 performances).

 HTH,

 Regards,
 Julien

 2010/9/2 Eric Douglas edoug...@blockhouse.com:
  So, a BufferedOutputStream is better if you're going to produce output on 
  the same machine, or is there a better way of doing what I'm doing?
 
  I use a ByteArrayOutputStream because I am running the program on the 
  server.  That's where I generate my XML input and where I do the 
  transform.  Then I need to copy the output to the client PC (running 
  embedded code in webstart) because that's where I do all the output.
  I currently don't have the printers set up on the server, we use client 
  printers.  I prefer to create the PDF directly on the client rather than 
  save it to the server then copy it down.  Of course the print preview, 
  using the FOP PreviewPanel, must be run on the client.
  I don't see any method in BufferedOutputStream to get the bytes, and it 
  doesn't appear to be serializable, so a ByteArrayOutputStream seemed the 
  best logical output.
 
  -Original Message-
  From: Jeremias Maerki [mailto:d...@jeremias-maerki.ch]
  Sent: Thursday, September 02, 2010 7:13 AM
  To: fop-users@xmlgraphics.apache.org
  Subject: Re: fonts URL resolution
 
  Le 01/09/2010 17:55, Eric Douglas a écrit :
   I don't know about a simple solution but there is a workaround.
   I solved this or a related issue by not using the setFontBaseURL method.
   I use the Renderer.setFontList method instead to manually load in
   the custom font(s).
   Is there a point to using a BufferedOutputStream?  I use a
   ByteArrayOutputStream, so I have the output in bytes so I can copy
   it from server to client.
 
  Yes. A ByteArrayOutputStream buffers the whole stream in memory which can 
  cause problems if you deal with bigger documents. A BufferedOutputStream 
  allows maximum performance with only minimal memory consumption. It will 
  even be faster than the ByteArrayOutputStream because at least the Sun 
  implementation reallocates bigger and bigger chunks of memory and has to 
  copy the whole content of the old buffer over to the new one. At least the 
  implementation I wrote for Apache Commons IO doesn't do the copying but 
  only allocates additional buffers.
  Still, the memory problem remains.
 
 
  Jeremias Maerki
 
 
  -
  To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
  For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
 
 

 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org


 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org





 Jeremias Maerki


 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org




DeferedSerializableStream.java
Description: Binary data

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org

Re: FOP Output Stream

2010-09-02 Thread Julien Aymé
Hello,

How do you send the generated output from the server to the client?
If you're sending bytes through a Socket, then a SocketOutputStream is
the best way (use Socket#getOutputStream).
If you're saving the bytes into a temp file, then you could use a
FileOutputStream.

(Both of them must be wrapped in a BufferedOutputStream for better
performances).

HTH,

Regards,
Julien

2010/9/2 Eric Douglas edoug...@blockhouse.com:
 So, a BufferedOutputStream is better if you're going to produce output on the 
 same machine, or is there a better way of doing what I'm doing?

 I use a ByteArrayOutputStream because I am running the program on the server. 
  That's where I generate my XML input and where I do the transform.  Then I 
 need to copy the output to the client PC (running embedded code in webstart) 
 because that's where I do all the output.
 I currently don't have the printers set up on the server, we use client 
 printers.  I prefer to create the PDF directly on the client rather than save 
 it to the server then copy it down.  Of course the print preview, using the 
 FOP PreviewPanel, must be run on the client.
 I don't see any method in BufferedOutputStream to get the bytes, and it 
 doesn't appear to be serializable, so a ByteArrayOutputStream seemed the best 
 logical output.

 -Original Message-
 From: Jeremias Maerki [mailto:d...@jeremias-maerki.ch]
 Sent: Thursday, September 02, 2010 7:13 AM
 To: fop-users@xmlgraphics.apache.org
 Subject: Re: fonts URL resolution

 Le 01/09/2010 17:55, Eric Douglas a écrit :
  I don't know about a simple solution but there is a workaround.
  I solved this or a related issue by not using the setFontBaseURL method.
  I use the Renderer.setFontList method instead to manually load in
  the custom font(s).
  Is there a point to using a BufferedOutputStream?  I use a
  ByteArrayOutputStream, so I have the output in bytes so I can copy
  it from server to client.

 Yes. A ByteArrayOutputStream buffers the whole stream in memory which can 
 cause problems if you deal with bigger documents. A BufferedOutputStream 
 allows maximum performance with only minimal memory consumption. It will even 
 be faster than the ByteArrayOutputStream because at least the Sun 
 implementation reallocates bigger and bigger chunks of memory and has to copy 
 the whole content of the old buffer over to the new one. At least the 
 implementation I wrote for Apache Commons IO doesn't do the copying but only 
 allocates additional buffers.
 Still, the memory problem remains.


 Jeremias Maerki


 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: unable to use afp:resource-level=external for fo:external-graphic

2010-08-17 Thread Julien Aymé
Hi,

Could you provide the full stack trace, so that we can investigate the code?

Thanks,

Julien

2010/8/17 Mrutyunjay Sahasrabudhe mruts...@techmahindra.com:
 Hi,

 I am using FOP 1.0 version.

 I am trying to use the afp:resource-level=external for fo:external-graphic
 but getting an exception as below:

 java.lang.ClassCastException: java.util.HashMap$Entry cannot be cast to
 org.apache.fop.afp.modca.StreamedResourceGroup

 I did check replies on a similar query posted earlier and ensured that the
 user running FOP does have write persmissions to the file/directory where the
 external resource file is expected to be created.

 It would be really great if you could help here.

 Thanks  regards,
 Mrutyunjay


 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: unable to use afp:resource-level=external for fo:external-graphic

2010-08-17 Thread Julien Aymé
Hi Pete,

you're right, there is a bug there (line 161 on trunk), but it is not
fixed yet (on trunk, rev 986204).

Regards,
Julien

2010/8/17 Peter Hancock peter.hanc...@gmail.com:
 Hi,
 There is a bug in src/java/org/apache/fop/afp/AFPStreamer.java around line 
 160:
  Iterator it = pathResourceGroupMap.entrySet().iterator();
 should be
  Iterator it = pathResourceGroupMap.values().iterator();

 I think I fixed this is a patch I submitted recently.  Let me check..

 Pete

 On Tue, Aug 17, 2010 at 11:24 AM, Julien Aymé julien.a...@gmail.com wrote:
 Hi,

 Could you provide the full stack trace, so that we can investigate the code?

 Thanks,

 Julien

 2010/8/17 Mrutyunjay Sahasrabudhe mruts...@techmahindra.com:
 Hi,

 I am using FOP 1.0 version.

 I am trying to use the afp:resource-level=external for 
 fo:external-graphic
 but getting an exception as below:

 java.lang.ClassCastException: java.util.HashMap$Entry cannot be cast to
 org.apache.fop.afp.modca.StreamedResourceGroup

 I did check replies on a similar query posted earlier and ensured that the
 user running FOP does have write persmissions to the file/directory where 
 the
 external resource file is expected to be created.

 It would be really great if you could help here.

 Thanks  regards,
 Mrutyunjay


 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Please delete my messages of today on mailing list

2010-08-17 Thread Julien Aymé
Hello Andrejus,

Unfortunately, I don't think this is possible (this mailing list
redirects all its mail to each user who subscribed it).
You can just apologize to the mailing list and tell people to ignore the noise.


Regards,
Julien

2010/8/17 Andrejus Chaliapinas a.chaliapi...@infosana.com:
 Hi,



 Sorry, I’ve posted today message to incorrect place – please delete it on
 your server ASAP.



 Thank you,

 Andrejus

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re:

2010-08-17 Thread Julien Aymé
Andrejus sent two mails to the wrong address (fop-users mailing list),
so please just ignore them.

Regards,
Julien

2010/8/17 Eric Douglas edoug...@blockhouse.com:
 Please be more specific.
 
 From: Andrejus Chaliapinas [mailto:a.chaliapi...@infosana.com]
 Sent: Tuesday, August 17, 2010 8:06 AM
 To: fop-users@xmlgraphics.apache.org
 Subject:

 help

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Please delete my messages of today on mailing list

2010-08-17 Thread Julien Aymé
I think that the archives uses the same mechanism (they subscribed to
this list).
I found these:
http://www.mail-archive.com/fop-users@xmlgraphics.apache.org/
http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-users/
http://old.nabble.com/FOP---Users-f353.html

I don't know how to remove messages from these archives.


2010/8/17 Eric Douglas edoug...@blockhouse.com:
 But does it save all mail sent to the list in an archive?

 -Original Message-
 From: Julien Aymé [mailto:julien.a...@gmail.com]
 Sent: Tuesday, August 17, 2010 8:14 AM
 To: fop-users@xmlgraphics.apache.org; a.chaliapi...@infosana.com
 Subject: Re: Please delete my messages of today on mailing list

 Hello Andrejus,

 Unfortunately, I don't think this is possible (this mailing list redirects 
 all its mail to each user who subscribed it).
 You can just apologize to the mailing list and tell people to ignore the 
 noise.


 Regards,
 Julien

 2010/8/17 Andrejus Chaliapinas a.chaliapi...@infosana.com:
 Hi,



 Sorry, I've posted today message to incorrect place - please delete it
 on your server ASAP.



 Thank you,

 Andrejus

 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org


 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: Minimising FOP footprint...

2010-07-26 Thread Julien Aymé
2010/7/26 Jeremias Maerki d...@jeremias-maerki.ch:
 On 24.07.2010 01:13:01 Bernard Giannetti wrote:

 Hi,

 I've noticed there's a lot of 3rd party JAR files bundled with FOP 1.0, 
 notably:

 avalon-framework-4.2.0.jar
 batik-all-1.7.jar
 commons-io-1.3.1.jar
 commons-logging-1.0.4.jar
 serializer-2.7.0.jar
 xalan-2.7.0.jar
 xercesImpl-2.7.1.jar
 xml-apis-1.3.04.jar
 xml-apis-ext-1.3.04.jar
 xmlgraphics-commons-1.3.1.jar

 and was wondering how many do I actually need?  If all I'm doing is
 using FOP to render an XML file using XSL template to a PDF, is there a
 way to trim out the unwanted JARs?

 Batik is supposed to be optional but I'm not sure that it'll work
 properly without it. If you're not using SVG, try to omit it. If it
 works, you're fine. xml-apis-ext should be optional, too, if Batik is
 out of the picture. Xerces, Xalan, Serializer and xml-apis are not
 strictly required but some JDKs have buggy XML parsers or XSLT
 implementations so I always use my own verified JARs. The other JARs are
 mandatory.


You can try to use the smaller module jar from batik (I only need
batik-awt-util.jar) to reduce the overall footprint.
(You can build these jars with the target jars of Batik's Ant build).
Also, I think that FOP 1.0 uses xmlgraphics-commons 1.4 (instead of 1.3.1).

HTH,
Regards,
Julien

 I can do a clean compile of my application, minus the JARs above listed
 in the classpath.  If I can the run my application and exercise the FOP
 part of it, does that tell me which JARs I can drop or am I being too
 naive?

 In the end, just omit one of the ones I've listed and check if it works
 without. Trial  Error. ;-) If you get a ClassDefNotFoundError, you're
 missing a JAR.

 On a somewhat related note, in doing an ANT build and setting the compiler 
 args as follows:

 compilerarg value=-Xlint:deprecation,fallthrough,finally,path,unchecked /

 I get a few path warnings:

     [javac] warning: [path] bad path element /lib/fop-hyph.jar: no such 
 file or directory
     [javac] warning: [path] bad path element /lib/xml-apis.jar: no such 
 file or directory
     [javac] warning: [path] bad path element /lib/xercesImpl.jar: no such 
 file or directory
     [javac] warning: [path] bad path element /lib/serializer.jar: no such 
 file or directory
     [javac] warning: [path] bad path element /lib/log4j.jar: no such file 
 or directory

 So are these old manifest entries that have not been updated to the new 
 versions?  Can I safely remove these from the mainfests in the FOP JAR files?

 These were used solely for running FOP from the command-line. The
 classpath there is outdated and can be removed. Basically, we should
 remove it from FOP altogether, I think, since practically everyone uses
 our batch scripts if they run FOP from the command-line. Plus there is
 code in FOP, that constructs the classpath in code, rather than from the
 Manifest.


 Thanks,

 Bernard.


 Jeremias Maerki


 -
 To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



Re: [fop 0.95] OutOfMemory with big font

2010-05-13 Thread Julien Aymé
Hi,

fop internally loads the font in memory, so if you use a huge font
file, as you do in your example, you may have OutOfMemoryError, since
the file does not fit into the available memory.
Did you try rising your max JVM memory ?

Try to add the following argument in your launcher, or a higher value
if required.
-Xmx512m

Regards,
Julien

2010/5/12 palmelas kaf_a...@hotmail.com:
 Dear All,
 I'm getting the following error when I'm trying to use a biggest font (20Mo)
 in fop 0.95 configuration file :

 ava.lang.OutOfMemoryError: Java heap space at
 org.apache.commons.io.output.ByteArrayOutputStream.toByteArray(ByteArrayOutputStream.java:271)
 at org.apache.commons.io.IOUtils.toByteArray(IOUtils.java:219) at
 org.apache.fop.fonts.truetype.FontFileReader.init(FontFileReader.java:45) at
 org.apache.fop.fonts.truetype.FontFileReader.(FontFileReader.java:74) at
 org.apache.fop.fonts.truetype.TTFFontLoader.read(TTFFontLoader.java:57) at
 org.apache.fop.fonts.FontLoader.getFont(FontLoader.java:164) at
 org.apache.fop.fonts.FontLoader.loadFont(FontLoader.java:113) at
 org.apache.fop.fonts.LazyFont.load(LazyFont.java:126) at
 org.apache.fop.fonts.LazyFont.getAscender(LazyFont.java:233) at
 org.apache.fop.fonts.Font.getAscender(Font.java:96) at
 org.apache.fop.layoutmgr.BlockLayoutManager.initialize(BlockLayoutManager.java:87)
 at
 org.apache.fop.layoutmgr.AbstractLayoutManager.getChildLM(AbstractLayoutManager.java:118)
 at
 org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:271)
 at
 org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:116)
 at
 org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLayoutManager.java:107)
 at
 org.apache.fop.layoutmgr.PageBreaker.getNextKnuthElements(PageBreaker.java:145)
 at
 org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockList(AbstractBreaker.java:552)
 at
 org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java:137)
 at
 org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:302)
 at
 org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:264)
 at
 org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:106)
 at
 org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:234)
 at
 org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:123)
 at
 org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:340)
 at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:169) at
 org.apache.xml.serializer.ToXMLSAXHandler.endElement(ToXMLSAXHandler.java:261)
 at
 org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1399)
 at
 org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)
 at
 org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1374)
 at
 org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:393)
 at
 org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:176)
 at
 org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411)


 It is a limit of fop 0.95?


 if yes, how can i display correctly chinese caracteres on PDF with fop 0.95?

 Thanks,
 Pam
 
 View this message in context: [fop 0.95] OutOfMemory with big font
 Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org