PDF in a JSP ... searching alternative way

2002-06-20 Thread Massimiliano Cuccia

I want to produce a pdf in a jsp, so I have a string fo that contains the fo
instructions ...
I had found this code to output the pdf directily in the browser
  Driver driver = new Driver(new InputSource(new
StringBufferInputStream(fo)), response.getOutputStream());

and it's OK, there is another way to do that task?
I don't want to pass the response.getOutputStream() actual parameter ...
any ideas??

thanks in advance
bye



Massimiliano Cuccia



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




Re: PDF in a JSP ... searching alternative way

2002-06-20 Thread Holger Prause


- Original Message -
From: Massimiliano Cuccia [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, June 20, 2002 6:48 PM
Subject: PDF in a JSP ... searching alternative way


 I want to produce a pdf in a jsp, so I have a string fo that contains the
fo
 instructions ...
 I had found this code to output the pdf directily in the browser
   Driver driver = new Driver(new InputSource(new
 StringBufferInputStream(fo)), response.getOutputStream());

 and it's OK, there is another way to do that task?
 I don't want to pass the response.getOutputStream() actual parameter ...
 any ideas??


A good way for performing xslt(an render it with fop) is using the xsl
Taglibs from the jakarta project

http://jakarta.apache.org/taglibs/doc/xsl-doc/intro.html

 thanks in advance
 bye

 --
--
 
 Massimiliano Cuccia



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





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




RE: PDF in a JSP ... searching alternative way

2002-06-20 Thread Sergei Timofejev

InputSource xslfo_doc = new InputSource(xmlfo_input);
ByteArrayOutputStream outstr = new ByteArrayOutputStream();
Driver driver = new Driver(xslfo_doc, outstr);
driver.run();
byte[] content = outstr.toByteArray();
response.setContentLength(content.length);
outstr.close();
response.getOutputStream().write(content);  
xmlfo_input.close();
response.getOutputStream().flush();

-Original Message-
From: Massimiliano Cuccia [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 20, 2002 7:48 PM
To: [EMAIL PROTECTED]
Subject: PDF in a JSP ... searching alternative way


I want to produce a pdf in a jsp, so I have a string fo that contains the fo
instructions ...
I had found this code to output the pdf directily in the browser
  Driver driver = new Driver(new InputSource(new
StringBufferInputStream(fo)), response.getOutputStream());

and it's OK, there is another way to do that task?
I don't want to pass the response.getOutputStream() actual parameter ...
any ideas??

thanks in advance
bye



Massimiliano Cuccia



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


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




Re: Fwd: Re: Fop and JDK1.2

2002-06-20 Thread Christian Geisert

Ralph LaChance schrieb:

[..]

 Plus this:  I work from the premise that most users of fop will prefer
 ~not~ to explicitly configure their own fonts (unless the locale require 
 it)
 but will take the built-ins -- which to my mind, means those supplied by 
 Java.
 Would that be an um ~naive~ assumption?

IMHO this makes sense.
Given that java.awt.Font provides the needed metrics it sounds like
an easy thing to do (for the AWT renderer).
If I understand the redesign stuff the font mapping will be handled by 
the user agent then.

Christian


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




Re: image support (was: RE: Fop and JDK1.2 (using ant copy tasksto select implementations))

2002-06-20 Thread Christian Geisert

Keiron Liddle schrieb:
 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.

So what about using those ? (we ship batik anyway..)

 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.

This sounds like nice jakarta-commons project.

Christian


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




Re: PDF in a JSP ... searching alternative way

2002-06-20 Thread J.Pietschmann

Massimiliano Cuccia wrote:
 I want to produce a pdf in a jsp, so I have a string fo that contains the fo
 instructions ...
 I had found this code to output the pdf directily in the browser
   Driver driver = new Driver(new InputSource(new
 StringBufferInputStream(fo)), response.getOutputStream());
 
 and it's OK, there is another way to do that task?
 I don't want to pass the response.getOutputStream() actual parameter ...
 any ideas??

You should not use FOP from an JSP in order to generate
PDF. PDF may be binary, which could confuse the output
(which assumes the output is *character* data).
Use a servlet, and generate the FO with XSLT, as advised,
or check out Cocoon.

J.Pietschmann



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




Re: Fop and JDK1.2

2002-06-20 Thread Christian Geisert

Peter B. West schrieb:

[..]

 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 

I didn't think about a tag for a RC yet..

But the whole release process should be documented somewhere
like the batik team has done:
http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-batik/MAINTAIN

 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 

Just do it ;-)

 the release announcements could be collected there and serve as an 
 immediate point of reference.


 Peter

Christian


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




Re: DO NOT REPLY [Bug 10031] - FOP error handling: return codesnot set

2002-06-20 Thread J.Pietschmann

Has anybody received the CVS message from Jörg's change. I didn't. Maybe
it's still somewhere in a moderator queue? That was the case when I
committed my first change to CVS after receiving committer muscles.

I'm not subscribed to the fop-cvs list. Perhaps
I should do so...

J.Pietschmann


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




test cases

2002-06-20 Thread J.Pietschmann

Hi all,
I've accumulated quit a few testcases from the bugzilla
bug reports.
Some are working now, some still produce errors.
We don't have an explicit test data directory yet.
Should I create one?

J.Pietschmann


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




Re: how to deal with tabulations

2002-06-20 Thread J.Pietschmann

Sylvain MOUGENOT wrote:
 HI.
 I've a structured document where the user can modify some of the
 presentation such as alignment, indentation and tabulation.
...
 QUESTION
 Is it possible to do?

Not easily with FO builtins. You'll have to use a table,
and you'll have to calculate the table column the text
will go into, and probably column spans for the cells.
It's doable but very messy in XSLT, especially if
proportional fonts are used and even more if (gasp) fonts
are mixed. Your XML is optimized for data entry, not for
processing. That's your problem.
I've seen similar stuff before, and in each case the
problems were caused sloppy analysis of what the users
really needed. Check whether the presentation modifications
are really all necessary in the form declared, and whether
a GUI tool can be used for data entry which produces XML
more amenable to further processing.

J.Pietschmann


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




Using bugzilla

2002-06-20 Thread Peter B. West

Foplings,

I'm only just beginning to realise how useful bugzilla is, in spite of 
having watched numerous mozilla bugs over a long period.  I can see it 
complementing the dev list very nicely, both for bug fixing and some 
redesign work.  The beauty of it is that it provides a focus for 
discussions on particular issues, and lets the relationships and 
dependencies between issues be directly specified.

A simple example of its usefulness would be the changes to the Xalan1 
dependencies in the build.  The procedure would be to initiate 
discussion on fop-dev, and it the feeling is to go ahead, raise a RFE in 
bugzilla.  Then whenever anything is done in connection with the change, 
note it in bugzilla.  All of the bugzilla FOP activity echos in fop-dev, 
so everyone can see what is happening, and join in on bugzilla with any 
direct comments.  That way all of the discussion about a particular 
topic can be found in the one place, without having to trawl through the 
mail archives to follow the argument.

(Anyone who is lurking on fop-dev and wants to make a comment could do 
it on the list anyway.  If he wants to get more involved, a bugzilla 
login is a minute away.)

??

Peter
-- 
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: Using bugzilla

2002-06-20 Thread Arved Sandstrom

 -Original Message-
 From: Peter B. West [mailto:[EMAIL PROTECTED]]
 Sent: June 20, 2002 11:00 PM
 To: fop-dev
 Subject: Using bugzilla

 Foplings,

 I'm only just beginning to realise how useful bugzilla is, in spite of
 having watched numerous mozilla bugs over a long period.  I can see it
 complementing the dev list very nicely, both for bug fixing and some
 redesign work.  The beauty of it is that it provides a focus for
 discussions on particular issues, and lets the relationships and
 dependencies between issues be directly specified.

 A simple example of its usefulness would be the changes to the Xalan1
 dependencies in the build.  The procedure would be to initiate
 discussion on fop-dev, and it the feeling is to go ahead, raise a RFE in
 bugzilla.  Then whenever anything is done in connection with the change,
 note it in bugzilla.  All of the bugzilla FOP activity echos in fop-dev,
 so everyone can see what is happening, and join in on bugzilla with any
 direct comments.  That way all of the discussion about a particular
 topic can be found in the one place, without having to trawl through the
 mail archives to follow the argument.

 (Anyone who is lurking on fop-dev and wants to make a comment could do
 it on the list anyway.  If he wants to get more involved, a bugzilla
 login is a minute away.)

 ??

Preaching to the converted... :-) Sort of.

We use Merant PVCS Tracker at work, which is a nice piece of gear. It does
defect tracking and issue management.

Bugzilla is a capable enough system also, as you've noted.

The major stumbling block to all of these systems is that users subvert
them. Not maliciously, but the effect is the same. Everything turns out to
be high priority...there is no change control board so everything gets sent
to developers as it arrives, with no screening. Developers apply their own
notions of what the requirements are and frequently decide that reported
behaviour is OK. If they _do_ accept that it's a bug, developers often close
the defect before QA ever has a chance to verify. :-) And on and on it goes.

I've never seen a commercial issue tracking system successfully used for
issues, and I have now seen a few. Mostly they get ignored...people prefer
mailing lists. I think there is some psychology there that I have not quite
fathomed; partially it's also due to the fact that folks are most familiar
with email.

So I am not disagreeing with you, so much as I am suggesting that 75% of
this is process, and if you can get people to buy into the process then any
system will work, whether it's mailing lists, defect/issue tracking
software, or even shared ASCII files (assuming access). The main thing is
that there need to be some immediate rewards: 1) better feedback, 2) more
feeling of having contributions noticed, and 3) tangible results.

I happen to think mailing lists are pretty poor for issue management, so I
think it is worth a shot. I am amost completely engaged with the other
project at the moment but I haven't left FOP but temporarily; my main
problem at the moment is keeping abreast of the lists and maintaining a clue
as to what is occurring, and maybe your idea would help. I'd certainly make
the attempt.

Regards,
Arved


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




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

2002-06-20 Thread pbwest

pbwest  2002/06/20 21:41:51

  Modified:src/org/apache/fop/fo Tag: FOP_0-20-0_Alt-Design
Properties.java
  Log:
  cue shorthand
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.2.9   +59 -11xml-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.8
  retrieving revision 1.1.2.9
  diff -u -r1.1.2.8 -r1.1.2.9
  --- Properties.java   20 Jun 2002 14:53:51 -  1.1.2.8
  +++ Properties.java   21 Jun 2002 04:41:50 -  1.1.2.9
  @@ -432,7 +432,7 @@
   // associated property indices, as expanded from the
   // border-right shorthand.
   if (style != null) newlist.add(style);
  -if (color != null) newlist.add(style);
  +if (color != null) newlist.add(color);
   if (width != null) newlist.add(width);
   return newlist;
   }
  @@ -2416,21 +2416,19 @@
object for border-spacing);
   } else {
   // Must be a pair of Lengths
  -if (((PropertyValueList)value).size() != 2)
  +PropertyValueList list = (PropertyValueList)value;
  +if (list.size() != 2)
   throw new PropertyException
  -(List of  + ((PropertyValueList)value).size() +
  - for BorderSpacing);
  -PropertyValue len1
  -= (PropertyValue)(((PropertyValueList)value).getFirst());
  -PropertyValue len2
  -= (PropertyValue)(((PropertyValueList)value).getLast());
  +(List of  + list.size() +  for border-spacing);
  +PropertyValue len1 = (PropertyValue)(list.getFirst());
  +PropertyValue len2 = (PropertyValue)(list.getLast());
   // Note that this test excludes (deliberately) ems relative
   // lengths.  I don't know whether this exclusion is valid.
   if ( ! (len1 instanceof Numeric  len2 instanceof Numeric
((Numeric)len1).isLength()
((Numeric)len2).isLength()))
   throw new PropertyException
  -(2 values to BorderSpacing are not Lengths);
  +(Values to border-spacing are not both Lengths);
   // Set the individual expanded properties of the
   // border-separation compound property
   // Should I clone these values?
  @@ -3156,6 +3154,56 @@
   public static final int traitMapping = SHORTHAND_MAP;
   public static final int initialValueType = AURAL_IT;
   public static final int inherited = NO;
  +
  +/**
  + * 'value' is a PropertyValueList or an individual PropertyValue.
  + *
  + * pIf 'value' is an individual PropertyValue, it must contain
  + * either
  + *   a parsed UriType value,
  + *   a FromParent value,
  + *   a FromNearestSpecified value,
  + *   or an Inherit value.
  + *
  + * pIf 'value' is a PropertyValueList, it contains a list of
  + * 2 parsed UriType values.
  + *
  + * pThe value(s) provided, if valid, are converted into a list
  + * containing the expansion of the shorthand.
  + * The first element is a value for cue-before,
  + * the second element is a value for cue-after.
  + */
  +public static PropertyValue complex(PropertyValue value)
  +throws PropertyException
  +{
  +if ( ! (value instanceof PropertyValueList)) {
  +if (value instanceof Inherit
  +|| value instanceof FromParent
  +|| value instanceof FromNearestSpecified
  +|| value instanceof UriType
  +)
  +return PropertySets.expandAndCopySHand(value);
  +} else {
  +// List may contain only 2 uri specifiers
  +PropertyValueList list = (PropertyValueList)value;
  +if (list.size() != 2)
  +throw new PropertyException
  +(List of  + list.size() +  for cue);
  +PropertyValue cue1 = (PropertyValue)(list.getFirst());
  +PropertyValue cue2 = (PropertyValue)(list.getLast());
  +
  +if ( ! ((cue1 instanceof UriType) 
  +(cue2 instanceof UriType)))
  +throw new PropertyException
  +(Values to cue are not both URIs);
  +// Set the individual expanded properties of 

DO NOT REPLY [Bug 10043] - Encoding when Render to TEXT

2002-06-20 Thread bugzilla

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10043.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10043

Encoding when Render to TEXT

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

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