Re: FopServlet

2002-06-13 Thread Nirupama Yalavarti

Yes! I noticed that..because that was working fine
with netscape. and should work now with IEx too.
But I have programmed that the pdf is saved to
specific file(that is the way I want it) ie teh pdf
generated be saved as a specific file in the server.
But that doesnt seem to happen.I was expecting it to
be saved in tomcat/bin.
Any idea of setting something else for that?
Thanks
Nirupama

This what I have written:

ByteArrayOutputStream xslOut = new
ByteArrayOutputStream();
byte[] pdfOutData = doRenderPDF(xslOut);
 
   
response.setContentType("application/pdf");

response.setContentType("application/pdf;
name=\"test12.pdf\"");
response.setHeader("Content-Disposition",
"inline;filename=\"test12.pdf\"");
response.setContentLength(pdfOutData.length);

OutputStream resOut = response.getOutputStream();
resOut.write(pdfOutData);
resOut.close();



> In your browser? Look into the browser cache first.
> IEx is a bit fragile when it comes to showing PDF.
> Configure your webapp so that you can use an URL
> ending in .pdf for retrieving the PDF:
>   http://my.host/some/path/to/servlet.pdf
> or
>   
>
http://my.host/some/path/to/servlet.pdf?xml=foo.xml&xsl=foo.xsl&dummy=.pdf
> 
> More importantly, set the content type correctly
> to application/pdf, and buffer the PDF output in
> a ByteArrayOutputStream so that you can send the
> exact length to the browser (IEx will show a
> blank window if you fail to do this).
> 
> J.Pietschmann


=


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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




Re: FopServlet

2002-06-13 Thread J.Pietschmann

Nirupama Yalavarti wrote:
> Thats a great anwere...THE servlet seems to ahve run
> correctly( In fact it didnt show me any error..)
> But where can I find the produced pdf? any idea?

In your browser? Look into the browser cache first.
IEx is a bit fragile when it comes to showing PDF.
Configure your webapp so that you can use an URL
ending in .pdf for retrieving the PDF:
  http://my.host/some/path/to/servlet.pdf
or
   http://my.host/some/path/to/servlet.pdf?xml=foo.xml&xsl=foo.xsl&dummy=.pdf

More importantly, set the content type correctly
to application/pdf, and buffer the PDF output in
a ByteArrayOutputStream so that you can send the
exact length to the browser (IEx will show a
blank window if you fail to do this).

J.Pietschmann


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




Re: FopServlet

2002-06-13 Thread Nirupama Yalavarti

Thats a great anwere...THE servlet seems to ahve run
correctly( In fact it didnt show me any error..)
But where can I find the produced pdf? any idea?

--- "J.Pietschmann" <[EMAIL PROTECTED]> wrote:
> Nirupama Yalavarti wrote:
> > Hi all...
> > I am damn new to Tomcat  and Fop.Ive been trying
> to
> > sue Fop thru a servlet and was using the example
> > FopServlet of the examples/embedding. That minimal
> > thing itself doesnt seemt ot work and it geives me
> > errors..
> > Can anyone help me out...
> > It gives me the following errors...
> ...
> > java.lang.ClassNotFoundException:
> > javax.xml.transform.Transformer
> 
> The servlet's class loader can't find Xalan.
> 
> Are you using Tomcat 4.0.3? In this case, either
> copy
> the Xalan jar, fop.jar and batik.jar from the
> webapp's
> lib directory into Tomcat's lib directory, or
> upgrade
> to Tomcat 4.0.4b3.
> I think i've seen more detailed instructions in some
> Tomcat documentation.
> 
> Otherwise, check yout webapp's lib directory whether
> it
> contains all the jars from the FOP duirstribution's
> lib
> directory.
> 
> J.Pietschmann
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, email:
> [EMAIL PROTECTED]
> 


=


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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




Re: FopServlet

2002-06-13 Thread J.Pietschmann

Nirupama Yalavarti wrote:
> Hi all...
> I am damn new to Tomcat  and Fop.Ive been trying to
> sue Fop thru a servlet and was using the example
> FopServlet of the examples/embedding. That minimal
> thing itself doesnt seemt ot work and it geives me
> errors..
> Can anyone help me out...
> It gives me the following errors...
...
> java.lang.ClassNotFoundException:
> javax.xml.transform.Transformer

The servlet's class loader can't find Xalan.

Are you using Tomcat 4.0.3? In this case, either copy
the Xalan jar, fop.jar and batik.jar from the webapp's
lib directory into Tomcat's lib directory, or upgrade
to Tomcat 4.0.4b3.
I think i've seen more detailed instructions in some
Tomcat documentation.

Otherwise, check yout webapp's lib directory whether it
contains all the jars from the FOP duirstribution's lib
directory.

J.Pietschmann


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




FopServlet

2002-06-13 Thread Nirupama Yalavarti

Hi all...
I am damn new to Tomcat  and Fop.Ive been trying to
sue Fop thru a servlet and was using the example
FopServlet of the examples/embedding. That minimal
thing itself doesnt seemt ot work and it geives me
errors..
Can anyone help me out...
It gives me the following errors...
I badly need this to be worked out..
Any help is greatly appreciated.
Thanks
Nirupama


javax.servlet.ServletException:
javax.xml.transform.Transformer
at FopServlet.renderXML(FopServlet.java:96)
at FopServlet.doGet(FopServlet.java:62)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:446)
at
org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
at java.lang.Thread.run(Thread.java:484)


root cause 

org.apache.fop.apps.FOPException:
javax.xml.transform.Transformer
at
org.apache.fop.apps.XSLTInputHandler.getParser(XSLTInputHandler.java:107)
at FopServlet.renderXML(FopServlet.java:89)
at FopServlet.doGet(FopServlet.java:62)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:446)
at
org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at
org.apache.catalina.co

Re: SVG/SVG inclusion issue ?

2002-06-13 Thread J.Pietschmann

Dominique Broeglin wrote:
> When I add the doctype, it works. But I was not
> aware the doctype was mandatory, is it ?

Does this mean it worked after zou added the SVG DTD declaration?

>   What confuses me is the fact that batik reads b.svg correctly but FOP
> doesn't. But FOP delegates SVG handling to batik... Could you explain me
> if it's normal behaviour ?

Going into guess mode...
There are always issues with embedding other stuff. You don't
embed it wholesale. Command line applications often contain
additional logic for reading configurations and setting up
various stuff.
I suppose the XML parser used for parsing the SVG pointed
to by a fo:external-graphics is set up by FOP. If the SVG
includes antoher SVG, a new parser is set up, this time by
Batik. It is just possible that FOP's parser is correctly set
to non-validating, while the parser used by Batik uses Xerces
default, which is validating (I think. You use Xerces?). If so,
it falls over if there is no doctype declaration. Running a
Batik command line application might use a properly configured
parser factor.
There might be other issues, SVG had set some nasty precedents
by defining one or antoher important attribute default value
in the DTD (in particular the SVG namespace declaration), though
it is hard to see how a staand-alone Batik circumvents this.

J.Pietschmann


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




[ANNOUNCEMENT] FOP 0.20.4 Release Candidate available

2002-06-13 Thread Christian Geisert

Hi all,

the Release Candidate for 0.20.4 is available at
http://xml.apache.org/dist/fop for downloading and testing.

It is planed to make the actual release in about a week (or two?)
if no serious bugs show up.

Changes since 0.20.3 include:

- Support for background-image
- FOP should now work with any JAXP1.1 compliant parser/transformer
- The following JARs have been updated: Xerces to version 2.0.1, Xalan
   to version 2.3.1 and Batik to version 1.5beta2.
- Fop has been compiled with Jimi support
- Logging has been changed from LogKit to Avalon's Logger Interface
- New hyphenation patterns: turkish, portuguese and czech
- FOP should now work on a EBCDIC maschine
- Support for comma-separated values for the font-family property
- Russian and Czech messages for AWTViewer

For details see CHANGES file:
http://cvs.apache.org/viewcvs.cgi/xml-fop/CHANGES?rev=1.10.2.19


Feedback/bugreports are welcome especially (but of course not limited)
for the following issues:

- compiling FOP with Jdk1.4 under Windows
- running FOP on a EBCDIC maschine
- running FOP from Win98/ME command line
- processing FOP generated PDFs with RIP engines/preflight (?) tools
- custom font loading with BaseDir property


Needs to be done for the release:
- check documentation (new jar versions, classpath etc.)
- anything missing in Release Notes/CHANGES ?
  (apart from fixing my english ;-)


Enjoy,
Christian



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




cvs commit: xml-fop/src/org/apache/fop/datatypes ColorType.java

2002-06-13 Thread pbwest

pbwest  2002/06/13 08:16:24

  Modified:src/org/apache/fop/datatypes Tag: FOP_0-20-0_Alt-Design
ColorType.java
  Log:
  Modifier changes
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.15.2.3  +4 -4  xml-fop/src/org/apache/fop/datatypes/ColorType.java
  
  Index: ColorType.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/datatypes/ColorType.java,v
  retrieving revision 1.15.2.2
  retrieving revision 1.15.2.3
  diff -u -r1.15.2.2 -r1.15.2.3
  --- ColorType.java11 Jun 2002 14:17:42 -  1.15.2.2
  +++ ColorType.java13 Jun 2002 15:16:24 -  1.15.2.3
  @@ -268,7 +268,7 @@
* @return a float[4] containing the RGB information for
* that color.
*/
  -public static synchronized float[] getSystemColor(String name)
  +public static float[] getSystemColor(String name)
   throws PropertyException
   {
   float syscolor[];
  @@ -283,7 +283,7 @@
* name of the color.
* @return a float[4] array representing the normalized color.
*/
  -private static HashMap standardColors;
  +private static final HashMap standardColors;
   static {
   standardColors = new HashMap(16);
   standardColors.put
  @@ -328,7 +328,7 @@
* a reference to the array is returned.
* @return a float[4] array representing the normalized color.
*/
  -public static final HashMap systemColors;
  +private static final HashMap systemColors;
   static {
   systemColors = new HashMap();
   systemColors.put("aliceblue",
  
  
  

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




cvs commit: xml-fop/src/org/apache/fop/fo Properties.java

2002-06-13 Thread pbwest

pbwest  2002/06/13 08:08:52

  Modified:src/org/apache/fop/fo Tag: FOP_0-20-0_Alt-Design
Properties.java
  Log:
  Added Background shorthand support
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.2.4   +264 -6xml-fop/src/org/apache/fop/fo/Attic/Properties.java
  
  Index: Properties.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/Attic/Properties.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- Properties.java   9 Jun 2002 10:22:46 -   1.1.2.3
  +++ Properties.java   13 Jun 2002 15:08:52 -  1.1.2.4
  @@ -12,10 +12,14 @@
   
   import java.lang.Class;
   import java.util.Iterator;
  +import java.util.ListIterator;
   import java.util.HashMap;
   import java.util.Map;
   import java.util.LinkedList;
   import java.util.Collections;
  +
  +import org.apache.fop.messaging.MessageHandler;
  +
   import org.apache.fop.fo.PropertyConsts;
   import org.apache.fop.fo.FOTree;
   import org.apache.fop.fo.FObjects;
  @@ -37,6 +41,7 @@
   import org.apache.fop.datatypes.Bool;
   import org.apache.fop.datatypes.Literal;
   import org.apache.fop.datatypes.Auto;
  +import org.apache.fop.datatypes.None;
   import org.apache.fop.datatypes.Inherit;
   import org.apache.fop.datatypes.ColorType;
   import org.apache.fop.datatypes.FontFamilySet;
  @@ -582,6 +587,257 @@
   public static final int traitMapping = SHORTHAND_MAP;
   public static final int initialValueType = NOTYPE_IT;
   public static final int inherited = NO;
  +
  +/**
  + * 'value' is a PropertyValueList or an individual PropertyValue.
  + *
  + * 'value' can contain a parsed Inherit value or, in any order;
  + * background-color
  + * a parsed ColorType value, or an NCName containing one of
  + * the standard colors
  + * background-image
  + * a parsed UriType value, or a parsed None value
  + * background-repeat
  + * a parsed NCName containing a repeat enumeration token
  + * background-attachment
  + * a parsed NCName containing 'scroll' or 'fixed'
  + * background-position
  + * one or two parsed Length or Percentage values, or
  + * one or two parsed NCNames containing enumeration tokens
  + *
  + * The value(s) provided, if valid, are converted into a list
  + * containing the expansion of the shorthand.  The elements may
  + * be in any order.  A minimum of one value will be present.
  + *
  + *   a BackgroundColor ColorType or Inherit value
  + *   a BackgroundImage UriType, None or Inherit value
  + *   a BackgroundRepeat EnumType or Inherit value
  + *   a BackgroundAttachment EnumType or Inherit value
  + *   a BackgroundPositionHorizontal Numeric or Inherit value
  + *   a BackgroundPositionVertical Numeric or Inherit value
  + */
  +public static PropertyValue complex
  +(int property, PropertyValue value) throws PropertyException
  +{
  +if ( ! (value instanceof PropertyValueList)) {
  +return processValue(property, value);
  +} else {
  +return processList(property, (PropertyValueList)value);
  +}
  +}
  +
  +private static PropertyValueList processValue
  +(int property, PropertyValue value) throws PropertyException
  +{
  +PropertyValueList newlist = new PropertyValueList(property);
  +// Can be Inherit, ColorType, UriType, None, Numeric, or an
  +// NCName (i.e. enum token)
  +if (value instanceof Inherit) {
  +// Construct a list of Inherit values
  +newlist.add(new Inherit(
  +PropNames.BACKGROUND_COLOR));
  +newlist.add(new Inherit(
  +PropNames.BACKGROUND_IMAGE));
  +newlist.add(new Inherit(
  +PropNames.BACKGROUND_REPEAT));
  +newlist.add(new Inherit(
  +PropNames.BACKGROUND_ATTACHMENT));
  +newlist.add(new Inherit(
  +PropNames.BACKGROUND_POSITION_HORIZONTAL));
  +newlist.add(new Inherit(
  +PropNames.BACKGROUND_POSITION_VERTICAL));
  +return newlist;
  +} else  {
  +// Make a list an pass to processList
  +PropertyValueList tmpList = new PropertyValueList(property);
  +tmpList.add(value);
  +return processList(property, tmpList);
  +}
  +}
  +
  +pr

FOP Specialized Classloader: Request for Help (Was:RE: Fop and JDK1.2)

2002-06-13 Thread Rhett Aultman

Comments below.

-Original Message-
From: Peter B. West [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 13, 2002 10:17 AM
To: [EMAIL PROTECTED]
Subject: Re: Fop and JDK1.2


The discussion has thrown up some interesting points, and I hope to see 
Rhett get involved in this soon.

I hope also that the work Rhett is talking about will give us a solid 
framework for changes to our support framework, both with the JVM and 
possibly with the frequently changing jars that we bundle.  There may be 
other initiatives happening within Apache on that front.

>

I think a multiplexing classloader would give us a really serious boost with regard to 
flexibility.  This is going to be an extremely important issue not only as JVM 
versions become more important, but also as the differences between each vendor 
interpretation of the VM becomes apparrent.  By supplying a classloader that can, 
based on various properties, deduce the correct class to load, we can keep FOP's 
implementation disentangled from most of these concerns.

The actual act of selecting the correct location for loading a class is really not 
that hard, but a classloader that makes decisions for FOP is something that's going to 
also need someone with good experience in FOP development.  Currently, that person 
isn't me.  I think that maybe if I and someone who's a more core FOP developer could 
get together in private email we could get a good structure for this classloader 
hammered out.  From there, implementation of it would be pretty easy for me to handle.

So, is anyone game?  Like I said, I can write it, but if I design this thing in a 
vacuum, it may not be nearly as good as it could be.


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




Re: AW: image support

2002-06-13 Thread Keiron Liddle


I'm not certain but I think we cannot distribute JAI either for license
reasons.
>From a quick look it appears to have a similar license to jimi.

On Thu, 2002-06-13 at 15:24, J.U. Anderegg wrote:
> The good library is here: Java Advanced Imaging. In a few days I will have a
> sample PDF renderer using it.
> 
> o BMP, GIF, TIF, JPG, FPX, PNM and SVG are processed.
> o Immediate file operations: 1 image in memory at a time
> o caching, reuse by PDF features
> 
> 
> Hansuli Anderegg



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




Re: Fop and JDK1.2

2002-06-13 Thread Peter B. West

Christian (and Satoshi),

Thanks for clarifying this.  If nothing has changed in this respect from 
0.20.3, then nothing is going to break for any users who upgrade from 
0.20.3 to 0.20.4 (at least in this respect.)  No drama.

The discussion has thrown up some interesting points, and I hope to see 
Rhett get involved in this soon.

I hope also that the work Rhett is talking about will give us a solid 
framework for changes to our support framework, both with the JVM and 
possibly with the frequently changing jars that we bundle.  There may be 
other initiatives happening within Apache on that front.

I noticed again, following Satoshi's email, that we have no tags for 
RCs.  I think this is an oversight which should be addressed.  Are there 
plans to use the News page on the web-site to maintain a short history 
of releases and release candidates.  The sort of notes that appear in 
the release announcements could be collected there and serve as an 
immediate point of reference.

Peter

Christian Geisert wrote:
> Peter B. West schrieb:
> 
> Ok, I'll try to explain.
> 
> The standard fonts (times, courier etc.) are mapped fix to Java fonts
> (Serif, MonoSpaced etc. - which are actually truetype fonts I think).
> Additonal (truetype) fonts are loaded with a method in java.awt.Font
> which was first introduced in jdk1.3 (The font is loaded with the full
> path and not created with the name).
> While running under jdk1.2 the NoSuchMethodException is caught and one
> of the standard fonts will be used instead.
> This way it was already done in 0.20.3.
> 
> Hope this clarifys the issue a bit.
> 

-- 
Peter B. West  [EMAIL PROTECTED]  http://powerup.com.au/~pbwest
"Lord, to whom shall we go?"


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




Re: Image Cache issue - Latest Release after 0.20.3

2002-06-13 Thread Paul Reavis

> Athalye, Rishi wrote:
> > 
> > We are using fop 0.20.3 and it appears to be working fine for our 
> > purpose except for 1 major point. Caching of Images.
> 
> Yep, I was going to have a look at improving this, but haven't had the 
> time lately.
> 
> > I did read about some people coming up with a solution for "Image 
> > Caching" and also that it's a known issue.
> 
> There isn't a fix for it AFAIK, but you can turn off caching altogether 
> with a recompile. Comment out line 196 in FopImageFactory on the 
> maintenance branch like so:
> 
>// m_urlMap.put(href, imageInstance);
> 
> and recompile FOP.
> 
> Note that this will slow down rendering and increase short-term memory 
> usage if you use the same image multiple times in a document. It will 
> get worse the more you use the same image.
> 
> Unless someone comes up with an actual fix (or applies an existing fix 
> if there is one out there in the wild) sometime real soon now, then this 
> will still be a problem in the next release.
>
> Mike.

I ran into the same problem; I solved it in the current code by adding
a static method that clears the cache. I call this method before I run
fop. Unfortunately, the caching code in the stable assumes that you
are only calling fop once (e.g. from the command line) or, at least,
that external files aren't changing. This is also a big memory leak -
if you have a lot of large (in my experience, 1024x map pngs)
snapshots, and use different urls for each run, then each is loaded
into heap and the whole thing gets enormous.

-- 

Paul Reavis  [EMAIL PROTECTED]
Design Lead
Partner Software, Inc.http://www.partnersoft.com

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




Re: Problem printing using FOP 0.20.3

2002-06-13 Thread Jochen . Maes


did you set up your printer's properties to always print through the feed
in stead of the manual unless you say differentwise...
this is how i do it...
Jochen Maes
ICT Development


KBC Securities (kbcsecurities.com)
Havenlaan 12 Avenue du Port SIF 8683
B-1080 Brussels
Belgium

 Tel:  +32 2 429 96 81  

 GSM:  +32 496 57 90 99 

 E-mail :  [EMAIL PROTECTED] 





This message and any attachments hereto are for the named person's use
only. It may contain confidential, proprietary or legally privileged
information. You may not, directly or indirectly, use, disclose,
distribute, print, or copy any part of this message if you are not the
intended recipient. If you have received this e-mail message without being
the intended recipient, please notify KBC Securities promptly and delete
this e-mail. Any views expressed in this message are those of the
individual sender, except where the message states otherwise and the sender
is authorised to state them to be the views of KBC Securities. KBC
Securities reserves the right to monitor all e-mail communications through
its networks and any messages addressed to, received or sent by KBC
Securities or its employees are deemed to be professional in nature. The
sender or recipient of any messages to or of KBC Securities agrees that
those may be read by other employees of KBC Securities than the stated
recipient or sender in order to ensure the continuity of work-related
activities and allow supervision thereof. KBC Securities does not accept
liability for the correct and complete transmission of the information, nor
for any delay or interruption of the transmission, nor for damages arising
from the use of, or reliance on, the information.


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




Problem printing using FOP 0.20.3

2002-06-13 Thread Craig . Malton

Hello,

   I'm having a problem I can't figure out, hoping someone has done
this before.  I have a FOP program to do some printing from a Java.  I
created a Java Swing Applet that uses FOP to do the printing.  I am using
code out of FOP 0.20.3 distribution that is in org.apache.fop.apps.  I used
the same code in PrintStarter to do the printing.  The printing works fine
(the page looks as I would expect) but the really weird thing is that the
output from the print is going to the manual feed on my printer instead of
to the normal output bin.  What this means is each time I print I have to
walk over to the printer and manually feed in the pages to be
printed...obviously not a good solution :)  The same problem occurs when I
use the fop.bat program to do the printing instead of my program.  Has
anyone encountered anything like this before?  Any solutions would be
greatly appreciated.

Also I've tried doing this to multiple printers from multiple desktops.
The strange thing is that the text I'm printing prints fine, just wants to
go through the manual feed.  If I use Java print from a problem that
doesn't use the AWTRenderer then it goes to the correct feed.

Thanks,

Craig Malton



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




FOP perfomance and THANK YOU

2002-06-13 Thread Arnd Beißner

Jochen Maes' email has reminded me of something:

Some performance findings from my FOP PDF generation jobs (between 5.000 
and 50.000 PDFs per job):

Performance killers are:
- Images of any kind (but still better than SVG). A very small GIF image 
(black/white logo)
  can triple the rendering time of a 2-page document. This may be related 
to PDF output only - didn't check.
- SVG (high setup cost) - use images instead wherever possible
- Not enough main memory for a single job (yes, I have some 200 page-jobs
  that don't even fit within 1GB of main memory...). Rendering performance 
can
  drop to less than 1% once swapping begins, The Sun VM 1.3 seems to have
  a limit for -Xmx of 1GB. JRockit can be used instead.

Note that by "performance killer" I mean things that prevent FOP from 
generating more than 2-3 PDFs per
second on a moderately fast machine.

Interesting points and tips:
- TrueType font embedding did noch affect performance more than you would 
expect (i/o overhead)
- embedding FOP into the application helps a LOT. For most smaller 
documents, the VM setup costs
  are huge in proportion to the rendering time.
- For server use, I can recommend using the -server option for the SUN VM, 
though the performance
  increase was minor (<10%) for my test cases.
- I have found NO memory leaks of any kind while using FOP. For those 
jobs, where the document
  content is relative fixed (2-page with changes in text for each doc), my 
server can run days within
  the same VM instance, constantly formatting, producing 6000 PDFs per 
hour, with a maximum memory
  use of 25M (including VM). This is GOOD NEWS.

Summary of my FOP experience:
- some bugs/missing features (takes some time to find out which FO markup 
works and which doesn't)
- documents with lots (read: LOTS, like 200+x pages) of text can only be 
rendered with
   immense amount of main memory. This is probably being addressed in the 
redesign. Right now,
   it can be a real showstopper.

BUT

- good performance
- perfect stability in server use
- source code
- good and active development community (THANKS!)

So, overall, FOP developers:

Thank you for a great job.

Arnd Beissner
--
Cappelino Informationstechnologie GmbH
Arnd Beißner
Bahnhofstr. 3, 71063 Sindelfingen, Germany
Email: [EMAIL PROTECTED]
Phone: +49-7031-463458
Fax: +49-7031-463460
Mobile: +49-173-3016917


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




AW: image support (was: RE: Fop and JDK1.2 (using ant copy tasks toselect implementations))

2002-06-13 Thread J.U. Anderegg

The good library is here: Java Advanced Imaging. In a few days I will have a
sample PDF renderer using it.

o BMP, GIF, TIF, JPG, FPX, PNM and SVG are processed.
o Immediate file operations: 1 image in memory at a time
o caching, reuse by PDF features


Hansuli Anderegg



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




[GUMP] Build Failure - xml-fop

2002-06-13 Thread Sam Ruby


This email is autogenerated from the output from:



Buildfile: build.xml

init-avail:

init-filters-xalan2:
 [copy] Copying 1 file to /home/rubys/jakarta/xml-fop/build/src/codegen

init:
 [echo] --- Fop 1.0dev [1999-2002] 

prepare:
 [echo] Preparing the build directories
[mkdir] Created dir: 
/home/rubys/jakarta/xml-fop/build/src/org/apache/fop/fo/properties
[mkdir] Created dir: 
/home/rubys/jakarta/xml-fop/build/src/org/apache/fop/render/pdf/fonts
[mkdir] Created dir: /home/rubys/jakarta/xml-fop/build/src/org/apache/fop/svg
[mkdir] Created dir: /home/rubys/jakarta/xml-fop/build/classes/conf
[mkdir] Created dir: /home/rubys/jakarta/xml-fop/build/classes/hyph
 [copy] Copying 3 files to /home/rubys/jakarta/xml-fop/build/classes/conf

codegen:
 [echo] Resetting codegen directory
 [copy] Copying 30 files to /home/rubys/jakarta/xml-fop/build/src/codegen
 [echo] Generating the java files from xml resources
[style] Processing /home/rubys/jakarta/xml-fop/build/src/codegen/allprops.xml to 
/home/rubys/jakarta/xml-fop/build/src/org/apache/fop/fo/properties/Constants.java
[style] Loading stylesheet 
/home/rubys/jakarta/xml-fop/build/src/codegen/genconst.xsl
[style] Processing /home/rubys/jakarta/xml-fop/build/src/codegen/foproperties.xml 
to 
/home/rubys/jakarta/xml-fop/build/src/org/apache/fop/fo/properties/fo_ignore_this.java
[style] Loading stylesheet 
/home/rubys/jakarta/xml-fop/build/src/codegen/properties.xsl
[style] Processing /home/rubys/jakarta/xml-fop/build/src/codegen/foproperties.xml 
to 
/home/rubys/jakarta/xml-fop/build/src/org/apache/fop/fo/properties/FOPropertyMapping.java
[style] Loading stylesheet 
/home/rubys/jakarta/xml-fop/build/src/codegen/propmap.xsl
[style] Processing /home/rubys/jakarta/xml-fop/build/src/codegen/foproperties.xml 
to 
/home/rubys/jakarta/xml-fop/build/src/org/apache/fop/fo/properties/foenums_ignore_this.java
[style] Loading stylesheet 
/home/rubys/jakarta/xml-fop/build/src/codegen/enumgen.xsl
[style] Processing /home/rubys/jakarta/xml-fop/build/src/codegen/charlist.xml to 
/home/rubys/jakarta/xml-fop/build/src/org/apache/fop/render/pdf/CodePointMapping.java
[style] Loading stylesheet 
/home/rubys/jakarta/xml-fop/build/src/codegen/code-point-mapping.xsl
[style] Transforming into 
/home/rubys/jakarta/xml-fop/build/src/org/apache/fop/render/pdf/fonts
[style] Processing /home/rubys/jakarta/xml-fop/src/codegen/CourierBold.xml to 
/home/rubys/jakarta/xml-fop/build/src/org/apache/fop/render/pdf/fonts/CourierBold.java
[style] Loading stylesheet 
/home/rubys/jakarta/xml-fop/build/src/codegen/font-file.xsl
[style] Processing /home/rubys/jakarta/xml-fop/src/codegen/Courier.xml to 
/home/rubys/jakarta/xml-fop/build/src/org/apache/fop/render/pdf/fonts/Courier.java
[style] home/rubys/jakarta/xml-fop/build/src/codegen/font-file.xsl:0:0: Fatal 
Error! java.lang.RuntimeException: Programmer assertion is incorrect! - Namespace 
context can not be null! Cause: java.lang.RuntimeException: Programmer assertion is 
incorrect! - Namespace context can not be null!
[style] Failed to process /home/rubys/jakarta/xml-fop/src/codegen/Courier.xml

BUILD FAILED
/home/rubys/jakarta/xml-fop/build.xml:431: Fatal error during transformation

Total time: 27 seconds

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




Re: StringWarper - obfuscates XML files (was: For once Good news and athank you)

2002-06-13 Thread Jochen . Maes


I'll check it out and if i don't like it i'll make a new one :D



Jochen Maes
ICT Development


KBC Securities (kbcsecurities.com)
Havenlaan 12 Avenue du Port SIF 8683
B-1080 Brussels
Belgium

 Tel:  +32 2 429 96 81  

 GSM:  +32 496 57 90 99 

 E-mail :  [EMAIL PROTECTED] 





This message and any attachments hereto are for the named person's use
only. It may contain confidential, proprietary or legally privileged
information. You may not, directly or indirectly, use, disclose,
distribute, print, or copy any part of this message if you are not the
intended recipient. If you have received this e-mail message without being
the intended recipient, please notify KBC Securities promptly and delete
this e-mail. Any views expressed in this message are those of the
individual sender, except where the message states otherwise and the sender
is authorised to state them to be the views of KBC Securities. KBC
Securities reserves the right to monitor all e-mail communications through
its networks and any messages addressed to, received or sent by KBC
Securities or its employees are deemed to be professional in nature. The
sender or recipient of any messages to or of KBC Securities agrees that
those may be read by other employees of KBC Securities than the stated
recipient or sender in order to ensure the continuity of work-related
activities and allow supervision thereof. KBC Securities does not accept
liability for the correct and complete transmission of the information, nor
for any delay or interruption of the transmission, nor for damages arising
from the use of, or reliance on, the information.


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




RE: Image Cache issue - Latest Release after 0.20.3

2002-06-13 Thread Athalye, Rishi

Thanks a heap, Mike.
This solution worked. In any case, we do not need caching as we are not
reusing the same image in a
document.
Really appreciate it.

Rishi


Hi Rishi,

Athalye, Rishi wrote:
> 
> We are using fop 0.20.3 and it appears to be working fine for our 
> purpose except for 1 major point. Caching of Images.

Yep, I was going to have a look at improving this, but haven't had the 
time lately.

> I did read about some people coming up with a solution for "Image 
> Caching" and also that it's a known issue.

There isn't a fix for it AFAIK, but you can turn off caching altogether 
with a recompile. Comment out line 196 in FopImageFactory on the 
maintenance branch like so:

   // m_urlMap.put(href, imageInstance);

and recompile FOP.

Note that this will slow down rendering and increase short-term memory 
usage if you use the same image multiple times in a document. It will 
get worse the more you use the same image.

Unless someone comes up with an actual fix (or applies an existing fix 
if there is one out there in the wild) sometime real soon now, then this 
will still be a problem in the next release.

Mike.

-- 
Michael Gratton <[EMAIL PROTECTED]>
Recall Design 
s: 53 Gilbert Street Adelaide SA 5000 Australia
t: +61 8 8217 0500 f: +61 8 8217 0555

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




StringWarper - obfuscates XML files (was: For once Good news and a thank you)

2002-06-13 Thread Bertrand Delacretaz

On Thursday 13 June 2002 14:51, Ralph LaChance wrote:
> ooo, I could use that !

You'll find it at
http://codeconsult.ch/download/string-warper/string-warper-2002-06-13.zip

There's a build.xml for ant, target "test" runs a self-test.

Actually I should have said "a piece of java hacking". You'll see that it's 
dead simple, doesn't even use a proper parser. 

Which means it might *destroy* some XML files depending on the constructs 
used. Please let me know if you make it better (wellthatsnothard)!

-Bertrand

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




Re: For once Good news and a thank you

2002-06-13 Thread Ralph LaChance

At 08:42 AM 6/13/02, you wrote:
>If needed, I can send you a piece of java code that obfuscates the text of
>XML files by replacing all words with others from a list, so that the
>confidentiality of your data would be preserved.

ooo, I could use that !



 ' Best,
 -Ralph LaChance



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




Re: For once Good news and a thank you

2002-06-13 Thread Bertrand Delacretaz

Hi Jochen,

Would it be thinkable for you to share examples of your XSL-FO documents, as 
good examples of what works well in FOP?

The question of which constructs to use to get good performance come often, 
so I think it would be a worthwile addition to the project.

If needed, I can send you a piece of java code that obfuscates the text of 
XML files by replacing all words with others from a list, so that the 
confidentiality of your data would be preserved.

Please let us know what you think!

-- 
 Bertrand Delacrétaz (codeconsult.ch, jfor.org)

 buzzwords: XML, java, XSLT, cocoon, mentoring/teaching/coding.
 disclaimer: eternity is very long. mostly towards the end. get ready.






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




[REDESIGN] inline objects

2002-06-13 Thread Keiron Liddle

Hi Karen,

I am trying to put in the support for inline objects (other than text)
and I have managed to get it generally working.
There are some cases where exceptions occur due to the handling of
m_prevBP in the line layout manager. It seems if this is null then it
causes all sorts of trouble. This can happen if there is only one inline
object on the line. I also get an infinite loop if the object is larger
than the line ipd. I'm not sure how to solve these things properly. Have
you looked at these problems, should I try to fix them.

How soon will the block layout stuff be there?
I want to be able to get some of the inline things going, like leader,
image, ifo.

Regards,
Keiron




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




image support (was: RE: Fop and JDK1.2 (using ant copy tasks toselect implementations))

2002-06-13 Thread Keiron Liddle

On Thu, 2002-06-13 at 11:05, Rob Smith wrote:
> Everyone who needs PNG support?

Batik has a png decoder, a png encoder, a tiff encoder and a tiff
decoder.
While we are stuck with a obselete library that we can't distribute.

If only there was a good image library that we could use and distribute.



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




RE: Fop and JDK1.2 (using ant copy tasks to select implementations)

2002-06-13 Thread Rob Smith

> From: Rhett Aultman [mailto:[EMAIL PROTECTED]]
> How many of FOP's 
> users built FOP from scratch and thus used ant? It's not
> entirely necessary, especially if you're not a FOP developer.

Everyone who needs PNG support?

--
Rob Smith


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




Re: Image Cache issue - Latest Release after 0.20.3

2002-06-13 Thread Keiron Liddle

Hi Rishi,

The changes to the image caching you are referring to are in the
redesign code and not in the maintenance branch where releases are
currently coming from.
Unfortunately that code won't help you if you need it soon.


On Thu, 2002-06-13 at 00:48, Athalye, Rishi wrote:
> Hi,
> 
> We are using fop 0.20.3 and it appears to be working fine for our purpose
> except for 1 major point.
> Caching of Images.
> Here's what I am doing :-
> Based on the program logic, I am creating multiple PDF documents applying
> the same XSL but different XML data feeds.
> If I am not mistaken, in an XSL using FO, there's no way to pass a parameter
> to the fo:external-graphic, thereby having a dynamic filename and path. (if
> anyone has done that, I would appreciate your tips)
> This is what we use.
> 
> The base directory for each document is also different and that's set during
> program execution of each file.
> Program works fine, but, all 20 documents get the same images (i.e. the 1st
> document's).
> I did read about some people coming up with a solution for "Image Caching"
> and also that it's a known issue.
> How can I get the latest code with the bug fix. I tried building from the
> CVS snapshot, but I got some errors.
> Is there a build I can get from some location which works. I also saw there
> are significant differences now in the 
> ImageFactory Class implementation. So it's difficult for me to modify the
> code for our purpose.
> When is the next release going to happen ? We are going live shortly, hence
> would like to know our options.
> Sorry for the questions, but I am under a lot of pressure.
> I would appreciate any help in this direction.
> 
> Rishi



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




Re: Fop and JDK1.2

2002-06-13 Thread Christian Geisert

Peter B. West schrieb:
> Can anyone answer the questions below?  Hopefully, before the release.

Ok (building the RC atm ;-)

> I think we need to discuss these issues in more depth.  We have people 
> using FOP in production, and, in spite of the fact that everyone is 
> aware that FOP is pre-beta, and that everything about it is subject to 
> change, we should show some concern for issues which impact production 
> environments.  There is not an immediate necessity to publish 0.20.4; it 
> can be delayed a little while we try to find out more about these issues.
> 
> Further to one of my points below: if TT fonts are not supported in AWT 
> in 0.20.3, then the proposed interim solution of compiling with 1.3 and 
> notifying users that TT fonts will not work with 1.2 looks OK.

Ok, I'll try to explain.

The standard fonts (times, courier etc.) are mapped fix to Java fonts
(Serif, MonoSpaced etc. - which are actually truetype fonts I think).
Additonal (truetype) fonts are loaded with a method in java.awt.Font
which was first introduced in jdk1.3 (The font is loaded with the full
path and not created with the name).
While running under jdk1.2 the NoSuchMethodException is caught and one
of the standard fonts will be used instead.
This way it was already done in 0.20.3.

Hope this clarifys the issue a bit.

> Peter

Christian


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