cvs commit: xml-fop/src/org/apache/fop/image/analyser BMPReader.java EPSReader.java GIFReader.java ImageReader.java ImageReaderFactory.java JPEGReader.java PNGReader.java SVGReader.java TIFFReader.java AbstractImageReader.java

2002-02-25 Thread keiron

keiron  02/02/25 01:31:03

  Modified:src/org/apache/fop/image AbstractFopImage.java BmpImage.java
EPSImage.java FopImage.java GifImage.java
ImageFactory.java JAIImage.java JimiImage.java
JpegImage.java SVGImage.java
   src/org/apache/fop/image/analyser BMPReader.java
EPSReader.java GIFReader.java ImageReader.java
ImageReaderFactory.java JPEGReader.java
PNGReader.java SVGReader.java TIFFReader.java
  Removed: src/org/apache/fop/image/analyser AbstractImageReader.java
  Log:
  improved thread safety of readers
  
  Revision  ChangesPath
  1.7   +7 -7  xml-fop/src/org/apache/fop/image/AbstractFopImage.java
  
  Index: AbstractFopImage.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/image/AbstractFopImage.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- AbstractFopImage.java 21 Feb 2002 09:54:27 -  1.6
  +++ AbstractFopImage.java 25 Feb 2002 09:31:03 -  1.7
  @@ -1,5 +1,5 @@
   /*
  - * $Id: AbstractFopImage.java,v 1.6 2002/02/21 09:54:27 keiron Exp $
  + * $Id: AbstractFopImage.java,v 1.7 2002/02/25 09:31:03 keiron Exp $
* Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
* LICENSE file included with these sources.
  @@ -45,7 +45,7 @@
   /**
* ImageReader object (to obtain image header informations).
*/
  -protected ImageReader m_imageReader = null;
  +protected FopImage.ImageInfo imageInfo = null;
   
   /**
* Image color space (org.apache.fop.datatypes.ColorSpace).
  @@ -95,16 +95,16 @@
* imgReader ImageReader object
* @return a new FopImage object
*/
  -public AbstractFopImage(URL href, ImageReader imgReader) {
  +public AbstractFopImage(URL href, FopImage.ImageInfo info) {
   this.m_href = href;
  -this.m_imageReader = imgReader;
  -this.m_width = this.m_imageReader.getWidth();
  -this.m_height = this.m_imageReader.getHeight();
  +this.imageInfo = info;
  +this.m_width = this.imageInfo.width;
  +this.m_height = this.imageInfo.height;
   loaded = loaded  DIMENSIONS;
   }
   
   public String getMimeType() {
  -return m_imageReader.getMimeType();
  +return imageInfo.mimeType;
   }
   
   /**
  
  
  
  1.5   +2 -2  xml-fop/src/org/apache/fop/image/BmpImage.java
  
  Index: BmpImage.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/image/BmpImage.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- BmpImage.java 21 Feb 2002 09:54:27 -  1.4
  +++ BmpImage.java 25 Feb 2002 09:31:03 -  1.5
  @@ -1,5 +1,5 @@
   /*
  - * $Id: BmpImage.java,v 1.4 2002/02/21 09:54:27 keiron Exp $
  + * $Id: BmpImage.java,v 1.5 2002/02/25 09:31:03 keiron Exp $
* Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
* LICENSE file included with these sources.
  @@ -26,7 +26,7 @@
   import org.apache.fop.fo.FOUserAgent;
   
   public class BmpImage extends AbstractFopImage {
  -public BmpImage(URL href, ImageReader imgReader) {
  +public BmpImage(URL href, FopImage.ImageInfo imgReader) {
   super(href, imgReader);
   }
   
  
  
  
  1.5   +33 -13xml-fop/src/org/apache/fop/image/EPSImage.java
  
  Index: EPSImage.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/image/EPSImage.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- EPSImage.java 21 Feb 2002 09:54:27 -  1.4
  +++ EPSImage.java 25 Feb 2002 09:31:03 -  1.5
  @@ -1,5 +1,5 @@
   /*
  - * $Id: EPSImage.java,v 1.4 2002/02/21 09:54:27 keiron Exp $
  + * $Id: EPSImage.java,v 1.5 2002/02/25 09:31:03 keiron Exp $
* Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
* LICENSE file included with these sources.
  @@ -32,8 +32,7 @@
   private String docName;
   private int[] bbox;
   
  -private byte[] epsImage = null;
  -private EPSReader epsReader = null;
  +private EPSData epsData = null;
   
   /**
* Initialize docName and bounding box
  @@ -62,23 +61,44 @@
   return bbox;
   }
   
  -public EPSImage(URL href, ImageReader imgReader) {
  -super(href, imgReader);
  +public EPSImage(URL href, FopImage.ImageInfo imgInfo) {
  +super(href, imgInfo);
   init(href);
  - 

Including html pages

2002-02-25 Thread Raimund Kammering


Hi,
I want to dynamically include an html page into a pdf document.
The process is as follows:
 A java servlet concatenates a number of xml files
controlled
 by one xsl file.
 Now I also want to include an html file into this
procedure.
 How can this be done?
 After all processing of the xml/html files another
java servlet
 does the transformation to pdf, directly rendering
the data
 to the browser.
Including the html for processing via xml/xsl to html is clear - but
I have no idea how to do this for the fop transformations (fo:external
graphics seems not to be the right way?).
Any ideas are welcome.
Raimund
--
DESY -MVP-
Notkestrasse 85
D-22603 Hamburg
Tel.: +49 40 8998 -4903
e-mail: [EMAIL PROTECTED]



Some notes on footnotes

2002-02-25 Thread Peter B. West

Please find attached some preliminary notes on the implementation of 
footnotes.

Peter



?xml version=1.0 encoding=ISO-8859-1?
!-- $Id: xml-parsing.xml,v 1.6 2002-02-15 11:25:24+10 pbw Exp pbw $ --

!DOCTYPE document SYSTEM ../../xml-docs/dtd/document-v10.dtd


document
  header
titleImplementing footnotes/title
authors
  person name=Peter B. West email=[EMAIL PROTECTED]/
/authors
  /header
  body
!-- one of (anchor s1) --
s1 title=Implementing footnotes in FOP
  p
	Footnotes present difficulties for page layout primarily
	because their point of invocation in the flow is different
	from their point of appearance in the area tree.  All of the
	content lines of a footnote may appear on the same page as its
	invocation point, all may appear on a following page, or the
	lines may be split over a page or pages.  (This characteristic
	leads to another problem when a footnote overflows the last
	page of flow content, but that difficulty will not be
	discussed here.)  This note considers some aspects of the
	implementation of footnotes in a galley-based design.
  /p
  s2 title=The organisation of the galleys
	s3 title=The layout tree
	  p
	For the purposes of this discussion, I will assume a
	stronglayout tree/strong, intermediate between the
	emFO tree/em and the emarea tree/em.  The purpose
	of such a structure is to allow layout management to test
	the viability of proposed layout decisions by enabling
	look-ahead in the galleys.
	  /p
	  note
	It must be stressed that this concept has not been
	developed or tested, and may well be redundant as an
	actual structure.
	  /note
	  p
	The layout tree resembles the area tree in basic
	structure; under the root wil be a list of
	page-viewport-areas, descending through the outer area
	structure of the individual pages to the areas generated
	by FOs from flows of both kinds.  It is below the flow
	level that the differences will occur.  Areas at this
	level will provide attachment points for the galleys to
	enable galley pre-processing and look-ahead.
	  /p
	/s3
	s3 title=Galley pre-processing
	  p
	As indicated in earlier notes, galleys are sequences of
	flow objects sourced from fo:flow and fo:static-content
	flows.  The galleys themselves are sources of objects for
	targets in the area tree.  Galley pre-processing involves
	the spatial resolution of objects from the flows to the
	greatest extent possible without information on the
	dimensions of the target area.  In terms of inline-areas,
	galleys would resolve the dimensions of included images
	and process text.  Text would be collected into runs with
	the same alignment characteristics, resolving block
	progession dimension and noting all natural and hyphenated
	break points.
	  /p
	  p
	Once this pre-processing has been achieved, it is
	envisaged that a layout manager might make requests to the
	galley of its ability to fill an area of a given
	inline-progression-dimension.  A positive response would
	be accompanied by the block-progression-dimension.  The
	other possibilities are a partial fill, which would also
	require b-p-d data, and a failure due to insufficient
	i-p-d, in which case the minimum i-p-d requirement would
	be returned.  Note that decisions about the
	actual dimensions of line-areas to be filled can be
	deferred until all options have been tested.
	  /p
	  p
	Apart from information request, higher-level
	processes can either make requests of the galleys for
	chunks of nominated sizes, or simply attach the galley to
	a particular area emin the area tree/em and release
	the galley to fill.  The galleys must be able to respond to a
	sequence of information requests, more or less in the
	manner of a reqest iterator, and separately manage the
	flushing of objects into the area tree.
	  /p
	/s3
	s3 title=Footnotes and galleys
	  p
	In the structure described above, footnotes would be
	pre-processed as galleys themselves, but they would remain
	attached as subtrees to their points of invocation in the
	main text.  Allocation to a footnote-reference-area would
	only occur in the area tree.
	  /p
	  p
	When footnotes are introduced, the communication between
	galleys and layout manager, as mentioned above, would be
	affected.  The returned infomation would two b-p-d values:
	the primary line-area b-p-d impact and the footnote b-p-d
	impact.  The distinction is necessary for two reasons; to
	alert the layout manager to the first footnote of the
	page, and because the footnote b-p-d will always impact
	the main-reference-area b-p-d, whereas the primary
	inline-area may not, e.g. in the case of multiple
	span-areas.
	  /p
	/s3
	s3 title=Layout managers in the flow of control
	  noteTo be developed./note
	/s3
	s3 

Re: [Understanding] FO Tree [3]

2002-02-25 Thread Keiron Liddle

On 2002.02.23 16:33 Matthew L. Avizinis wrote:
 The question is, How are extension element properties mapped?  I new
 element seems to be recognized by FOP just fine, but any properties I
 include are ignored by FOP, i.e. an exception is raised stating that
 the
 property in question is ignored and/or no maker found.
 matthew l. avizinis

In terms of what I am writing about, the extension element properties are 
not mapped. The extension element classes get the xml attributes directly. 
They can then get whatever attributes are required.
This is releveant information only to the development of FOP not older 
versions.

You want to know how to map properties for older versions. For this you 
need to do something like src/codegen/extproperties.xml and add the 
appropriate processing into the build.xml.



  Keiron Liddle wrote:
  ...
 
   By using element mappings it is possible to read other XML and
 either
   - set information on the area tree
   - create pseudo FO Objects that create areas in the area tree
   - create FO Objects
  
  
   ** Mapping elements to classes?
  
  
   I'm not sure what the question is.
  
  Keiron,
 
  The post below is from the fop-user list.
 
  Peter
 
  Hello all,
I have read the extension element writing document and examined the
  label and outline extension elements code, but I don't see
  precisely how
  element properties are mapped.  I have followed the pattern of
  the examples
  in the code and mapped the element correctly but the properties are
  ignored when FOP runs.
Any help is appreciated.  Please be as detailed as possible --
  I am not a
  veteran FOP developer, so what may be patently obvious to you might not
 be
  to me.
  Gratefully,
 Matthew L. Avizinis mailto:[EMAIL PROTECTED]
  Gleim Publications, Inc.

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




How to have two tables inline ?

2002-02-25 Thread Yann BONNAILLIE



HELP please !

CanI have2 tables inline without making 
a global table with each one of my little table in a ceil of this 
one.
I've already triedthat...with no result 
:

fo:block
 table 1
 fo:inline
 table 
2
 /fo:inline
/fo:block


Re: How to have two tables inline ?

2002-02-25 Thread Jochen . Maes


i do this:


fo:table
   fo:table-column column-width=7.5cm/
   fo:table-column column-width=9.5cm/
   fo:table-body
 fo:table-row
   fo:table-cell height=7cm border-right-style=solid
border-right-width=0.5pt
 fo:block
 fo:table
   fo:table-column column-width=4cm/
   fo:table-column column-width=1.5cm/
   fo:table-column column-width=2cm/
   fo:table-body
 fo:table-row
   fo:table-cell
  fo:block font-family=Arialbd font-size=
8pt font-weight=bold margin-left=2pt
xsl:value-of select=x/
  /fo:block
   /fo:table-cell
   fo:table-cell
  fo:block font-family=Arial font-size=7pt
text-align=end
xsl:texty:/xsl:text
  /fo:block
   /fo:table-cell
   fo:table-cell padding-right=2pt
  fo:block font-family=Arial font-size=7pt
text-align=end padding-right=2pt
xsl:value-of select=//External_References
[@Name=yy']/@Code/
  /fo:block
   /fo:table-cell
 /fo:table-row
 fo:table-row
   fo:table-cell
  fo:block font-family=Arial font-size=7pt
margin-left=2pt
xsl:value-of select=//Country/
  /fo:block
   /fo:table-cell
   fo:table-cell
  fo:block font-family=Arial font-size=7pt
text-align=end
xsl:textu:/xsl:text
  /fo:block
   /fo:table-cell
   fo:table-cell
  fo:block font-family=Arial font-size=7pt
text-align=end padding-right=2pt
xsl:value-of select=//External_References
[@Name='u']/@Code/
  /fo:block
   /fo:table-cell
 /fo:table-row
   /fo:table-body
 /fo:table
 /fo:block
   /fo:table-cell
   fo:table-cell
   /fo:table-cell
 /fo:table-row
   /fo:table-body
 /fo:table



Jochen Maes
EDP departement
Programmeur

KBC-Securities
Havenlaan 16
1080 Brussel

Tel : 02/429.96.81
Fax : 02/429.17.48
E-mail : [EMAIL PROTECTED]

**

This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. You must not,
directly or indirectly, use, disclose, distribute, print, or copy any part
of this message if you are not the intended recipient. KBC Securities
reserves the right to monitor all e-mail communications through its
networks. 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 any such entity.
**


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




Re: How to have two tables inline ?

2002-02-25 Thread Yann BONNAILLIE

You made a global table ... that's what i don't want ;)

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, February 25, 2002 11:58 AM
Subject: Re: How to have two tables inline ?



 i do this:


 fo:table
fo:table-column column-width=7.5cm/
fo:table-column column-width=9.5cm/
fo:table-body
  fo:table-row
fo:table-cell height=7cm border-right-style=solid
 border-right-width=0.5pt
  fo:block
  fo:table
fo:table-column column-width=4cm/
fo:table-column column-width=1.5cm/
fo:table-column column-width=2cm/
fo:table-body
  fo:table-row
fo:table-cell
   fo:block font-family=Arialbd font-size=
 8pt font-weight=bold margin-left=2pt
 xsl:value-of select=x/
   /fo:block
/fo:table-cell
fo:table-cell
   fo:block font-family=Arial
font-size=7pt
 text-align=end
 xsl:texty:/xsl:text
   /fo:block
/fo:table-cell
fo:table-cell padding-right=2pt
   fo:block font-family=Arial
font-size=7pt
 text-align=end padding-right=2pt
 xsl:value-of
select=//External_References
 [@Name=yy']/@Code/
   /fo:block
/fo:table-cell
  /fo:table-row
  fo:table-row
fo:table-cell
   fo:block font-family=Arial
font-size=7pt
 margin-left=2pt
 xsl:value-of select=//Country/
   /fo:block
/fo:table-cell
fo:table-cell
   fo:block font-family=Arial
font-size=7pt
 text-align=end
 xsl:textu:/xsl:text
   /fo:block
/fo:table-cell
fo:table-cell
   fo:block font-family=Arial
font-size=7pt
 text-align=end padding-right=2pt
 xsl:value-of
select=//External_References
 [@Name='u']/@Code/
   /fo:block
/fo:table-cell
  /fo:table-row
/fo:table-body
  /fo:table
  /fo:block
/fo:table-cell
fo:table-cell
/fo:table-cell
  /fo:table-row
/fo:table-body
  /fo:table



 Jochen Maes
 EDP departement
 Programmeur

 KBC-Securities
 Havenlaan 16
 1080 Brussel

 Tel : 02/429.96.81
 Fax : 02/429.17.48
 E-mail : [EMAIL PROTECTED]




**

 This message is for the named person's use only. It may contain
 confidential, proprietary or legally privileged information. You must not,
 directly or indirectly, use, disclose, distribute, print, or copy any part
 of this message if you are not the intended recipient. KBC Securities
 reserves the right to monitor all e-mail communications through its
 networks. 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 any such entity.



**


 -
 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: Including html pages

2002-02-25 Thread alex

At 09:35 25/02/2002, Raimund Kammering wrote:
Hi,

I want to dynamically include an html page into a pdf document.
The process is as follows:
 A java servlet concatenates a number of xml files controlled
 by one xsl file.

 Now I also want to include an html file into this procedure.
 How can this be done?


Aha - you are after the Holy Grail of FOP and XSL:FO

OK...

FOP converts XSL:FO (plus SVG images, plus bitmap graphics) into PDF (and 
other formats).
If you want to include HTML then we have to turn it into one of these formats.
You have already considered bitmaps and wisely rejected that idea.
I don't think there is an HTML-SVG converter but it *might* be a way to go.
Most people think of (and then have problems with) the idea of converting 
HTML to XSL:FO via XHTML.

Because XHTML is valid XML it can be processed with XSLT.
So for instance we might attempt to take the html, use Tidy on it to 
convert it to valid XHTML,
and then use Antenna's XSLT for converting XHTML to XSL:FO

The  problem with this is that it is a lot of work, and Antenna's XSLT does 
not work with FOP (in my experience) only their own XSL:FO engine.

Which brings me to the conclusion which most people reach - there is no 
generic way of converting web pages into PDF using FOP. Most people end up 
deciding to convert the source material into XML instead of leaving it as html.

Now if you had a web browser which saved the displayed screen as SVG or PDF 
then we might have a chance

(If you are still interested Tidy can be found on SourceForge and you can 
find the XHTML-XSL:FO stuff on Antenna's site)

plug
PS I am offering free consultancy to London firms. This includes FOP. Check 
out http://www.OWAL.co.uk/
/plug

apology repeat=as often as necessary
My FOP FAQ has been down since I moved machines. Sorry. I'm going to try 
turning it into xdocs format so it can be stored in the  CVS and delivered 
with FOP.
/apology


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




RE: How to have two tables inline ?

2002-02-25 Thread Giannetti, Fabio

Hi Jochen,
the specs says that if you want an inline table you must define it
inside the fo:inline-container.
I don't know if this is supported in the current FOP implementation ...
Hope this helps, Fabio

 -Original Message-
 From: Yann BONNAILLIE [mailto:[EMAIL PROTECTED]]
 Sent: 25 February 2002 11:17
 To: [EMAIL PROTECTED]
 Subject: Re: How to have two tables inline ?
 
 
 You made a global table ... that's what i don't want ;)
 
 - Original Message -
 From: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, February 25, 2002 11:58 AM
 Subject: Re: How to have two tables inline ?
 
 
 
  i do this:
 
 
  fo:table
 fo:table-column column-width=7.5cm/
 fo:table-column column-width=9.5cm/
 fo:table-body
   fo:table-row
 fo:table-cell height=7cm 
 border-right-style=solid
  border-right-width=0.5pt
   fo:block
   fo:table
 fo:table-column column-width=4cm/
 fo:table-column column-width=1.5cm/
 fo:table-column column-width=2cm/
 fo:table-body
   fo:table-row
 fo:table-cell
fo:block 
 font-family=Arialbd font-size=
  8pt font-weight=bold margin-left=2pt
  xsl:value-of select=x/
/fo:block
 /fo:table-cell
 fo:table-cell
fo:block font-family=Arial
 font-size=7pt
  text-align=end
  xsl:texty:/xsl:text
/fo:block
 /fo:table-cell
 fo:table-cell padding-right=2pt
fo:block font-family=Arial
 font-size=7pt
  text-align=end padding-right=2pt
  xsl:value-of
 select=//External_References
  [@Name=yy']/@Code/
/fo:block
 /fo:table-cell
   /fo:table-row
   fo:table-row
 fo:table-cell
fo:block font-family=Arial
 font-size=7pt
  margin-left=2pt
  xsl:value-of select=//Country/
/fo:block
 /fo:table-cell
 fo:table-cell
fo:block font-family=Arial
 font-size=7pt
  text-align=end
  xsl:textu:/xsl:text
/fo:block
 /fo:table-cell
 fo:table-cell
fo:block font-family=Arial
 font-size=7pt
  text-align=end padding-right=2pt
  xsl:value-of
 select=//External_References
  [@Name='u']/@Code/
/fo:block
 /fo:table-cell
   /fo:table-row
 /fo:table-body
   /fo:table
   /fo:block
 /fo:table-cell
 fo:table-cell
 /fo:table-cell
   /fo:table-row
 /fo:table-body
   /fo:table
 
 
 
  Jochen Maes
  EDP departement
  Programmeur
 
  KBC-Securities
  Havenlaan 16
  1080 Brussel
 
  Tel : 02/429.96.81
  Fax : 02/429.17.48
  E-mail : [EMAIL PROTECTED]
 
 
 **
 **
 **
 **
 **
 
  This message is for the named person's use only. It may contain
  confidential, proprietary or legally privileged 
 information. You must not,
  directly or indirectly, use, disclose, distribute, print, 
 or copy any part
  of this message if you are not the intended recipient. KBC 
 Securities
  reserves the right to monitor all e-mail communications through its
  networks. 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 any such entity.
 
 **
 **
 **
 **
 **
 
 
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, email: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]
 


Bug report for Fop [2002/02/25]

2002-02-25 Thread bugzilla

+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=CriticalMAJ=Major |
| |   |   MIN=Minor   NOR=Normal  EHN=Ehnancement   |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
|  626|New|Nor|2001-02-16|Negative number are shifted slightly towards left.|
|  664|Opn|Nor|2001-02-21|Basic-Link does not move with its content, when us|
|  682|New|Nor|2001-02-22|Lists do not display correctly|
|  684|New|Nor|2001-02-23|border width in tables adds up|
|  808|New|Nor|2001-03-01|Batch processing xml files|
|  836|New|Min|2001-03-05|hyphenation problem with very long words  |
|  839|New|Nor|2001-03-05|Positioning of blocks in a block section. |
|  902|New|Nor|2001-03-08|line-height is not applied corectly when using the|
|  907|New|Nor|2001-03-08|first list-item dropped at very bottom of page.   |
|  928|New|Nor|2001-03-10|Font metrics and setComponent |
|  964|New|Nor|2001-03-13|FOP 0.17 throws exception with basic-link in xsl-r|
| 1063|New|Nor|2001-03-21|fop does not handle large fo files|
| 1130|New|Nor|2001-03-27|Alignment of page-number-citation inside a ToC|
| 1154|New|Nor|2001-03-29|nested lists more than 3 level depth  |
| 1171|New|Nor|2001-03-30|small-caps in static content becomes all-caps |
| 1180|New|Maj|2001-04-02|Problem with monospaced font  |
| 1211|New|Min|2001-04-04|Tables are not formatted properly.|
| 1231|New|Nor|2001-04-05|basic-link can't link to a page-sequence element  |
| 1242|New|Nor|2001-04-06|Error in Font-Documentation   |
| 1261|New|Nor|2001-04-09|problem with rendering of external-graphic in Fop-|
| 1312|New|Blk|2001-04-11|fo:external-graphics using 0.17.0 as well as 0.18.|
| 1318|New|Nor|2001-04-12|problems with tables (column width and when used i|
| 1332|Ass|Nor|2001-04-12|MIF output strings not properly escaped   |
| 1335|New|Nor|2001-04-13|Problem with sample FOP servlet.  |
| 1391|New|Blk|2001-04-19|Bug in border-top-style   |
| 1432|New|Nor|2001-04-20|keep-with-* not functioning for fo:table-row  |
| 1474|New|Maj|2001-04-24|fo:external-graphic rendered as block level object|
| 1531|New|Cri|2001-04-26|Cell Spacing  |
| 1596|New|Maj|2001-05-02|Adobe Acrobat claims Fop output has bad page conte|
| 1640|Ass|Nor|2001-05-07|building formatting object tree gets OutOfMemoryEr|
| 1724|Opn|Nor|2001-05-11|Text alignment in table cells |
| 1759|New|Nor|2001-05-15|table-omit-footer-at-break sometimes cause crash  |
| 1766|New|Maj|2001-05-15|Text matrix in svg get doubled when run thru FOP  |
| 1773|New|Blk|2001-05-16|A table that is bigger than the page produces an e|
| 1859|New|Min|2001-05-22|org.apache.fop.apps.Driver.reset() doesn't fully r|
| 1923|New|Nor|2001-05-28|text-decoration does not work |
| 1952|New|Cri|2001-06-01|color attribute to table content overflowing on ne|
| 1967|New|Nor|2001-06-02|blank-or-not-blank behavior   |
| 1998|New|Nor|2001-06-05|linefeed-treatment not understood |
| 2085|New|Maj|2001-06-08|Out of memory error when building FO Tree |
| 2105|New|Nor|2001-06-11|text-alignment when containing euro sign  |
| 2106|New|Nor|2001-06-11|broken justification with numeric umlaut entities |
| 2107|New|Min|2001-06-11|indentation in em units is larger than the lette|
| 2127|New|Cri|2001-06-12|Preserve the Line breaks  |
| 2150|Ass|Maj|2001-06-13|New page with  a table-header but without any tabl|
| 2153|New|Cri|2001-06-13|Borders are calculated incorrectly|
| 2207|New|Maj|2001-06-18|Embedding problems|
| 2227|New|Nor|2001-06-18|missing class on startup in Fop-0.19.0 compiled do|
| 2279|New|Nor|2001-06-22|block-container property position does not exist|
| 2331|New|Maj|2001-06-26|fo:basic-link in fo:static-content throws an excep|
| 2460|New|Cri|2001-07-05|Mulitple boder lines between the colums in a table|
| 

PNG support in fop 0.20.3rc2

2002-02-25 Thread Sven Kitschke

Hi all,

after switching from fop 0.20.3rc to fop 0.20.3rc2 i was
surprised about the broken PNG support. I got a lot
of error messages like
[ERROR]: Error while creating area : Error creating
FopImage object (Error creating FopImage object
(file:/path-to-bitmaps/img01.png) :
org.apache.fop.image.JimiImage

Finally i got it working - after a lot of time and
copying jimi-1.0.jar to the lib directory and
re-compiling the sources. The reason is the
conditional compiling of the JimiImage.java only if the jimi.jar
is present (build.xml).

I think, possible solutions are:
1. Please state this behavior more explicitly (You have to make
your own fop.jar if you want PNG support.),
OR
2. Make the Jimi support default - delete the conditional include
of JimiImage.java.

My favorite is option 2.

TIA, Sven


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




RE: [PROPOSAL] linebreak

2002-02-25 Thread ewitness - Ben Fowler

 
I guess the reason nobody thought fo:br/ or fo:newline/ would be
 required is because a U+000A will do the trick.

 [ snip ]

In any case, a linefeed (LF) must be honoured, and result in a linebreak.
_If_ the conditions are right. What that means is, the initial value for
linefeed-treatment is treat-as-space, which _does_ do a conversion of
U+000A to U+0020 (space). So you would want to specify
linefeed-treatment='preserve' on an ancestor flow object (possibly
fo:root) and allow it to propagate to the FOs of interest, as it is
inheritable. The whitespace-* properties do not affect the linefeed, and
suppress-at-line-break can also be left as it is.

But essentially the LF is there to accomplish what you want to do. The
initial setting of linefeed-treatment acts to give us LaTeX-like
behaviour, but unlike LaTeX we can switch to something different in this
regard, rather than use new markup.

The answer that you gave is also to be found a few lines down
from the first URL I gave you

4.   Forced line-breaks are respected. Specifically, if A
is the glyph-area generated by a fo:character whose Unicode
character is U+000A, then A must be the last area in its
containing subset Si.

I don't mind admitting that as an outsider to the XML standard, this
looks like a bad, even a really bad, idea.

My reading of your commentary is Whitespace is sometimes respected,
and only a langauge lawyer can tell you when.

How should this be interpreted?

Do you think that HTML would be improved if the BR element was
replaced with a feature that said You can get the effect of a
forced linebreak by setting 'linefeed-treatment' to 'preserve'
in the body of the page (or other container as required), which
causes all unix line feeds to be rendered instead the br / element
which is what was done?

From my POV this has an inhibiting effect on all editors and pretty
printing utilities, which must also respect exisiting white space
(as XSL processors do) and never introduce line feeds, in case this
setting was ever turned on. From my POV, a formatter should always
ignore the formatting of the source, unless notified that it is
preformatted as in the case of PRE and CDATA, exempli gratia
URL: 
http://archive.ncsa.uiuc.edu/SDG/IT94/Proceedings/Autools/sperberg-mcqueen/sperberg.html
 ,
(1994) about half way down.

Do you happen to know whether this was ever discussed (id est objections
sought and answered) or whether this was one person's idea that
was incorporated as is.

I have a related 'issue' which is that the normalize-string( ) function
in XSL does two things. It trims leading and trailling newlines
and other whitespace, and it normalises internal white space.
I have a need for an operation that does the former, but not the latter.

(In fact I have an implementation which appears to be buggy
and replaces 'Miss A Burgrave' with Miss ABurgrave', but handles
'Miss A  Burgrave' correctly.

In short, XML processors including ones that produce XML-FO files
should pass through all whitespace, and processors such as fop
which are also XML processors, but adjusted so that they do not
produce XML, should (at least in general) normalise whitespace.
Where the output file format respects whitespace then it should
be supplied as fo:text or as some break (as my original suggestion)
The present situation is that the latter type of processor may not
normalise whitespace, because some newlines are significant.

Incidently, you have not made (or reported) a case against my suggestion:
unless it is harmful (or confusing) there is no real reason why both
styles of indicating significant breaks could not be used, is there?

Using FOP derived from version 0.14, I get this report when I tried
the following .fo

WARNING: property 'linefeed-treatment' ignored
WARNING: property 'linefeed-treatment' ignored
setting up fonts
formatting FOs into areas
[1]
rendering areas to PDF

(source)

?xml version=1.0 encoding=UTF-8?
fo:root
xmlns:fo=http://www.w3.org/1999/XSL/Format;
text-align=justified font-size=12pt font-family=serif
linefeed-treatment='preserve' 
fo:layout-master-set
fo:simple-page-master
margin-right=50pt margin-left=100pt
margin-bottom=25pt margin-top=75pt 
master-name=all
fo:region-body margin-bottom=50pt /
fo:region-after extent=25pt /
/fo:simple-page-master
/fo:layout-master-set
fo:page-sequence id= hyphenate=true master-name=all 
language=en
fo:flow flow-name=xsl-region-body
fo:block linefeed-treatment='preserve'
Bilbo Baggins,

DO NOT REPLY [Bug 3007] - broken basic-link when referencing a following page

2002-02-25 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=3007.
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=3007

broken basic-link when referencing a following page





--- Additional Comments From [EMAIL PROTECTED]  2002-02-25 14:01 ---
The same patch should also be applied in org/apache/fop/fo/flow/Block.java:

if (area.getIDReferences() != null)
{
// area.getIDReferences().createID(id);
area.getIDReferences().createUnvalidatedID(id);
area.getIDReferences().addToIdValidationList(id);
}

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




DO NOT REPLY [Bug 6647] New: - external-graphic and configuration baseDir

2002-02-25 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=6647.
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=6647

external-graphic and configuration baseDir

   Summary: external-graphic and configuration baseDir
   Product: Fop
   Version: 0.20.3
  Platform: Other
OS/Version: Linux
Status: NEW
  Severity: Normal
  Priority: Other
 Component: images
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


fails with error no protocol

Fix: in FopImageFactory.java, assume File: when processing baseDir
(as done some lines above)

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




RE: [PROPOSAL] linebreak

2002-02-25 Thread Arved Sandstrom

Comments below.

-Original Message-
From: ewitness - Ben Fowler [mailto:[EMAIL PROTECTED]]
Sent: February 25, 2002 9:41 AM
To: [EMAIL PROTECTED]
Subject: RE: [PROPOSAL] linebreak


 
I guess the reason nobody thought fo:br/ or fo:newline/ would be
 required is because a U+000A will do the trick.

 [ snip ]

In any case, a linefeed (LF) must be honoured, and result in a linebreak.
_If_ the conditions are right. What that means is, the initial value for
linefeed-treatment is treat-as-space, which _does_ do a conversion of
U+000A to U+0020 (space). So you would want to specify
linefeed-treatment='preserve' on an ancestor flow object (possibly
fo:root) and allow it to propagate to the FOs of interest, as it is
inheritable. The whitespace-* properties do not affect the linefeed, and
suppress-at-line-break can also be left as it is.

But essentially the LF is there to accomplish what you want to do. The
initial setting of linefeed-treatment acts to give us LaTeX-like
behaviour, but unlike LaTeX we can switch to something different in this
regard, rather than use new markup.

The answer that you gave is also to be found a few lines down
from the first URL I gave you

4.   Forced line-breaks are respected. Specifically, if A
is the glyph-area generated by a fo:character whose Unicode
character is U+000A, then A must be the last area in its
containing subset Si.

I don't mind admitting that as an outsider to the XML standard, this
looks like a bad, even a really bad, idea.

My reading of your commentary is Whitespace is sometimes respected,
and only a langauge lawyer can tell you when.

How should this be interpreted?

Do you think that HTML would be improved if the BR element was
replaced with a feature that said You can get the effect of a
forced linebreak by setting 'linefeed-treatment' to 'preserve'
in the body of the page (or other container as required), which
causes all unix line feeds to be rendered instead the br / element
which is what was done?

From my POV this has an inhibiting effect on all editors and pretty
printing utilities, which must also respect exisiting white space
(as XSL processors do) and never introduce line feeds, in case this
setting was ever turned on. From my POV, a formatter should always
ignore the formatting of the source, unless notified that it is
preformatted as in the case of PRE and CDATA, exempli gratia
URL:
http://archive.ncsa.uiuc.edu/SDG/IT94/Proceedings/Autools/sperberg-mcqueen/s
perberg.html ,
(1994) about half way down.

Do you happen to know whether this was ever discussed (id est objections
sought and answered) or whether this was one person's idea that
was incorporated as is.

I have a related 'issue' which is that the normalize-string( ) function
in XSL does two things. It trims leading and trailling newlines
and other whitespace, and it normalises internal white space.
I have a need for an operation that does the former, but not the latter.

(In fact I have an implementation which appears to be buggy
and replaces 'Miss A Burgrave' with Miss ABurgrave', but handles
'Miss A  Burgrave' correctly.

In short, XML processors including ones that produce XML-FO files
should pass through all whitespace, and processors such as fop
which are also XML processors, but adjusted so that they do not
produce XML, should (at least in general) normalise whitespace.
Where the output file format respects whitespace then it should
be supplied as fo:text or as some break (as my original suggestion)
The present situation is that the latter type of processor may not
normalise whitespace, because some newlines are significant.

Incidently, you have not made (or reported) a case against my suggestion:
unless it is harmful (or confusing) there is no real reason why both
styles of indicating significant breaks could not be used, is there?

[ SNIP example ]

line-feed treatment was reported as not working in June last
year, URL: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1998 ,
I don't know whether tit is now in.

I now have a linux installation (but not yet CVS), and so I am in a position
to
start some development work on FOP. Where should I start? Is there a list
of outstanding tasks?

I wrote that a few days ago, but delayed sending it until I could
see what bugzilla could tell me. In the meantime, bugzilla has sent
me an e-mail giving no fewer than 195 issues. My search on bugzilla
reveals 18 high priority bugs.
URL:
http://nagoya.apache.org/bugzilla/buglist.cgi?bug_status=NEWbug_status=ASSI
GNEDbug_status=REOPENEDpriority=Highemail1=emailtype1=substringemailass
igned_to1=1email2=emailtype2=substringemailreporter2=1bugidtype=include
bug_id=changedin=votes= 

Nonetheless, my query remains, is there a list of issues which
people can start working on now, that won't need to be re-done
once the redesign is on place.

Ben



My Comments:

1. Bear in mind that 'linefeed-treatment' need not 

cvs commit: xml-fop/src/org/apache/fop/viewer/resources resources.ja

2002-02-25 Thread chrisg

chrisg  02/02/25 07:24:45

  Added:   src/org/apache/fop/viewer/resources Tag: fop-0_20_2-maintain
resources.ja
  Log:
  added missing file
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.2.1   +26 -0 xml-fop/src/org/apache/fop/viewer/resources/Attic/resources.ja
  
Binary file
  
  

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




Re: Tool for generating bar graphs with Java

2002-02-25 Thread fred redf

Hi,
What do you want exactly to do? If you want to draw
that kind of graph in a pdf doc, you should have a
look at svg in fop.
If you want to generate xml files describing datas,
you can have a look at staroffice which generates xml
files that you can clean with an xsl.
Hope this helps,

Fred.

--- Roland [EMAIL PROTECTED] a écrit :  Hello,
 does anyone here know of a good tool to generate bar
 graphs, line graphs, 
 pie charts, scatter graphs with Java?
 
 Thanks, Roland
 
 

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

___
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

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




RE: Tool for generating bar graphs with Java

2002-02-25 Thread Sergei Timofejev

KavaChart

http://www.aoindustries.com/docs/javachart/api/chart.package.html


-Original Message-
From: Roland [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 25, 2002 5:33 PM
To: [EMAIL PROTECTED]
Subject: Tool for generating bar graphs with Java


Hello,
does anyone here know of a good tool to generate bar graphs, line graphs, 
pie charts, scatter graphs with Java?

Thanks, Roland


-
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: Tool for generating bar graphs with Java

2002-02-25 Thread Paul . Hussein


Inside or outside browser  ?




Roland [EMAIL PROTECTED] on 25/02/2002 16:02:51

Please respond to [EMAIL PROTECTED]



To:   [EMAIL PROTECTED]
cc:
Subject:  Tool for generating bar graphs with Java


Hello,
does anyone here know of a good tool to generate bar graphs, line graphs,
pie charts, scatter graphs with Java?

Thanks, Roland


-
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: [ANNOUNCEMENT] FOP 0.20.3 Release Candidate 2 available

2002-02-25 Thread Christian Geisert

 I checked my patche. The resources.ja file which included my 
 posted patch has NOT included in 0.20.3rc2.
 
 I repost only org/apache/fop/viewer/resources/resources.ja file.
 Please commit this file.


Done

 Regards.
 
 ---
 Satoshi Ishigami   VIC TOKAI CORPORATION

Christian


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




Re: Tool for generating bar graphs with Java

2002-02-25 Thread Louis . Masters


It's pretty easy to write your own in Java - took about a day for pie and
bar.  We use the JPEG encoder to create a physical image file.  The only
issue we are having is the quality of the JPEG images when rendered in
Adobe.

Let me know if you want some code snippets.

-Lou





Roland [EMAIL PROTECTED] on 02/25/2002 11:02:51

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:

Subject:  Tool for generating bar graphs with Java

Hello,
does anyone here know of a good tool to generate bar graphs, line graphs,
pie charts, scatter graphs with Java?

Thanks, Roland


-
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: Tool for generating bar graphs with Java

2002-02-25 Thread fred redf

Why don't you generate svg instead of jpeg?

--- [EMAIL PROTECTED] a écrit :  
 It's pretty easy to write your own in Java - took
 about a day for pie and
 bar.  We use the JPEG encoder to create a physical
 image file.  The only
 issue we are having is the quality of the JPEG
 images when rendered in
 Adobe.
 
 Let me know if you want some code snippets.
 
 -Lou
 
 
 
 
 
 Roland [EMAIL PROTECTED] on 02/25/2002
 11:02:51
 
 Please respond to [EMAIL PROTECTED]
 
 To:   [EMAIL PROTECTED]
 cc:
 
 Subject:  Tool for generating bar graphs with Java
 
 Hello,
 does anyone here know of a good tool to generate bar
 graphs, line graphs,
 pie charts, scatter graphs with Java?
 
 Thanks, Roland
 
 

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

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

___
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

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




break-before in table-row

2002-02-25 Thread Mickey, John

I have a situation in FOP where it is dropping off the last table-row if it
has a 'break-before' attribute set to 'page'. The second page is completely
blank. It works correctly if the 'break-before' is not in the last
table-row. Is this a bug in FOP or am I not interpreting the FO spec
correctly?

---
John Mickey

?xml version=1.0 encoding=UTF-8?
fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
   fo:layout-master-set
  fo:simple-page-master master-name=draft page-width=8.5in
page-height=11in margin-left=0.5in margin-right=0.5in
 fo:region-body margin-top=0.5in margin-bottom=0.5in/
  /fo:simple-page-master
   /fo:layout-master-set
   fo:page-sequence master-reference=draft
  fo:flow flow-name=xsl-region-body
 fo:block font-family=Courier font-size=12pt line-height=24pt
hyphenate=false text-align=justify background-color=grey
fo:table table-layout=fixed
   fo:table-column column-number=1 column-width=3.5in/
   fo:table-body
  fo:table-row
 fo:table-cell
fo:blockRow 1/fo:block
 /fo:table-cell
  /fo:table-row
  fo:table-row
 fo:table-cell
fo:blockRow 2/fo:block
 /fo:table-cell
  /fo:table-row
  fo:table-row break-before=page
 fo:table-cell
fo:blockRow 3/fo:block
 /fo:table-cell
  /fo:table-row
   /fo:table-body
/fo:table
 /fo:block
  /fo:flow
   /fo:page-sequence
/fo:root





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




Re: Tool for generating bar graphs with Java

2002-02-25 Thread Jim Wright

...or, go buy kavachart!

We use it -- I think it was only about $100 at the time, so it's fairly 
cheap. Generates pngs, jpegs, etc, that you can pretty easily imbed 
inside of your fop stuff.

just a thought.

jw

[EMAIL PROTECTED] wrote:

It's pretty easy to write your own in Java - took about a day for pie and
bar.  We use the JPEG encoder to create a physical image file.  The only
issue we are having is the quality of the JPEG images when rendered in
Adobe.

Let me know if you want some code snippets.

-Lou





Roland [EMAIL PROTECTED] on 02/25/2002 11:02:51

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:

Subject:  Tool for generating bar graphs with Java

Hello,
does anyone here know of a good tool to generate bar graphs, line graphs,
pie charts, scatter graphs with Java?

Thanks, Roland


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









-
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: [PROPOSAL] linebreak

2002-02-25 Thread Joerg Pietschmann

[EMAIL PROTECTED] (ewitness - Ben Fowler) wrote:
[snip]
 I don't mind admitting that as an outsider to the XML standard, this
 looks like a bad, even a really bad, idea.
 
 My reading of your commentary is Whitespace is sometimes respected,
 and only a langauge lawyer can tell you when.

Well, in some sense you are right, there are a lot of really
bad ideas hidden in this area. However, you have to see this
in context.

A *real* typesetter doesn't care about whitespace and line feeds,
he thinks in paragraphs and columns and pages of flowing text,
with various indentations and margins and such. TeX was practically
written to support this view, and this is the default how FO
processors work. The problem: not everybody is a typesetter, many
people don't even know about how to set indents and hanging indents
and margins and this stuff, but they have a space and an enter key
sitting squarely on their keyboard.

The correct way to express

procedure foo();
 begin
   dostuff:=false;
 end

would be something like:
fo:block
 fo:blockfoo();/fo:block
 fo:block margin-left=1em
  fo:blockbegin/fo:block
  fo:block margin-left=2em
   fo:blockdostuff:=false;/fo:block
  /fo:block
  fo:blockend/fo:block
 /fo:block
/fo:block
but chances are you'll get it space- or even (shudder!) tab-indented.
(Take a postal address block for another, less IT-related example)
[If i'd get a chance to correct the past, i probably kill the
inventor of the tab character before he commits his crime :-]

There is a lot of whitespace formatted data out there, and it is
unlikely to disappear in the near future. In order to deal with
realities, you can fine-tune how FO processors handle various forms
of white space. Actually, it is encouraged to do so only locally.

You might have noted that in HTML+CSS br actually *is* redundant,
it is just heavily (ab)used because it produces predictable results
without fumbling with gnarly CSS settings. Especially if you have to
bring already whitespace formatted data online *quickly*. Typewriter
habits are hard to get rid of, regardless how enraged professionals
are about this.

Regards
J.Pietschmann

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




Re: Tool for generating bar graphs with Java

2002-02-25 Thread Roland

At 04:36 PM 2/25/02 +0100, fred redf wrote:
Hi,
What do you want exactly to do? If you want to draw
that kind of graph in a pdf doc, you should have a
look at svg in fop.

I want to generate GIF files from Javacode. I should not be an applet but a 
standalone application...

Best regards, Roland


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




Re: Tool for generating bar graphs with Java

2002-02-25 Thread Louis . Masters


I'm getting around to it.  The only thing holding me back is my lack of
knowledge with how svg works.  I looked at the docs over at the apache
site, but have not touched it since then.  I'm guessing it is not as easy
as swapping out the jpeg encoder for a svg encoder?

-Lou





fred redf [EMAIL PROTECTED] on 02/25/2002 11:13:19

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:

Subject:  Re: Tool for generating bar graphs with Java

Why don't you generate svg instead of jpeg?

--- [EMAIL PROTECTED] a écrit : 
 It's pretty easy to write your own in Java - took
 about a day for pie and
 bar.  We use the JPEG encoder to create a physical
 image file.  The only
 issue we are having is the quality of the JPEG
 images when rendered in
 Adobe.

 Let me know if you want some code snippets.

 -Lou





 Roland [EMAIL PROTECTED] on 02/25/2002
 11:02:51

 Please respond to [EMAIL PROTECTED]

 To:   [EMAIL PROTECTED]
 cc:

 Subject:  Tool for generating bar graphs with Java

 Hello,
 does anyone here know of a good tool to generate bar
 graphs, line graphs,
 pie charts, scatter graphs with Java?

 Thanks, Roland



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










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


___
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

-
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: JDK 1.4 and fonts

2002-02-25 Thread Christian Geisert

Christopher Burkey wrote:

 Hi,
 
 Has anyone been able to compile FOP with JDK 1.4? It gets this far 
 in the build process:


[..]


 C:\src-workspaces\per\xml-fop\build\src\org\apache\fop\render\pdf\CodePointM 
 apping.java
 [style] Failed to process 
 C:\src-workspaces\per\xml-fop\build\src\codegen\encodings.xml


This worked for me (under Linux) as somebody already mentioned but
there will be another error later ..
Has anybody else these problems under windows ?

[..]

 BTW: This is all using 0.20.3 Under Windows 2000, JDK 1.4 final.
 
 Thanks!

Christian


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




Re: JDK 1.4 and fonts

2002-02-25 Thread Christian Geisert

Ramaprabhu Janakiraman wrote:

 funny, 
i compiled 0.20.3-rc  with 1.4-rc  and everything was smooth
 except for some problems with svg/PDFGraphics2D.java (a new abstract
 method in java.awt.GraphicsConfiguration ) that i had to put a stub for, 


This worked for me too but then it didn't compile anymore under 1.3 ;-(


 but it breezed thro' the encodings. 


 
 -ram

Christian


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




Re: [Understanding] Images [4]

2002-02-25 Thread Christian Geisert

Keiron Liddle wrote:

[..]

 There are a number of packages in Avalon that would be useful, such as 
 command line parsing.
 I would be for an integration in general espacially since cocoon uses it.


+1 Avalon sounds interesting (pooling etc.) but I did not have a
close look yet.

 There will be resistence to the extra jar.

So the consequence would be that we write our own xml-parser to save
a jar ;-)

Seriously, I think this does not really matter...
(Maybe we could produce a fop-all.jar which would include all the jars)

Christian


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




Re: PNG support in fop 0.20.3rc2

2002-02-25 Thread Christian Geisert

Sven Kitschke wrote:

 Hi all,
 
 after switching from fop 0.20.3rc to fop 0.20.3rc2 i was
 surprised about the broken PNG support. I got a lot
 of error messages like
 [ERROR]: Error while creating area : Error creating
 FopImage object (Error creating FopImage object
 (file:/path-to-bitmaps/img01.png) :
 org.apache.fop.image.JimiImage
 
 Finally i got it working - after a lot of time and
 copying jimi-1.0.jar to the lib directory and
 re-compiling the sources. The reason is the
 conditional compiling of the JimiImage.java only if the jimi.jar
 is present (build.xml).
 
 I think, possible solutions are:
 1. Please state this behavior more explicitly (You have to make
 your own fop.jar if you want PNG support.),


It is mentioned in lib/readme ;-)
We should probably add some release notes ..

 OR
 2. Make the Jimi support default - delete the conditional include
 of JimiImage.java.


This isn't possible because of licensing reasons
(don't ask me for details ;-)

3. Use another library

 My favorite is option 2.


Short term solution is 1.

 TIA, Sven

Christian


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




Re: break-before in table-row

2002-02-25 Thread Christian Geisert

Mickey, John wrote:

 I have a situation in FOP where it is dropping off the last table-row if it
 has a 'break-before' attribute set to 'page'. The second page is completely
 blank. It works correctly if the 'break-before' is not in the last
 table-row. Is this a bug in FOP or am I not interpreting the FO spec
 correctly?


Sounds like a bug, I will have a look at it (probably not before the
release)


 John Mickey

Christian


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




Re: Tool for generating bar graphs with Java

2002-02-25 Thread Robert Marcano

This tool ganerates many types of graphics, it is not related to FOP or 
any xml technology
http://chart2d.sourceforge.net/

Roland wrote:

 At 04:36 PM 2/25/02 +0100, fred redf wrote:

 Hi,
 What do you want exactly to do? If you want to draw
 that kind of graph in a pdf doc, you should have a
 look at svg in fop.


 I want to generate GIF files from Javacode. I should not be an applet 
 but a standalone application...

 Best regards, Roland


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



-- 
Robert Marcano (office: [EMAIL PROTECTED], personal: [EMAIL PROTECTED])
System Architect
http://www.marcanoonline.com/About_me/about_me.html

aol/netscape screen id: robmv
jabber id: [EMAIL PROTECTED]
msn messenger id: [EMAIL PROTECTED]
icq id: 101913663




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




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

2002-02-25 Thread klease

klease  02/02/25 13:27:12

  Removed: src/org/apache/fop/fo CharClass.java
  Log:
  Use util.CharUtilities instead

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




cvs commit: xml-fop/src/org/apache/fop/util CharUtilities.java

2002-02-25 Thread klease

klease  02/02/25 13:28:28

  Modified:src/org/apache/fop/util CharUtilities.java
  Log:
  Use CharUtilities instead of CharClass
  
  Revision  ChangesPath
  1.2   +42 -16xml-fop/src/org/apache/fop/util/CharUtilities.java
  
  Index: CharUtilities.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/util/CharUtilities.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CharUtilities.java8 Jan 2002 11:03:07 -   1.1
  +++ CharUtilities.java25 Feb 2002 21:28:28 -  1.2
  @@ -1,5 +1,5 @@
   /*
  - * $Id: CharUtilities.java,v 1.1 2002/01/08 11:03:07 keiron Exp $
  + * $Id: CharUtilities.java,v 1.2 2002/02/25 21:28:28 klease Exp $
* Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
* LICENSE file included with these sources.
  @@ -10,9 +10,36 @@
   import org.apache.fop.layout.FontState;
   
   /**
  + * This class provides utilities to distinguish various kinds of Unicode
  + * whitespace and to get character widths in a given FontState.
*/
   public class CharUtilities {
   
  +/** Character code used to signal a character boundary in
  + * inline content, such as an inline with borders and padding
  + * or a nested block object.
  + */
  +public static final char CODE_EOT=0;
  +
  +public static final int UCWHITESPACE=0; // unicode white space
  +public static final int LINEFEED=1;
  +public static final int EOT=2; // Boundary beteween text runs
  +public static final int NONWHITESPACE=3;
  +public static final int XMLWHITESPACE=4;
  +
  +
  +/**
  + * Return the appropriate CharClass constant for the type
  + * of the passed character.
  + */
  +public static int classOf(char c) {
  + if (c == CODE_EOT) return EOT;
  + if (c == '\n') return LINEFEED;
  + if ( c==' '|| c == '\r' || c=='\t' ) return XMLWHITESPACE;
  + if (isAnySpace(c)) return UCWHITESPACE;
  + return NONWHITESPACE;
  +}
  +
   /**
* Helper method for getting the width of a unicode char
* from the current fontstate.
  @@ -76,21 +103,20 @@
* it's not non-breaking
*/
   public static boolean isSpace(char c) {
  -if (c == ' ' || c == '\u2000' ||// en quad
  -c == '\u2001' ||// em quad
  -c == '\u2002' ||// en space
  -c == '\u2003' ||// em space
  -c == '\u2004' ||// three-per-em space
  -c == '\u2005' ||// four--per-em space
  -c == '\u2006' ||// six-per-em space
  -c == '\u2007' ||// figure space
  -c == '\u2008' ||// punctuation space
  -c == '\u2009' ||// thin space
  -c == '\u200A' ||// hair space
  -c == '\u200B')  // zero width space
  -return true;
  -else
  -return false;
  +return (c == ' ' ||
  + (c = '\u2000'  c = '\u200B'));
  +// c == '\u2000'   // en quad
  +// c == '\u2001'   // em quad
  +// c == '\u2002'   // en space
  +// c == '\u2003'   // em space
  +// c == '\u2004'   // three-per-em space
  +// c == '\u2005'   // four--per-em space
  +// c == '\u2006'   // six-per-em space
  +// c == '\u2007'   // figure space
  +// c == '\u2008'   // punctuation space
  +// c == '\u2009'   // thin space
  +// c == '\u200A'   // hair space
  +// c == '\u200B'   // zero width space
   }
   
   /**
  
  
  

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




Error in AWT Renderer

2002-02-25 Thread Jim Urban

If I generate a PDF, FOP runs just fine.  When I try to use the -awt option
to view the output, FOP gives me the following error.  Any ideas?  I am
running Fop 0.20.2.

Thanks,
Jim Urban
Product Manager
Netsteps Inc.


[INFO]: Parsing of document complete, stopping renderer
[ERROR]: Can't add attribute to 0-length text
org.apache.fop.apps.FOPException: Can't add attribute to 0-length text
at org.apache.fop.apps.Driver.render(Driver.java:464)
at org.apache.fop.apps.AWTStarter.run(AWTStarter.java:116)
at org.apache.fop.apps.Fop.main(Fop.java:19)

-

java.lang.IllegalArgumentException: Can't add attribute to 0-length text
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1048)
at org.apache.fop.apps.Driver.render(Driver.java:459)
at org.apache.fop.apps.AWTStarter.run(AWTStarter.java:116)
at org.apache.fop.apps.Fop.main(Fop.java:19)

-

java.lang.IllegalArgumentException: Can't add attribute to 0-length text
at
java.text.AttributedString.addAttribute(AttributedString.java:238)
at
org.apache.fop.render.awt.AWTRenderer.renderWordArea(AWTRenderer.java:627)
at org.apache.fop.layout.inline.WordArea.render(WordArea.java:31)
at
org.apache.fop.render.AbstractRenderer.renderLineArea(AbstractRenderer.java:
223)
at org.apache.fop.layout.LineArea.render(LineArea.java:162)
at
org.apache.fop.render.AbstractRenderer.renderBlockArea(AbstractRenderer.java
:192)
at org.apache.fop.layout.BlockArea.render(BlockArea.java:82)
at
org.apache.fop.render.AbstractRenderer.renderAreaContainer(AbstractRenderer.
java:158)
at org.apache.fop.layout.AreaContainer.render(AreaContainer.java:38)
at
org.apache.fop.render.AbstractRenderer.renderAreaContainer(AbstractRenderer.
java:158)
at org.apache.fop.layout.AreaContainer.render(AreaContainer.java:38)
at
org.apache.fop.render.AbstractRenderer.renderAreaContainer(AbstractRenderer.
java:158)
at org.apache.fop.layout.AreaContainer.render(AreaContainer.java:38)
at
org.apache.fop.render.AbstractRenderer.renderAreaContainer(AbstractRenderer.
java:158)
at org.apache.fop.layout.AreaContainer.render(AreaContainer.java:38)
at
org.apache.fop.render.AbstractRenderer.renderAreaContainer(AbstractRenderer.
java:158)
at
org.apache.fop.render.awt.AWTRenderer.renderPage(AWTRenderer.java:389)
at
org.apache.fop.render.awt.AWTRenderer.render(AWTRenderer.java:368)
at
org.apache.fop.render.awt.AWTRenderer.render(AWTRenderer.java:336)
at
org.apache.fop.render.awt.AWTRenderer.stopRenderer(AWTRenderer.java:896)
at
org.apache.fop.apps.StreamRenderer.stopRenderer(StreamRenderer.java:135)
at
org.apache.fop.fo.FOTreeBuilder.endDocument(FOTreeBuilder.java:201)
at
org.apache.xerces.parsers.SAXParser.endDocument(SAXParser.java:1230)
at
org.apache.xerces.validators.common.XMLValidator.callEndDocument(XMLValidato
r.java:1079)
at
org.apache.xerces.framework.XMLDocumentScanner$EndOfInputDispatcher.dispatch
(XMLDocumentScanner.java:1555)
at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.
java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035)
at org.apache.fop.apps.Driver.render(Driver.java:459)
at org.apache.fop.apps.AWTStarter.run(AWTStarter.java:116)
at org.apache.fop.apps.Fop.main(Fop.java:19)


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




AWT Error

2002-02-25 Thread Jim Urban

Attached is a sample fo file which will produce the error.

Jim Urban
Product Manager
Netsteps Inc.
Suite 505E
1 Pierce Pl.
Itasca, IL  60143
Voice:  (630) 250-3045 x2164
Fax:  (630) 250-3046


 


junk.fo
Description: Binary data

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


java.lang.OutOfMemoryError on large images

2002-02-25 Thread Sven Kitschke

Hi all,

fop 0.20.3rc2 does stop with a
OutOfMemoryError if (i assume) images have
too large dimensions (my example: PNG image
445 pixel width, 660 pixel height, 200dpi).
BTW, this error is not reproducable with an
image with the dimension i.e. 660x445.

I've tried to produce a minimal example:
?xml version=1.0 encoding=utf-8?
fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
  fo:layout-master-set
   fo:simple-page-master
  master-name=simple1 page-width=210mm page-height=297mm
  margin-top=1in margin-bottom=1in margin-left=1in 
margin-right=1in
fo:region-body margin-bottom=0.5in margin-top=1in/
   /fo:simple-page-master
  /fo:layout-master-set
  fo:page-sequence master-reference=simple1
   fo:flow flow-name=xsl-region-body
!-- no problem --
!-- fo:block --
!-- fop ends with an out of memory exception --
fo:block space-before.minimum=0.5em space-before.optimum=1em
   space-before.maximum=2em space-after.minimum=0.5em
   space-after.optimum=1em space-after.maximum=2em
 fo:external-graphic
src=../../../bitmaps/fop-test.png
width=auto height=auto
content-width=auto content-height=auto/
/fo:block
   /fo:flow
  /fo:page-sequence
/fo:root


Here is a output snippet:
...
[INFO]: [4172]
[INFO]: [4173]
java.lang.OutOfMemoryError
 no stack trace available
Exception in thread main

TIA, Sven


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




Fixing Inline Italic/Bold

2002-02-25 Thread David Wood

Is it just me, or does inlined italic or bold text create spurious spaces
on the line and violate the margins?

This is a pretty big problem. I'd like to fix it.

I posted a question about this on fop-user but got no response. I am
assuming this is a bug in FOP, and would really appreciate any comments
anyone one might have about what parts of the code might be relevant to a
fix.

-David



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




Clarification of reference-orientation

2002-02-25 Thread Arved Sandstrom

Hi, editors,

1. All mentions of reference-orientation inheritance in the spec say
something like yes (see prose). This includes Property Table Parts I and
II in the Property Summary, and Section 7.20.3.

The latter (the property description) indicates that the
reference-orientation _trait_ on an area is _indirectly_ derived from the
corresponding property on the FO that generated that area. Presumably this
alludes to Section 5.5.2, which states that

The reference-orientation trait is copied from the reference-orientation
property during refinement. During composition an absolute orientation is
determined (see Section 4.2.2 - Common Traits on page 14).

and in Section 4.2.2 it says

If the reference-orientation for an area is 0, then the top, bottom, left,
and right edges of the content are parallel to those of the area's parent
and consistent with them. Otherwise the edges are rotated from those of the
area's parent as described in Section 7.20.3 - 'reference-orientation' on
page 283.

I want to clarify that this process of determining an absolute orientation
for the _area_ is not confused with being a computed value for the
purposes of inheritance. Because a computed value for inheritance is the
computed value of an FO property, not the value of a trait.

2. I would like to clarify the inheritance  and trait derivation process,
particularly for the simple-page-master/region level.

Example 1: let's assume that a simple-page-master has a
reference-orientation of -90. This means that the TOP of the
page-reference-area is at 3 o'clock. The margin-top for the region-body is
at 3 o'clock, the margin-left is at 12 o'clock, the margin-right is at 6
o'clock, and the margin-bottom is at 9 o'clock.

If the region-body has no explicit specification of reference-orientation
then the spec tells me that the reference-orientation is -90 as inherited
from the simple-page-master. As a result, the region-reference-area is now
oriented with _its_ TOP at -180 (or 180, or 6 o'clock).

Is this correct? My reading of the spec tells me that the _indirect_
derivation alluded to above is merely the process of determining for the
latter case that TOP for the region-body is at 180, that is, the absolute
orientation is 180.

I am confused, perhaps needlessly so, by the addition of the see prose in
reference to inheritance of this property. Why is it there? There is no
complication about inheritance of this property; the computed value of the
_property_ is the same as the _specified_ value; what the _trait_ on the
_area_ is determined to be is something else entirely.

Example 2: let's assume that a top-level block-container specifies 90 for
the value of reference-orientation, and that the region-body TOP that
applies is also 90. What is the computed value for the reference-orientation
_property_ on the block-container? Is it 90 or 180? I interpret the spec as
saying that it is 90, and that if there was a nested block-container or
inline-container with no explicit specification it would inherit 90. The
_absolute orientation_ of the top-level block-container is 180, but this is
a trait.

Or is the see prose a suggestion that in fact the computed value on the
top-level block-container is 180? And that this is what potential descendant
block-containers or inline-containers would inherit? I hope not. I actually
don't think you mean this, but that see prose has thrown me for a loop.
:-)

Clarification welcome.

3. Why the different language when talking about reference-orientation for
region-before, region-after, region-start and region-end? I mean this:

The reference-orientation of the region-viewport-area is taken from the
value of the reference-orientation trait on the region-master which
specifies the region. reference-orientation of the region-reference-area is
set to 0 and is, therefore, the same as the orientation established by the
region-viewport-area.

This language is not used elsewhere. Section 6.4.13 says:

The reference-orientation trait of the fo:region-body is used to orient the
coordinate system of the region-reference-area generated by the
fo:region-body relative to the coordinate system of the page-reference-area
generated by fo:simple-page-master (and, therefore, relative to the viewport
positioned in that latter coordinate system).

and Sections 6.5.3 and 6.6.8 say nothing special at all. Is this
significant? Just curious.

Regards,
Arved Sandstrom


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




RE: Tool for generating bar graphs with Java

2002-02-25 Thread Michiel Verhoef

You can do that with batik, using SVG (Scalable Vector Graphics).
AFAIK batik is included in fop.

HTH,

Michiel

$ -Original Message-
$ From: Roland [mailto:[EMAIL PROTECTED]]
$ Sent: maandag 25 februari 2002 16:33
$ To: [EMAIL PROTECTED]
$ Subject: Tool for generating bar graphs with Java
$ 
$ 
$ Hello,
$ does anyone here know of a good tool to generate bar graphs, 
$ line graphs, 
$ pie charts, scatter graphs with Java?
$ 
$ Thanks, Roland
$ 
$ 
$ -
$ To unsubscribe, e-mail: [EMAIL PROTECTED]
$ For additional commands, email: [EMAIL PROTECTED]
$ 

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




[Understanding] SVG [6]

2002-02-25 Thread Keiron Liddle


SVG
---

SVG is rendered through Batik.
The XML from the XSL:FO document is converted into an SVG DOM with batik.
This DOM is then set as the Document on the Foreign Object area in the
Area Tree.
This DOM is then available to be rendered by the renderer.

SVG is rendered in the renderers via an XMLHandler in the FOUserAgent.
This XML handler is used to render the SVG. The SVG is rendered by using
batik. Batik converts the SVG DOM into an internal structure that can be
drawn into a Graphics2D. So for PDF we use a PDFGraphics2D to draw into.
This creates the necessary PDF information to create the SVG image in the
PDF document.
Most of the work is done in the PDFGraphics2D class. There are also a few
bridges that are plugged into batik to provide different behaviour for
some SVG elements.


Text Drawing


Normally batik converts text into a set of curved shapes. This is handled
as any other shapes when rendering to the output.
This is not always desirable as the shapes have very fine curves. This can
cause the output to look a bit bad in PDF and PS (it can be drawn properly
but is not by default). These curves also require much more data than the
original text.
To handle this there is a PDFTextElementBridge that is set when using the
bridge in batik. If the text is simple enough for the text to be drawn in
the PDF as with all other text then this sets the TextPainter to use the
PDFTextPainter. This inserts the text directly into the PDF using the
drawString method on the PDFGraphics2D.
Text is considered simple if the font is available, the font size is
useable and there are no tspans or other complications.
This can make the resulting PDF significantly smaller.


PDF Links
-

To support links in PDF another batik element bridge is used. The
PDFAElementBridge creates a PDFANode which inserts a link into the PDF
document via the PDFGraphics2D.
Since links are positioned on the page without any transforms then we need
to transform the coordinates of the link area so that they match the
current position of the a element area. This transform may also need to
account for the svg being positioned on the page.


Images
--

Images are normally drawn into the PDFGraphics2D. This then creates a
bitmap of the image data that can be inserted into the PDF document.
As PDF can support jpeg images then another element bridge is used so that
the jpeg can be directly inserted into the PDF.


PDF Transcoder
--

Batik provides a mechanism to convert SVG into various formats. Through
FOP we can convert an SVG document into a single paged PDF document. The
page contains the SVG drawn as best as possible on the page.
There is a PDFDocumentGraphics2D that creates a standalone PDF document
with a single page. This is then drawn into by batik in the same way as
with the PDFGraphics2D.


Other Outputs
-

When rendering to AWT the SVG is simply drawn onto the awt canvas using
batik.
The PS Renderer uses a similar technique as the PDF Renderer.
The SVG Renderer simply embeds the SVG inside an svg element.


Associated Tasks


To get accurate drawing pdf transparency is needed.
The drawRenderedImage methods need implementing.
Handle colour space better.
Improve link handling with pdf.
Improve image handling.


Note: this information is refering to the current development of FOP not 
any released version.

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