RE: fonts

2001-07-16 Thread Wolf Gustavo (SGC-EXT)

Thanks for the tip Rajeev,
Gustavo

-Message d'origine-
De : rajeev nair [mailto:[EMAIL PROTECTED]]
Envoye : lundi, 16. juillet 2001 07:18
A : [EMAIL PROTECTED]
Objet : Re: fonts


hello
why don't u make ur own font metric xml file for
arial?
You can make it from ttf files easily by using the
class TTFReader in fop.
regards
rajiv

--- Wolf Gustavo (SGC-EXT) [EMAIL PROTECTED]
wrote:
 Hi all,
 has someone implemmented Arial and
 Arial-italics?
 If the answer is yes, could I get the corresponding
 files?
 
 Also, does Helvetica (what I am replacing Arial
 with) have italics?
 
 Thanks once more,
  Gustavo
 

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


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.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: different Fonts in Same Line.

2001-07-16 Thread Jeremias Maerki

 I want to add 2-3 different fonts in same fo:block.
 means in a paragraph there is serif,Richa,Arial in
 same line.
 If i use fo:block it will be in different lines.
 I tried with fo:inline-sequence.but was in vain.
 can anyone help me?

Look at the samples. docs/examples/fo/testdeko.fo will help you.

Jeremias Märki

mailto:[EMAIL PROTECTED]

OUTLINE AG
Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
Fon +41 (41) 317 2020 - Fax +41 (41) 317 2029
Internet http://www.outline.ch


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




Re: Java Extensions in Xalan vs Fop

2001-07-16 Thread Gareth Noyce


 I understand this error to be along the lines of a Can't find class
 BchDate, as I had the same problem with Xalan whilst learning how to
 implement extensions.

 I think you're right, as far as the semantics of the ERROR message is
 concerned. One reason you can't find a class is because you didn't compile
 the source; are you sure you have the _classfile_ available that
corresponds
 to your BchDate class?

Hi, thanks for the reply,

Firstly, yes the class file is present on the class path. The class is
compiled -- I can call util.BchDate (I've just packaged it to follow your
example) from anywhere on the commandline and the function main I added to
test the classpath works as expected, passes a dummy date to getDate, and
the formatted string is returned. From this I take it that the java code is
correct, works fine, and is present (compiled) on the classpath.. All is
well in that regard.

As previsouly mentioned, all my files work fine in Xalan. No changes need to
be made _at all_ to get Xalan to run the Java and output an FO file. This is
also true for the test files created with your example code discussed below:

 My final example is very close to yours. Here is the stylesheet root:

Thanks for that, I've cut and past your example snippets into two new files,
and the errors returned by FOP are the same. However, when the bchext
namespace prefix is used I now get:

Error: For extension function, could not find method
java.lang.String.getDate([expressionContext])

To me this indicates that the xalan://util.BchDate prefix is being ignored
entirely. I see no reason why FOP should believe that getDate is a method of
class String and call it as such. It's not like getDate returns a string
even! :-)

So, with the failure of that may I ask you the following:

Are you running this under NT?
Where on your classpath did you put the util.BchDate package (ie:
c:\data\bch\javacode\)?
What version of FOP are you using?
Any other suggestions?!

Thanks for your time, Best Regards

Gareth Noyce


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




cvs commit: xml-fop/src/codegen foproperties.xml

2001-07-16 Thread arved

arved   01/07/16 03:35:47

  Modified:src/codegen foproperties.xml
  Log:
  AHS: initial marker support
  
  Revision  ChangesPath
  1.21  +15 -4 xml-fop/src/codegen/foproperties.xml
  
  Index: foproperties.xml
  ===
  RCS file: /home/cvs/xml-fop/src/codegen/foproperties.xml,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- foproperties.xml  2001/07/12 10:19:36 1.20
  +++ foproperties.xml  2001/07/16 10:35:47 1.21
  @@ -1527,25 +1527,36 @@
 property
   namemarker-class-name/name
   inheritedfalse/inherited
  -datatypeToBeImplemented/datatype
  +datatypeString/datatype
   default/default
 /property
 property
   nameretrieve-class-name/name
   inheritedfalse/inherited
  -datatypeToBeImplemented/datatype
  +datatypeString/datatype
   default/default
 /property
 property
   nameretrieve-position/name
   inheritedfalse/inherited
  -datatypeToBeImplemented/datatype
  +datatypeEnum/datatype
  +  enumeration
  +value const=FSWPfirst-starting-within-page/value
  +value const=FICfirst-including-carryover/value
  +value const=LSWPlast-starting-within-page/value
  +value const=LEWPlast-ending-within-page/value
  +  /enumeration
   defaultfirst-starting-within-page/default
 /property
 property
   nameretrieve-boundary/name
   inheritedfalse/inherited
  -datatypeToBeImplemented/datatype
  +datatypeEnum/datatype
  +  enumeration
  +value const=PAGEpage/value
  +value const=PAGE_SEQUENCEpage-sequence/value
  +value const=DOCUMENTdocument/value
  +  /enumeration
   defaultpage-sequence/default
 /property
   
  
  
  

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




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

2001-07-16 Thread arved

arved   01/07/16 03:36:48

  Modified:src/org/apache/fop/fo FONode.java FObj.java
  Log:
  AHS: initial marker support
  
  Revision  ChangesPath
  1.16  +36 -2 xml-fop/src/org/apache/fop/fo/FONode.java
  
  Index: FONode.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/FONode.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- FONode.java   2001/05/19 00:59:06 1.15
  +++ FONode.java   2001/07/16 10:36:48 1.16
  @@ -1,4 +1,4 @@
  -/*-- $Id: FONode.java,v 1.15 2001/05/19 00:59:06 arved Exp $ -- 
  +/*-- $Id: FONode.java,v 1.16 2001/07/16 10:36:48 arved 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,11 +10,14 @@
   // FOP
   import org.apache.fop.apps.FOPException;
   import org.apache.fop.layout.Area;
  +import org.apache.fop.layout.AreaClass;
   import org.apache.fop.layout.LinkSet;
   import org.apache.fop.system.BufferManager;
  +import org.apache.fop.fo.flow.Marker;
   
   // Java
   import java.util.Vector;
  +import java.util.Hashtable;
   
   /**
* base class for nodes in the formatting object tree
  @@ -23,6 +26,8 @@
   
   protected FObj parent;
   
  +protected String areaClass = AreaClass.UNASSIGNED;
  +  
public BufferManager bufferManager;

   public Vector children = new Vector();   // made public for searching 
for id's
  @@ -50,11 +55,22 @@
   
   protected LinkSet linkSet;
   
  +// count of areas generated-by/returned-by
  +public int areasGenerated = 0;
  +  
  +// markers
  +protected Hashtable markers;
  +
   protected FONode(FObj parent) {
  - this.parent = parent;
  + this.parent = parent;
if (parent != null) {
this.bufferManager = parent.bufferManager;
}
  + 
  + markers = new Hashtable();
  + 
  + if (null != parent)
  + this.areaClass = parent.areaClass;
   }
   
   public void setIsInTableCell() {
  @@ -202,4 +218,22 @@
}
((FONode) children.elementAt(this.marker)).rollback(snapshot);
}
  +
  +
  +  public void addMarker(Marker marker) throws FOPException {
  +   String mcname = marker.getMarkerClassName();
  +   if (!markers.containsKey(mcname)  children.isEmpty())
  +   markers.put(mcname, marker);
  +   else
  +   throw new FOPException(fo:marker must be an initial child, +
  +   and 'marker-class-name' must be unique for same parent);
  +  }
  +  
  +  public boolean hasMarkers() {
  +   return !markers.isEmpty();
  +  }
  +  
  +  public Vector getMarkers() {
  +   return new Vector(markers.values());
  +  }
   }
  
  
  
  1.18  +1 -3  xml-fop/src/org/apache/fop/fo/FObj.java
  
  Index: FObj.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/FObj.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- FObj.java 2001/06/07 06:47:59 1.17
  +++ FObj.java 2001/07/16 10:36:48 1.18
  @@ -1,4 +1,4 @@
  -/* $Id: FObj.java,v 1.17 2001/06/07 06:47:59 keiron Exp $
  +/* $Id: FObj.java,v 1.18 2001/07/16 10:36:48 arved 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.
  @@ -158,7 +158,5 @@
 p=parent);
   this.properties.setWritingMode(p.getProperty(writing-mode).getEnum());
 }
  -
  -
   }
   
  
  
  

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




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

2001-07-16 Thread arved

arved   01/07/16 03:37:58

  Modified:src/org/apache/fop/fo/flow Block.java
  Log:
  AHS: initial marker support
  
  Revision  ChangesPath
  1.35  +13 -1 xml-fop/src/org/apache/fop/fo/flow/Block.java
  
  Index: Block.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/Block.java,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- Block.java2001/07/13 02:30:33 1.34
  +++ Block.java2001/07/16 10:37:57 1.35
  @@ -1,4 +1,4 @@
  -/*-- $Id: Block.java,v 1.34 2001/07/13 02:30:33 arved Exp $-- */
  +/*-- $Id: Block.java,v 1.35 2001/07/16 10:37:57 arved Exp $-- */
   /*
* Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
  @@ -159,6 +159,17 @@
this.blockArea = new 
BlockArea(propMgr.getFontState(area.getFontInfo()), area.getAllocationWidth(),
area.spaceLeft(), 
startIndent, endIndent, textIndent,
align, alignLast, 
lineHeight);
  + this.blockArea.generatedBy = this;
  + this.areasGenerated++;
  + if (this.areasGenerated == 1)
  + this.blockArea.isFirst = true;
  + // for normal areas this should be the only pair
  + this.blockArea.addLineagePair(this, 
this.areasGenerated);
  + 
  + // markers
  + if (this.hasMarkers())
  + this.blockArea.addMarkers(this.getMarkers());
  + 
this.blockArea.setParent(area); // BasicLink needs it
blockArea.setPage(area.getPage());
blockArea.setBackgroundColor(backgroundColor);
  @@ -248,6 +259,7 @@
}
   
//MessageHandler.error( b:OK + marker +  );
  + this.blockArea.isLast = true;
return new Status(Status.OK);
}
   
  
  
  

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




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

2001-07-16 Thread arved

arved   01/07/16 03:43:40

  Modified:src/org/apache/fop/fo/flow Marker.java
  Log:
  AHS: initial marker support
  
  Revision  ChangesPath
  1.2   +68 -23xml-fop/src/org/apache/fop/fo/flow/Marker.java
  
  Index: Marker.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/Marker.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Marker.java   2001/07/13 12:36:09 1.1
  +++ Marker.java   2001/07/16 10:43:40 1.2
  @@ -1,4 +1,5 @@
  -/*-- $Id: Marker.java,v 1.1 2001/07/13 12:36:09 keiron Exp $ --
  +/*-- $Id: Marker.java,v 1.2 2001/07/16 10:43:40 arved 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.
  @@ -9,30 +10,74 @@
   // FOP
   import org.apache.fop.fo.*;
   import org.apache.fop.messaging.MessageHandler;
  -import org.apache.fop.fo.flow.*;
   import org.apache.fop.fo.properties.*;
  -import org.apache.fop.layout.AreaTree;
  +import org.apache.fop.layout.*;
  +import org.apache.fop.datatypes.*;
   import org.apache.fop.apps.FOPException;
   
  -/**
  - */
  -public class Marker extends ToBeImplementedElement {
  -
  -public static class Maker extends FObj.Maker {
  -public FObj make(FObj parent,
  - PropertyList propertyList) throws FOPException {
  -return new Marker(parent, propertyList);
  -}
  -}
  -
  -public static FObj.Maker maker() {
  -return new Marker.Maker();
  -}
  -
  -protected Marker(FObj parent,
  -   PropertyList propertyList) throws FOPException {
  -super(parent, propertyList);
  -this.name = fo:marker;
  -}
  +public class Marker extends FObjMixed {
   
  + private String markerClassName;
  + private Area registryArea;
  + 
  + public static class Maker extends FObj.Maker {
  + public FObj make(FObj parent, PropertyList propertyList) throws 
FOPException {
  + return new Marker(parent, propertyList);
  + }
  + }
  +
  + public static FObj.Maker maker() {
  + return new Marker.Maker();
  + }
  +
  + public Marker(FObj parent, PropertyList propertyList) {
  + super(parent, propertyList);
  + this.name = fo:marker;
  + 
  + // do check to see that 'this' is under fo:flow
  + 
  + this.markerClassName = 
this.properties.get(marker-class-name).getString();
  + 
  + // check to ensure that no other marker with same parent
  + // has this 'marker-class-name' is in addMarker() method
  + try {
  + parent.addMarker(this);
  + } catch (FOPException fopex) {
  + MessageHandler.error(marker cannot be added to ' + parent + 
');
  + }
  + }
  +
  +   public Status layout(Area area) throws FOPException {
  + // no layout action desired
  + this.registryArea = area;
  + area.getPage().registerMarker(this);
  + // System.out.println(Marker being registered in area ' + area + 
');
  + return new Status(Status.OK);
  +   }
  +
  + public Status layoutMarker(Area area) throws FOPException {
  + if (this.marker == START)
  + this.marker = 0;
  + 
  + int numChildren = this.children.size();
  + for (int i = this.marker; i  numChildren; i++) {
  + FONode fo = (FONode) children.elementAt(i);
  + 
  + Status status;
  + if ((status = fo.layout(area)).isIncomplete()) {
  + this.marker = i;
  + return status;
  + }
  + }
  + 
  + return new Status(Status.OK);
  + }
  +
  + public String getMarkerClassName() {
  + return markerClassName;
  + }
  + 
  + public Area getRegistryArea() {
  + return registryArea;
  + }
   }
  
  
  

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




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

2001-07-16 Thread arved

arved   01/07/16 03:43:51

  Modified:src/org/apache/fop/fo/flow RetrieveMarker.java
  Log:
  AHS: initial marker support
  
  Revision  ChangesPath
  1.2   +103 -22   xml-fop/src/org/apache/fop/fo/flow/RetrieveMarker.java
  
  Index: RetrieveMarker.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/RetrieveMarker.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RetrieveMarker.java   2001/07/13 12:36:16 1.1
  +++ RetrieveMarker.java   2001/07/16 10:43:51 1.2
  @@ -1,4 +1,5 @@
  -/*-- $Id: RetrieveMarker.java,v 1.1 2001/07/13 12:36:16 keiron Exp $ --
  +/*-- $Id: RetrieveMarker.java,v 1.2 2001/07/16 10:43:51 arved 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.
  @@ -9,30 +10,110 @@
   // FOP
   import org.apache.fop.fo.*;
   import org.apache.fop.messaging.MessageHandler;
  -import org.apache.fop.fo.flow.*;
   import org.apache.fop.fo.properties.*;
  -import org.apache.fop.layout.AreaTree;
  +import org.apache.fop.layout.*;
  +import org.apache.fop.datatypes.*;
   import org.apache.fop.apps.FOPException;
   
  -/**
  - */
  -public class RetrieveMarker extends ToBeImplementedElement {
  +// Java
  +import java.util.Vector;
   
  -public static class Maker extends FObj.Maker {
  -public FObj make(FObj parent,
  - PropertyList propertyList) throws FOPException {
  -return new RetrieveMarker(parent, propertyList);
  -}
  -}
  -
  -public static FObj.Maker maker() {
  -return new RetrieveMarker.Maker();
  -}
  -
  -protected RetrieveMarker(FObj parent,
  -   PropertyList propertyList) throws FOPException {
  -super(parent, propertyList);
  -this.name = fo:retrieve-marker;
  -}
  +public class RetrieveMarker extends FObjMixed {
   
  + private String retrieveClassName;
  + private int retrievePosition;
  + private int retrieveBoundary;
  + 
  + public static class Maker extends FObj.Maker {
  + public FObj make(FObj parent, PropertyList propertyList) throws 
FOPException {
  + return new RetrieveMarker(parent, propertyList);
  + }
  + }
  +
  + public static FObj.Maker maker() {
  + return new RetrieveMarker.Maker();
  + }
  +
  + public RetrieveMarker(FObj parent, PropertyList propertyList) {
  + super(parent, propertyList);
  + this.name = fo:retrieve-marker;
  + 
  + this.retrieveClassName = 
this.properties.get(retrieve-class-name).getString();
  + this.retrievePosition = 
this.properties.get(retrieve-position).getEnum();
  + this.retrieveBoundary = 
this.properties.get(retrieve-boundary).getEnum();
  + }
  +
  + public Status layout(Area area) throws FOPException {
  + // locate qualifying areas by 'marker-class-name' and
  + // 'retrieve-boundary'. Initially we will always check
  + // the containing page
  + Page containingPage = area.getPage();
  + Marker bestMarker = searchPage(containingPage);
  + 
  + // if marker not yet found, and 'retrieve-boundary' permits,
  + // search forward by Page
  + /* insert code for searching forward by Page, if allowed */
  + 
  + Status status = new Status(Status.AREA_FULL_NONE);
  + if (null != bestMarker) {
  + // System.out.println(Laying out marker in area ' + area + 
');
  + status = bestMarker.layoutMarker(area);
  + }
  + 
  + return status;
  + }
  + 
  + private Marker searchPage(Page page) throws FOPException {
  + Vector pageMarkers = page.getMarkers();
  + if (pageMarkers.isEmpty())
  + return null;
  + 
  + // search forward if 'first-starting-within-page' or
  + // 'first-including-carryover'
  + Marker fallback = null;
  + if (retrievePosition == RetrievePosition.FIC) {
  + for (int c = 0; c  pageMarkers.size(); c++) {
  + Marker currentMarker = 
(Marker)pageMarkers.elementAt(c);
  + if 
(currentMarker.getMarkerClassName().equals(retrieveClassName))
  + return currentMarker;
  + }
  + 
  + } else if (retrievePosition == RetrievePosition.FSWP) {
  + for (int c = 0; c  pageMarkers.size(); c++) {
  + Marker currentMarker = 

cvs commit: xml-fop/src/org/apache/fop/fo/pagination Root.java PageSequence.java

2001-07-16 Thread arved

arved   01/07/16 03:45:08

  Modified:src/org/apache/fop/fo/pagination Root.java PageSequence.java
  Log:
  AHS: initial marker support
  
  Revision  ChangesPath
  1.12  +2 -1  xml-fop/src/org/apache/fop/fo/pagination/Root.java
  
  Index: Root.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/Root.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Root.java 2001/07/09 03:03:24 1.11
  +++ Root.java 2001/07/16 10:45:08 1.12
  @@ -1,4 +1,4 @@
  -/*-- $Id: Root.java,v 1.11 2001/07/09 03:03:24 arved Exp $ --
  +/*-- $Id: Root.java,v 1.12 2001/07/16 10:45:08 arved 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.
  @@ -48,6 +48,7 @@
   this.name = fo:root;
   
   pageSequences = new Vector();
  + 
   if (parent != null) {
   throw new FOPException(root must be root element);
   }
  
  
  
  1.32  +5 -3  xml-fop/src/org/apache/fop/fo/pagination/PageSequence.java
  
  Index: PageSequence.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/PageSequence.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- PageSequence.java 2001/07/09 03:01:12 1.31
  +++ PageSequence.java 2001/07/16 10:45:08 1.32
  @@ -1,4 +1,4 @@
  -/*-- $Id: PageSequence.java,v 1.31 2001/07/09 03:01:12 arved Exp $ --
  +/*-- $Id: PageSequence.java,v 1.32 2001/07/16 10:45:08 arved 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.
  @@ -241,8 +241,6 @@
   
   MessageHandler.log( [ + currentPageNumber);
   
  -formatStaticContent(areaTree);
  -
   if ((status.getCode() == Status.FORCE_PAGE_BREAK_EVEN) 
   ((currentPageNumber % 2) == 1)) {
   } else if ( (status.getCode() == Status.FORCE_PAGE_BREAK_ODD) 
  @@ -265,6 +263,10 @@
   }
   
   }
  +
  + // because of markers, do after fo:flow
  +formatStaticContent(areaTree);
  +
   MessageHandler.log(]);
   areaTree.addPage(currentPage);
this.pageCount++;   // used for 'force-page-count' 
calculations
  
  
  

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




cvs commit: xml-fop/src/org/apache/fop/layout Page.java Area.java

2001-07-16 Thread arved

arved   01/07/16 03:45:43

  Modified:src/org/apache/fop/layout Page.java Area.java
  Log:
  AHS: initial marker support
  
  Revision  ChangesPath
  1.13  +12 -1 xml-fop/src/org/apache/fop/layout/Page.java
  
  Index: Page.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/Page.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Page.java 2001/07/08 05:04:56 1.12
  +++ Page.java 2001/07/16 10:45:43 1.13
  @@ -1,4 +1,4 @@
  -/* $Id: Page.java,v 1.12 2001/07/08 05:04:56 arved Exp $
  +/* $Id: Page.java,v 1.13 2001/07/16 10:45:43 arved 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.
  @@ -38,10 +38,13 @@
   
   private Vector footnotes = null;
   
  + private Vector markers = null;
  + 
   Page(AreaTree areaTree, int height, int width) {
this.areaTree = areaTree;
this.height = height;
this.width = width;
  + markers = new Vector();
   }
   
   public void setNumber(int number) {
  @@ -172,4 +175,12 @@
   }
   footnotes.addElement(fb);
   }
  + 
  + public void registerMarker(Marker marker) {
  + markers.addElement(marker);
  + }
  + 
  + public Vector getMarkers() {
  + return this.markers;
  + }
   }
  
  
  
  1.21  +31 -3 xml-fop/src/org/apache/fop/layout/Area.java
  
  Index: Area.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/Area.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- Area.java 2001/07/13 02:31:14 1.20
  +++ Area.java 2001/07/16 10:45:43 1.21
  @@ -1,4 +1,4 @@
  -/* $Id: Area.java,v 1.20 2001/07/13 02:31:14 arved Exp $
  +/* $Id: Area.java,v 1.21 2001/07/16 10:45:43 arved 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.
  @@ -8,9 +8,11 @@
   
   // FOP
   import org.apache.fop.datatypes.*;
  +import org.apache.fop.fo.flow.Marker;
   
   // Java
   import java.util.Vector;
  +import java.util.Hashtable;
   
   abstract public class Area extends Box {
   
  @@ -46,12 +48,29 @@
   
   private IDReferences idReferences;
   
  + protected Vector markers;
  + 
  + // as defined in Section 6.1.1
  + public org.apache.fop.fo.FObj generatedBy;  // corresponds to 
'generated-by' trait
  + protected Hashtable returnedBy;
  + 
  + // as defined in Section 6.1.1
  + protected String areaClass;
  + 
  + // as defined in Section 4.2.2
  + public boolean isFirst = false;
  + public boolean isLast = false;
  + 
   /* author : Seshadri G
   ** the fo which created it */
  + // This is deprecated and should be phased out in
  + // favour of using 'generatedBy'
   public org.apache.fop.fo.FObj foCreator; 
   
   public Area (FontState fontState) {
  - setFontState(fontState);
  + setFontState(fontState);
  + this.markers = new Vector();
  + this.returnedBy = new Hashtable();
   }
   
   /**
  @@ -64,10 +83,12 @@
* for this Area (its allocation rectangle)
*/
   public Area (FontState fontState, int allocationWidth, int maxHeight) {
  - setFontState(fontState);
  + setFontState(fontState);
   this.allocationWidth = allocationWidth;
   this.contentRectangleWidth = allocationWidth;
   this.maxHeight = maxHeight;
  + this.markers = new Vector();
  + this.returnedBy = new Hashtable();
   }
   
 private void setFontState(FontState fontState) {
  @@ -340,4 +361,11 @@
   return bp;
 }
   
  +  public void addMarkers(Vector markers) {
  +   markers.addAll(markers);
  +  }
  +  
  +  public void addLineagePair(org.apache.fop.fo.FObj fo, int areaPosition) {
  +   returnedBy.put(fo, new Integer(areaPosition));
  +  }
   }
  
  
  

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




cvs commit: xml-fop/src/org/apache/fop/layout AreaClass.java

2001-07-16 Thread arved

arved   01/07/16 03:46:15

  Added:   src/org/apache/fop/layout AreaClass.java
  Log:
  AHS: initial marker support
  
  Revision  ChangesPath
  1.1  xml-fop/src/org/apache/fop/layout/AreaClass.java
  
  Index: AreaClass.java
  ===
  /* $Id: AreaClass.java,v 1.1 2001/07/16 10:46:14 arved 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.
   */
  
  package org.apache.fop.layout;
  
  import org.apache.fop.apps.FOPException;
  
  public class AreaClass {
public static String UNASSIGNED = unassigned;
  
public static String XSL_NORMAL = xsl-normal;
public static String XSL_ABSOLUTE = xsl-absolute;
public static String XSL_FOOTNOTE = xsl-footnote;
public static String XSL_SIDE_FLOAT = xsl-side-float;
public static String XSL_BEFORE_FLOAT = xsl-before-float;

// checker method
public static String setAreaClass(String areaClass)
throws FOPException {
if (areaClass.equals(XSL_NORMAL) || areaClass.equals(XSL_ABSOLUTE) ||
areaClass.equals(XSL_FOOTNOTE) || 
areaClass.equals(XSL_SIDE_FLOAT) ||
areaClass.equals(XSL_BEFORE_FLOAT))
return areaClass;
else
throw new FOPException(Unknown area class ' + areaClass + 
');
}
  }
  
  
  
  

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




Markers; Other Stuff

2001-07-16 Thread Arved Sandstrom

The rudiments of fo:marker and fo:retrieve-marker support are appearing. 
Consider this a true commit early, commit often kind of endeavour; FOP 
doesn't break, the marker support should be transparent, and parts of it even 
work after a fashion (retrieve-boundary with a value of 'page', combined 
with some of the values of retrieve-position). But it isn't intentional at 
this point that any of it really _works_; consider it pre-alpha and untested.

I am focusing on a nucleus of supporting markers inside fo:block (the lazy 
but useful approach) initially. I plan to gradually expand that out to other 
legal parents of fo:marker. You will have noticed other stuff appear; this 
not only supports markers but should support other stuff also:

1) AreaClass.java in 'layout': this is a utility class, basically. It 
supplies a verification method. I have never discovered a nice way of doing 
enums in Java, so I don't (we'll have to wait for 1.4 or 1.5, I guess).

2) Areas now have isFirst, isLast, generatedBy and returnedBy traits. Using 
them properly, or at all, is more a matter of Scout's honour than anything 
else, because of the way FOP is. Block.java shows how I am using them there.

Finishing off marker support should actually not require that much more 
effort; I'm hoping to have it done within the week. If you happen to be 
working in a particular FO that can have markers, please add the support code 
if you like. More the merrier. Making sure that the traits listed in (2) are 
properly set on all areas we generate/return is much more of a task, but we 
have to start somewhere.

As I say, everything should build, and existing stuff shouldn't notice any of 
this. Please let me know if that is not the case.

Regards,
Arved Sandstrom
-- 
Fairly Senior Software Type
e-plicity (http://www.e-plicity.com)
Halifax, Nova Scotia
Wireless * B2B * J2EE * XML

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




Re: different Fonts in Same Line.

2001-07-16 Thread Petr Andrs

this should be done via fo:wrapper, but this is broken inf FOP, So try 
using fo:inline

pa 

On 16 Jul 2001, at 1:28 rajeev nair wrote about different Fonts in Same Line. :

 hello,
 I want to add 2-3 different fonts in same fo:block.
 means in a paragraph there is serif,Richa,Arial in
 same line.
 If i use fo:block it will be in different lines.
 I tried with fo:inline-sequence.but was in vain.
 can anyone help me?
 regards
 rajiv


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




Re: different Fonts in Same Line.

2001-07-16 Thread rajeev nair

Hello Jeremias,
Thanks a lot for ur suggestion.But I couldn't get
anything relevant there.any more help ?
best regards
rajiv
--- Jeremias Maerki [EMAIL PROTECTED]
wrote:
  I want to add 2-3 different fonts in same
 fo:block.
  means in a paragraph there is serif,Richa,Arial in
  same line.
  If i use fo:block it will be in different lines.
  I tried with fo:inline-sequence.but was in vain.
  can anyone help me?
 
 Look at the samples. docs/examples/fo/testdeko.fo
 will help you.
 
 Jeremias Märki
 
 mailto:[EMAIL PROTECTED]
 
 OUTLINE AG
 Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
 Fon +41 (41) 317 2020 - Fax +41 (41) 317 2029
 Internet http://www.outline.ch
 
 

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


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

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




Re: FOP memory profile

2001-07-16 Thread Chetan Vig

Hi Mark,

I am also looking for this memory problem solution. I like your
analysis. Please do continue to work on it and apply the patches and
keep me posted.

Cheers,

Chetan Vig



Mark wrote:

 Howdy fopsters

 Yesterday I spent about 10 hours with FOP, vi, and a memory profiler
 (JProbe 3 profiler - evaluation version, amazing product, but rather
 expensive :-{ ). I have some observations of the FOP code that I
 thought would be useful to share.

 Firstly I understand that FOP is being redesigned. I followed the
 thread there a bit and one of the main concerns, as I recall, was that
 FOP is hard for newbies (like me) to understand. I would say that this
 is not true. I actually found FOP reasonably easy to get around.
 Considering that yesterday is the first time I've managed to really
 get into the guts of it, and that I probably am familiar with only
 half a percent of the code base, I would say that generally FOP is
 pretty well written and reasonably straightforward. Perhaps there are
 areas of it that need refactoring and documenting (and formatting to 8
 character tabs ;) but from what I saw of it ... I figured that any
 redesign would be equally impenetrable, as all large code bases are.
 Anyway, that's just my .02c from the 'newbie FOP programmer'
 perspective.

 My goals for the profiling were to enable FOP to process large
 documents with a standard environment (64Mb heap on JDK1.3.1 for
 Linux). I have a 4,500 page document (containing a very simple
 structure) and standard FOP dies at 600 pages. (By the end of the day
 it was up to over 3,000 pages). I discovered the -buf argument and
 tried that but that only extended the run to 900 pages and took about
 3x the amount of time. My eventual goal is for fast processing of an
 unlimited number of pages, but I'll personally be happy at 10,000
 slightly more complex pages.

 Basically what I discovered with the profiler was that there are a
 large amount of objects being hung onto for a long time. (obviously
 ;). In particular, the Block object holds a reference to a BlockArea
 object in a member field (blockArea), but the blockArea member is
 referenced only twice in other methods for simple field calls. Making
 the BlockArea a local variable for the layout(Area) method
 significantly reduces memory consumption. (I'll post patches, if
 desired, once the thread is complete). In otherwise unmodified code,
 this change increased the number of pages I could process from 600 to
 over 1,000.

 Another object that's hanging around a lot is the Page object. This
 one was more tricky and it took me ages to work out how to deal with
 it, but finally I discovered that it appears that the processing in
 FOP can be pipelined. So I hacked FOP to pipeline the format-render
 cycle, so as each page is formatted it is sent to the (PDF) renderer
 immediately. This hack allowed me to increase the page count to over
 3,000 pages, but the problem is that the hack made the IDReferences
 always empty. More on that shortly.

 It seems to me from inspection and my limited knowledge of what I'm
 doing, that it should be possible to completely pipeline FOP at the
 level of the fo:page-sequence, without major changes to FOP. My
 experience so far with pipelining the format-render steps was very
 positive (it worked first time!) and I am interested in looking at
 formatting immediately after receiving the /fo:page-sequence. I also
 noted in my travels through the code that PDFRenderer seems to hang
 onto a lot of stuff that it could probably write out immediately, if
 it had a stream to write to. So, all this raises a few questions:

 * How to deal with the IDReferences? (let the renderer deal with it?
 do two passes?). I don't fully understand the full purpose and
 implementation of IDReferences at the moment but at a guess it's used
 to resolve forward references in the FO file...? I'm sure that it's
 possible to at least optimize this.

 * Is there something in XML:FO that means I can't process on receipt
 of /fo:page-sequence?

 * Am I just being stupid?

 The benefits to this approach as I see it are:

 * Probably not too many changes to FOP internals

 * Will use significantly less memory even for small jobs

 * Will increase the number of applications for FOP

 I'm interested in continuing this line of experimental work if
 anyone's interested. As always kudos to the developers, I spent a very
 pleasant saturday with your code.

 Regards
 Mark Lillywhite


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




Re: fonts

2001-07-16 Thread Hoang Nam

Hello,

When you use the fonts embbedded ( with metric files), do you increase the
size of the file , don't you ?

Nam


- Original Message -
From: rajeev nair [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, July 16, 2001 7:18 AM
Subject: Re: fonts


 hello
 why don't u make ur own font metric xml file for
 arial?
 You can make it from ttf files easily by using the
 class TTFReader in fop.
 regards
 rajiv

 --- Wolf Gustavo (SGC-EXT) [EMAIL PROTECTED]
 wrote:
  Hi all,
  has someone implemmented Arial and
  Arial-italics?
  If the answer is yes, could I get the corresponding
  files?
 
  Also, does Helvetica (what I am replacing Arial
  with) have italics?
 
  Thanks once more,
   Gustavo
 
 
 -
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, email:
  [EMAIL PROTECTED]
 


 __
 Do You Yahoo!?
 Get personalized email addresses from Yahoo! Mail
 http://personal.mail.yahoo.com/

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


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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




[Bug 2638] New: - How to include non xml svg?

2001-07-16 Thread bugzilla

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

*** shadow/2638 Mon Jul 16 06:12:28 2001
--- shadow/2638.tmp.4496Mon Jul 16 06:12:28 2001
***
*** 0 
--- 1,132 
+ ++
+ | How to include non xml svg?|
+ ++
+ |Bug #: 2638Product: Fop |
+ |   Status: NEW Version: 0.17|
+ |   Resolution:Platform: PC  |
+ | Severity: Normal   OS/Version: Windows NT/2K   |
+ | Priority: Other Component: svg |
+ ++
+ |  Assigned To: [EMAIL PROTECTED]   |
+ |  Reported By: [EMAIL PROTECTED]  |
+ |  CC list: Cc:  |
+ ++
+ |  URL:  |
+ ++
+ |  DESCRIPTION   |
+ Hello
+ 
+ I have to generate pdf files including svg. The svg are generated by an 
+ external chart generator and not xml.
+ 
+ The batic svg browser and applications like Adobe SVG Viewer read and shows 
+ such files correctly.
+ 
+ I tried to generate pdf with such svg in different ways without success.
+ An external-graphic or an instream-foreign-object seems to expect a xml svg.
+ 
+  
+ fo:external-graphic src=http://localhost:81/myGenerator; /
+ or fo:external-graphic src= myGeneratedChart.svg /
+ causes the error:
+ [1ERROR LOADING EXTERNAL SVG: An invalid XML character (Unicode: 0x1f) was 
+ found in the prolog of the document.
+ 
+ 
+ So I tried svg:image. But there occurred a NoSuchMethodException.
+ 
+ The source:
+ 
+ fo:instream-foreign-object
+ svg:svg xmlns:svg='http://www.w3.org/2000/svg' width='15cm' height='15cm'
+ svg:image src=”http://localhost:81/myGenerator”
+  width='11cm' height='11cm'/
+ /svg:svg
+ /fo:instream-foreign-object
+ 
+ causes:
+ java.lang.reflect.InvocationTargetException: java.lang.NoSuchMethodError
+ java.lang.Throwable()
+ java.lang.Error()
+ java.lang.LinkageError()
+ java.lang.IncompatibleClassChangeError()
+ java.lang.NoSuchMethodError()
+ org.apache.batik.util.ParsedURLData(java.net.URL)
+ org.apache.batik.util.ParsedURLData(java.net.URL)
+ org.apache.batik.util.ParsedURLData 
+ org.apache.batik.util.ParsedURLDefaultProtocolHandler.constructParsedURLData
+ (java.net.URL)
+ org.apache.batik.util.ParsedURLData 
+ org.apache.batik.util.ParsedURLDefaultProtocolHandler.parseURL(java.lang.String)
+ org.apache.batik.util.ParsedURLData 
+ org.apache.batik.util.ParsedURL.parseURL(java.lang.String)
+ org.apache.batik.util.ParsedURLData 
+ org.apache.batik.util.ParsedURL.parseURL(java.lang.String, java.lang.String)
+ org.apache.batik.util.ParsedURL(java.lang.String, java.lang.String)
+ org.apache.batik.gvt.GraphicsNode 
+ org.apache.batik.bridge.SVGImageElementBridge.createGraphicsNode
+ (org.apache.batik.bridge.BridgeContext, org.w3c.dom.Element)
+ void org.apache.batik.bridge.GVTBuilder.buildGraphicsNode
+ (org.apache.batik.bridge.BridgeContext, org.w3c.dom.Element, 
+ org.apache.batik.gvt.CompositeGraphicsNode)
+ void org.apache.batik.bridge.GVTBuilder.buildComposite
+ (org.apache.batik.bridge.BridgeContext, org.w3c.dom.Element, 
+ org.apache.batik.gvt.CompositeGraphicsNode)
+ org.apache.batik.gvt.GraphicsNode 
+ org.apache.batik.bridge.GVTBuilder.build(org.apache.batik.bridge.BridgeContext, 
+ org.w3c.dom.Document)
+ void org.apache.fop.render.pdf.PDFRenderer.renderSVGDocument
+ (org.w3c.dom.Document, int, int, org.apache.fop.layout.FontState)
+ void org.apache.fop.render.pdf.PDFRenderer.renderSVGArea
+ (org.apache.fop.svg.SVGArea)
+ void org.apache.fop.svg.SVGArea.render
+ (org.apache.fop.render.Renderer)
+ void org.apache.fop.render.pdf.PDFRenderer.renderForeignObjectArea
+ (org.apache.fop.layout.inline.ForeignObjectArea)
+ void org.apache.fop.layout.inline.ForeignObjectArea.render
+ (org.apache.fop.render.Renderer)
+ void org.apache.fop.render.PrintRenderer.renderLineArea
+ (org.apache.fop.layout.LineArea)
+ void org.apache.fop.layout.LineArea.render
+ (org.apache.fop.render.Renderer)
+ void 

Re: fonts

2001-07-16 Thread Petr Andrs

Yes, fonts are stored in PDF file so it is bigger. But there is no 
other way how to display glyphs which are not included in standard 
fonts supplied with acrobat reader.

pa

On 25 Jul 2001, at 14:50 Hoang Nam wrote about Re: fonts :

 Hello,
 
 When you use the fonts embbedded ( with metric files), do you increase
 the size of the file , don't you ?
 
 Nam
 
 - Original Message -
 From: rajeev nair [EMAIL PROTECTED]
 
  hello
  why don't u make ur own font metric xml file for
  arial?
  You can make it from ttf files easily by using the
  class TTFReader in fop.
  regards
  rajiv
 
  --- Wolf Gustavo (SGC-EXT) [EMAIL PROTECTED]
  wrote:
   Hi all,
   has someone implemmented Arial and
   Arial-italics?
   If the answer is yes, could I get the corresponding
   files?
  
   Also, does Helvetica (what I am replacing Arial
   with) have italics?
  
   Thanks once more,
  Gustavo


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




PDF serialization

2001-07-16 Thread Mark



Hi ho fops and fopettes,

I have had a look at the memory use of my modified-for-streaming FOP executable and determined that the primary memory constraint is now in the PDF renderer. Basically, because the PDF renderer keeps all objects in memory until the end, this obviously limits the size of the output document. I can't say if other renderers have this issue because I haven't looked.

I have had a look at the PDF renderer and I think it should be possible to serialize it with only a minimal amount of data being kept in RAM. However this will require extensive changes to the PDF renderer, because there doesn't seem to be a single point at which I can cleanly introduce the changes. Presumably these changes will be backwards-compatible with the current FOP since I don't want to actually change the code path, just make it so that the results are written earlier.

So I was wondering if there was someone I should be speaking with directly about the changes that I want to make, or if I should just barge on ahead and make them, damn the torpedoes pip pip old chap? I would prefer some guidance about this because I don't actually know anything about PDF, but the code is well commented.

Obviously my primary interest is in the PDF renderer at this stage, but I'm interested to know if other renderer writers are interested in my work?

As an aside: is there a style guide for FOP code? I must say I find the style and layout very confusing and I'm happy to clean things up as I go. At the moment I can't even work out what tab stop size people are using. (In my own work I use 8 character tabs with 2 character indenting).

Cheers
Mark



Use of non-private member fields, etc

2001-07-16 Thread Mark



Hey there foptologists

I was just wondering if there has been any discussion about private vs non-private member fields for the FOP classes. I have noticed that there are a lot of non-private (generally package-private default visibility) member fields and most of them do not appear to be referenced anywhere else in FOP. Unfortunately when changing a package-private field one must recompile the entire package to make sure something isn't thereby broken. If a field is class-private then one can be sure that it is not used anywhere else and can change it with (relative) impunity.

Now I know that I am just saying stuff that everyone knows, so I was wondering if there was some explicit reason for the use of package-private or protected member fields instead of private members? Or is this just a consequence of the long history of FOP?

I'm quite happy to refactor any code that I work on, this includes privatization and formatting cleanups, but I don't want to annoy anyone else who may have terribly good reasons for The Way Things Are. I am no PC (programming correctness) zealot, I've just found through personal experience that private member fields save a lot of pain. Am happy to go with the 'quo, tho. :-)

Finally - is there an IRC server where FOP developers hang out?

Cheers
Mark



RE: PDF serialization

2001-07-16 Thread Art Welch



FWIW 
the PCL renderer should not be keeping much in memory.

BTW 
earlier you had mentioned that the buf option slowed things down. I would expect 
that pipelining things would improve performance, has this been the case? If so, 
how much?

It 
seems to me that with the exception of a few details (like ID References, etc) 
FOP would be an ideal application for pipelining.

Keep 
up the good work,
Art

  -Original Message-From: Mark 
  [mailto:[EMAIL PROTECTED]]Sent: Monday, July 16, 2001 7:26 
  AMTo: [EMAIL PROTECTED]Cc: 
  [EMAIL PROTECTED]Subject: PDF serializationHi 
  ho fops and fopettes,I have had a look at the memory use of my 
  modified-for-streaming FOP executable and determined that the primary memory 
  constraint is now in the PDF renderer. Basically, because the PDF renderer 
  keeps all objects in memory until the end, this obviously limits the size of 
  the output document. I can't say if other renderers have this issue because I 
  haven't looked.I have had a look at the PDF renderer and I think it 
  should be possible to serialize it with only a minimal amount of data being 
  kept in RAM. However this will require extensive changes to the PDF renderer, 
  because there doesn't seem to be a single point at which I can cleanly 
  introduce the changes. Presumably these changes will be backwards-compatible 
  with the current FOP since I don't want to actually change the code path, just 
  make it so that the results are written earlier.So I was wondering if 
  there was someone I should be speaking with directly about the changes that I 
  want to make, or if I should just barge on ahead and make them, damn the 
  torpedoes pip pip old chap? I would prefer some guidance about this because I 
  don't actually know anything about PDF, but the code is well 
  commented.Obviously my primary interest is in the PDF renderer at this 
  stage, but I'm interested to know if other renderer writers are interested in 
  my work?As an aside: is there a style guide for FOP code? I must say I 
  find the style and layout very confusing and I'm happy to clean things up as I 
  go. At the moment I can't even work out what tab stop size people are using. 
  (In my own work I use 8 character tabs with 2 character 
  indenting).CheersMark 


proposed changes to AwtRenderer

2001-07-16 Thread Ralph LaChance

Change summary

org.apache.fop.render.AWTRenderer.java

NB: we started from the 5/21/01 version of AWTRenderer.java,
which was the latest as of Friday's cvs snapshots.

The changes we're submitting, deal with the following

1.  Background (colored) areas were being rendered
  in 3D, which incorrectly applied a bevelled look
  to the fill.

2.  Drawing of lines (e.g., borders) ignored the
  border thickness and simply drew a 1 pixel line.
  We've corrected addLine to do the right thing.

3. The actual placement of a couple of the borders
 were incorrectly computed -- previously hidden
 by addLine ignoring thickness.  This is fixed also.

4. Several places were subject to integer
 round-off errors, an example is that if you
 separately colored all the table-cells in a
 table row the backgrounds would sometimes show
 white gutters where one would expect the cells
 to bleed together.  The same could happen
 if you put bottom borders in every cell --
 they'd show gaps

We realize this AWTRenderer is probably vestigial,
in that it doesn't subclass the abstract PrintRenderer,
and perhaps is destined for the scrap heap.  In the
meantime, however, these changes should make its
end-of-life happier.

At any rate, these changes improve ~our~ product's life.  ;-)

'cheers
 Andy Langowitz [EMAIL PROTECTED]
 Ralph LaChance [EMAIL PROTECTED]

apologies if we stepped on your tabs -- our
environment is set to indent 2 cols
 AwtRenderer.zip

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


Spanning a table over many pages

2001-07-16 Thread Huisking, Michael

Hi.

My xsl-region-body is defined like this:

fo:flow flow-name=xsl-region-body
fo:table border-style=solid border-width=0.5pt
xsl:copy-of select=$ColumnWidths/
fo:table-body
xsl:apply-templates select=DATAPACKET/
/fo:table-body
/fo:table
/fo:flow

The flow contains one table (about 93 rows in this case).  

When the 1st page of the flow fills with table rows, a new page isn't being
created -- when I run FOP only 1 page is created with all of the additional
rows just running off the bottom.  (This should produce a 3 page report -- 1
table spanning 3 pages)

 Do I need to specify pagination values for the table?   What am I doing
wrong?

Thanks in advance.

Mick Huisking


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




Re: Spanning a table over many pages

2001-07-16 Thread Karen Lease

Hi Michael,

Normally this should work. Which version of FOP are you using? There is
a bug fix in CVS for a problem which sometimes caused tables to
overestimate the space left on the page. If it's possible for you, you
may want to try using the latest CVS version of FOP. Or post the FO file
which is being created by your XML and XSL so that I can check it out.

HTH,
Karen Lease

Huisking, Michael wrote:
 
 Hi.
 
 My xsl-region-body is defined like this:
 
 fo:flow flow-name=xsl-region-body
 fo:table border-style=solid border-width=0.5pt
 xsl:copy-of select=$ColumnWidths/
 fo:table-body
 xsl:apply-templates select=DATAPACKET/
 /fo:table-body
 /fo:table
 /fo:flow
 
 The flow contains one table (about 93 rows in this case).
 
 When the 1st page of the flow fills with table rows, a new page isn't being
 created -- when I run FOP only 1 page is created with all of the additional
 rows just running off the bottom.  (This should produce a 3 page report -- 1
 table spanning 3 pages)
 
  Do I need to specify pagination values for the table?   What am I doing
 wrong?
 
 Thanks in advance.
 
 Mick Huisking
 
 -
 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: vertically centering contents of table-cell

2001-07-16 Thread Karen Lease

Hi all,

Since I'm doing table work now, I'll try to have a look at this and see
if it can fixed.

Regards,
Karen Lease

Eric Galluzzo wrote:
 
  Good question. Does anyone knows how to vertically center text in a
  table-cell?
 
 I'm afraid that I don't. :)
 
 I tried display-align=center and vertical-align=middle, both to no
 avail.  From the code (specifically,
 org.apache.fop.fo.flow.TableCell.setup() and setRowHeight(int) ) it looks
 like display-align should be supported, but it seems that setRowHeight() is
 not being called.  At least, I set a breakpoint in that method and it never
 halted execution.  Being a FOP newbie, I'm not sure how to fix this problem.
 
 Any ideas?
 
 - Eric
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]

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




CVS problems

2001-07-16 Thread Karen Lease

Hi all,

I can't seem to get a cvs connection to xml.apache.org right now, either
over ssh or anoncvs. Over the ssh bridge with localhost, I get cvs
[login aborted]: recv() from server localhost: EOF
And using the public cvs access, I get
cvs [login aborted]: connect to xml.apache.org:2401 failed: Connection
refused

Sounds like overload on the host, but I've never seen that before.
Apache wouldn't by any chance experiencing some kind of DOS attacks
recently?

Any suggestions?

Karen

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




RE: Spanning a table over many pages

2001-07-16 Thread Huisking, Michael

Thanks for your response.  I'm using the 0.19.0-CVS version of FOP.  My fo
file is really too big (about 750K) to post here...  Any specific things
that I can look for?

Thanks!

Mick
-Original Message-
From: Karen Lease [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 1:24 PM
To: [EMAIL PROTECTED]
Subject: Re: Spanning a table over many pages


Hi Michael,

Normally this should work. Which version of FOP are you using? There is
a bug fix in CVS for a problem which sometimes caused tables to
overestimate the space left on the page. If it's possible for you, you
may want to try using the latest CVS version of FOP. Or post the FO file
which is being created by your XML and XSL so that I can check it out.

HTH,
Karen Lease

Huisking, Michael wrote:
 
 Hi.
 
 My xsl-region-body is defined like this:
 
 fo:flow flow-name=xsl-region-body
 fo:table border-style=solid border-width=0.5pt
 xsl:copy-of select=$ColumnWidths/
 fo:table-body
 xsl:apply-templates select=DATAPACKET/
 /fo:table-body
 /fo:table
 /fo:flow
 
 The flow contains one table (about 93 rows in this case).
 
 When the 1st page of the flow fills with table rows, a new page isn't
being
 created -- when I run FOP only 1 page is created with all of the
additional
 rows just running off the bottom.  (This should produce a 3 page report --
1
 table spanning 3 pages)
 
  Do I need to specify pagination values for the table?   What am I doing
 wrong?
 
 Thanks in advance.
 
 Mick Huisking
 
 -
 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: CVS problems

2001-07-16 Thread Rick Tessner

On Mon, 16 Jul 2001 22:30:59 +0200, Karen Lease wrote:

Hi all,

cvs [login aborted]: connect to xml.apache.org:2401 failed: Connection
refused

Sounds like overload on the host, but I've never seen that before.
Apache wouldn't by any chance experiencing some kind of DOS attacks
recently?

Any suggestions?

It looks like the CVS repository has moved to cvs.apache.org.  This
is true for xml-fop and xml-cocoon2 at least.  I just use the anoncvs,
so I don't know about actually committer userids, but I'd assume that
all that has been moved over as well.

If you're a UNIX user and you just wanna change the CVS admin files
in your checked-out copy of xml-fop, use the following to replace
all refs to xml.apache.org to cvs.apache.org in the CVS/Root files.

[ This is sh/ksh/bash compatible ... something similar would need to
  be used for csh/tcsh ]

  cd xml-fop
  for i in `find . -name Root -print | grep CVS/Root` ; do
j=${i}.new
cat $i | sed -e 's/xml.apache/cvs.apache/'  $j
mv $i ${i}.orig
mv $j $i
  done

And change the entry in the ~/.cvspass file from xml.apache.org to
cvs.apache.org.

-- 
Rick Tessner[EMAIL PROTECTED]
MYRA Systems Corp. Fone: (250) 381 1335 x125  Phax: (250) 381 1304
   Cell: (250) 885 9452

Forget your troubles and blow some bubbles.


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




developed html to fo converter - mirroring FOP home page as PDF

2001-07-16 Thread Enrico Schnepel

Hello Fopper!
 
I developed a html to fo converter and version 0.3 is just released. It
converts the most used html tags and valid html should be correct processed. Non
malformed html is also processed but don't expect to much. Like the xslt
transformation, which was sometimes discussed here, it supports xhtml as input
too.
 
The project home page is available at:
http://html2fo.sourceforge.net
 
I want to mirror the FOP home page ( http://xml.apache.org/fop ) as
crosslinked pdf files which are automaticly converted and generated. ( I am using the
html sources from CVS )
This is to show what html2fo and FOP are able to do together.
So I want to know whether it is allowed to mirror the site as pdf.
I've put the pdf files in a non referenced directory for testing at
http://html2fo.sourceforge.net/fop
 
Cheers
 
Enrico

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

GMX Tipp:

Machen Sie Ihr Hobby zu Geld bei unserem Partner 11!
http://profiseller.de/info/index.php3?ac=OM.PS.PS003K00596T0409a


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




Re: Use of non-private member fields, etc

2001-07-16 Thread Arved Sandstrom

Hi, Mark

I'd say that probably 75% of the instance/class variable visibility was 
well-chosen at inception, or at least had some thought behind it. But 
history, as you suggest, has very likely left some visibility too broad, and 
I'm sure some variables have been completely orphaned; others are probably 
still being set but aren't in use.

It doesn't hurt to question the existence of any variable you run across, 
let alone the qualifiers. I think the usual rules apply to us in FOP just as 
they do to anyone else. If someone is using 'protected', for example, I 
would expect them to demonstrate (or suggest the reasonable possibility) of 
subclasses coming into play.

I have deliberately used public instance variables - not many, but a few. 
I use them when I know for a fact that I am never going to represent the 
data any other way. I have seen classes (and FOP has a few of its own) that 
are unwieldy and hard to maintain because there are umpteen getters and 
setters that are never going to be anything other than pseudonyms for 
simple, direct access to a public member variable.

My gut feeling (well, it's actually based on some experience) is that 
default visibility is an oversight, more often than not.

We should also comment qualifier choices if they don't make obvious sense 
within the context of their own class.

Regards,
Arved Sandstrom

At 09:38 PM 7/16/01 +1000, Mark wrote:
Hey there foptologists

I was just wondering if there has been any discussion about private vs 
non-private member fields for the FOP classes. I have noticed that there are 
a lot of non-private (generally package-private default visibility) member 
fields and most of them do not appear to be referenced anywhere else in FOP. 
Unfortunately when changing a package-private field one must recompile the 
entire package to make sure something isn't thereby broken. If a field is 
class-private then one can be sure that it is not used anywhere else and can 
change it with (relative) impunity.

Now I know that I am just saying stuff that everyone knows, so I was 
wondering if there was some explicit reason for the use of package-private 
or protected member fields instead of private members? Or is this just a 
consequence of the long history of FOP?

I'm quite happy to refactor any code that I work on, this includes 
privatization and formatting cleanups, but I don't want to annoy anyone else 
who may have terribly good reasons for The Way Things Are. I am no PC 
(programming correctness) zealot, I've just found through personal 
experience that private member fields save a lot of pain. Am happy to go 
with the 'quo, tho. :-)

Finally - is there an IRC server where FOP developers hang out?

Cheers
Mark  
Fairly Senior Software Type
e-plicity (http://www.e-plicity.com)
Wireless * B2B * J2EE * XML --- Halifax, Nova Scotia


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




Re: Spanning a table over many pages

2001-07-16 Thread Huisking, Michael

OK, I'm attaching a zip file containing three .fo files.  They are all
generated from the same data (I manually modified the title of the report).
The file called threecol.fo is a three column report that generates 2
pages (correct).  The file called fourcol.fo is a four column report that
generates 2 pages but truncates some data.  The file called fivecol.fo is
a five column report that only generates 1 page, the whole 2nd page is
truncated.

I looked at them, but am not quite sure why the renderer treats them
differently.

Thanks again.

Mick

-Original Message-
From: Karen Lease [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 1:24 PM
To: [EMAIL PROTECTED]
Subject: Re: Spanning a table over many pages


Hi Michael,

Normally this should work. Which version of FOP are you using? There is
a bug fix in CVS for a problem which sometimes caused tables to
overestimate the space left on the page. If it's possible for you, you
may want to try using the latest CVS version of FOP. Or post the FO file
which is being created by your XML and XSL so that I can check it out.

HTH,
Karen Lease

Huisking, Michael wrote:
 
 Hi.
 
 My xsl-region-body is defined like this:
 
 fo:flow flow-name=xsl-region-body
 fo:table border-style=solid border-width=0.5pt
 xsl:copy-of select=$ColumnWidths/
 fo:table-body
 xsl:apply-templates select=DATAPACKET/
 /fo:table-body
 /fo:table
 /fo:flow
 
 The flow contains one table (about 93 rows in this case).
 
 When the 1st page of the flow fills with table rows, a new page isn't
being
 created -- when I run FOP only 1 page is created with all of the
additional
 rows just running off the bottom.  (This should produce a 3 page report --
1
 table spanning 3 pages)
 
  Do I need to specify pagination values for the table?   What am I doing
 wrong?
 
 Thanks in advance.
 
 Mick Huisking
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]

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


 fofiles.ZIP

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


Code Style, was Re: PDF serialization

2001-07-16 Thread Arved Sandstrom

At 09:26 PM 7/16/01 +1000, Mark wrote:
 As an aside: is there a style guide for FOP code? I must say I find the
style and layout very confusing and I'm happy to clean things up as I go.
At the moment I can't even work out what tab stop size people are using.
(In my own work I use 8 character tabs with 2 character indenting).

Yep. http://xml.apache.org/source.html references the Sun Java coding 
conventions, at http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html.

An interesting point that comes out of the coding conventions is that while 
Sun instructs us that tabs must be 8 spaces, they also state that the unit 
of indentation is 4 spaces.

Seems to me that the easiest way to avoid problems is never to leave tabs in 
the code - I use a text editor that is set to 4 spaces per tab and 
immediately translates tabs to spaces.

We are well past the point where we should take a style tool to the whole 
codebase, strip out all tabs, and re-commit the whole thing. :-)

Regards,
Arved Sandstrom

Fairly Senior Software Type
e-plicity (http://www.e-plicity.com)
Wireless * B2B * J2EE * XML --- Halifax, Nova Scotia


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




Re: Code Style, was Re: PDF serialization

2001-07-16 Thread Peter B. West



Arved Sandstrom wrote:

 At 09:26 PM 7/16/01 +1000, Mark wrote:
 
As an aside: is there a style guide for FOP code? I must say I find the
style and layout very confusing and I'm happy to clean things up as I go.
At the moment I can't even work out what tab stop size people are using.
(In my own work I use 8 character tabs with 2 character indenting).

 
 Yep. http://xml.apache.org/source.html references the Sun Java coding 
 conventions, at http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html.
 
 An interesting point that comes out of the coding conventions is that while 
 Sun instructs us that tabs must be 8 spaces, they also state that the unit 
 of indentation is 4 spaces.
 
 Seems to me that the easiest way to avoid problems is never to leave tabs in 
 the code - I use a text editor that is set to 4 spaces per tab and 
 immediately translates tabs to spaces.
 
 We are well past the point where we should take a style tool to the whole 
 codebase, strip out all tabs, and re-commit the whole thing. :-)


Arved,

Agreed.  From my own point of view, it would also be nice if, once the 
cleanup were done, committers could gradually re-arrange code to fit on 
an 79 column page (1 column is sacrificed to (X)Emacs.)  I appreciate 
that this is kind of old fashioned, but more often than not, I work with 
multiple 80 column windows rather than a full-screen editor.

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]




Keep-together (and the other keep-*'s)

2001-07-16 Thread Struan Judd

Is some wonderous FOP developer working on implementing this portion of the
XSL:FO spec? Any hope of an initial commit soon?

Unfortunately my personal timetable precludes me diving in and having a go.
:-(

If so might I request a small departure from the XSL:FO spec, if it is
straight-forward to implement. Please allow keep-together on fo:table-row.

TTFN

Struan Judd * And so it begins ...  ICQ: 4498196
http://neongraal.sf.org.nz
mailto:[EMAIL PROTECTED] Voicemail and Fax: +1 (201) 305-1011 x1006


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




RE: vertically centering contents of table-cell

2001-07-16 Thread Struan Judd

Eric,

I had this requirement (well more correctly, I needed display-align='after')
and the first thing I tried was to comment out the first line of real code
in setRowHeight(int), ie. cellArea.increaseHeight(h + borderHeight/2 -
cellArea.getHeight());

Now this makes display-align work (sorta) but mucks up the border and
background for any table cells where display-align is not the default
(before?)

For the moment this is acceptable to me but probably not to the project as a
whole.

TTFN

Struan Judd * And so it begins ...  ICQ: 4498196
http://neongraal.sf.org.nz
mailto:[EMAIL PROTECTED] Voicemail and Fax: +1 (201) 305-1011 x1006


 -Original Message-
 From: Eric Galluzzo [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, 17 July 2001 01:29
 To: [EMAIL PROTECTED]
 Subject: RE: vertically centering contents of table-cell


  Good question. Does anyone knows how to vertically center text in a
  table-cell?

 I'm afraid that I don't. :)

 I tried display-align=center and vertical-align=middle, both to no
 avail.  From the code (specifically,
 org.apache.fop.fo.flow.TableCell.setup() and setRowHeight(int) ) it looks
 like display-align should be supported, but it seems that
 setRowHeight() is
 not being called.  At least, I set a breakpoint in that method
 and it never
 halted execution.  Being a FOP newbie, I'm not sure how to fix
 this problem.

 Any ideas?

 - Eric


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




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




cvs commit: xml-fop/src/org/apache/fop/layout Area.java AreaContainer.java BodyAreaContainer.java ColumnArea.java

2001-07-16 Thread arved

arved   01/07/16 20:15:57

  Modified:src/org/apache/fop/layout Area.java AreaContainer.java
BodyAreaContainer.java ColumnArea.java
  Log:
  AHS: improving area information
  
  Revision  ChangesPath
  1.22  +9 -1  xml-fop/src/org/apache/fop/layout/Area.java
  
  Index: Area.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/Area.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- Area.java 2001/07/16 10:45:43 1.21
  +++ Area.java 2001/07/17 03:15:57 1.22
  @@ -1,4 +1,4 @@
  -/* $Id: Area.java,v 1.21 2001/07/16 10:45:43 arved Exp $
  +/* $Id: Area.java,v 1.22 2001/07/17 03:15:57 arved 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.
  @@ -361,11 +361,19 @@
   return bp;
 }
   
  +  public void addMarker(Marker marker) {
  +   markers.addElement(marker);
  +  }
  +  
 public void addMarkers(Vector markers) {
  markers.addAll(markers);
 }
 
 public void addLineagePair(org.apache.fop.fo.FObj fo, int areaPosition) {
  returnedBy.put(fo, new Integer(areaPosition));
  +  }
  +  
  +  public Vector getMarkers() {
  +   return markers;
 }
   }
  
  
  
  1.13  +13 -1 xml-fop/src/org/apache/fop/layout/AreaContainer.java
  
  Index: AreaContainer.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/AreaContainer.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- AreaContainer.java2001/06/12 11:37:36 1.12
  +++ AreaContainer.java2001/07/17 03:15:57 1.13
  @@ -1,4 +1,4 @@
  -/* $Id: AreaContainer.java,v 1.12 2001/06/12 11:37:36 keiron Exp $
  +/* $Id: AreaContainer.java,v 1.13 2001/07/17 03:15:57 arved 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.
  @@ -20,6 +20,10 @@
   private int yPosition; // should be able to take value 'top' and 'bottom' too
   private int position;
   
  + // use this for identifying the general usage of the area,
  + // like 'main-reference-area' or 'region-before'
  + private String areaName;
  + 
   public AreaContainer(FontState fontState, int xPosition,
int yPosition, int allocationWidth, int maxHeight,
int position) {
  @@ -63,4 +67,12 @@
   public void shiftYPosition(int value) {
   yPosition += value;
   }
  +  
  +  public String getAreaName() {
  +   return areaName;
  +  }
  +  
  +  public void setAreaName(String areaName) {
  +   this.areaName = areaName;
  +  }
   }
  
  
  
  1.9   +4 -1  xml-fop/src/org/apache/fop/layout/BodyAreaContainer.java
  
  Index: BodyAreaContainer.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/BodyAreaContainer.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- BodyAreaContainer.java2001/06/12 11:37:37 1.8
  +++ BodyAreaContainer.java2001/07/17 03:15:57 1.9
  @@ -1,4 +1,4 @@
  -/* $Id: BodyAreaContainer.java,v 1.8 2001/06/12 11:37:37 keiron Exp $
  +/* $Id: BodyAreaContainer.java,v 1.9 2001/07/17 03:15:57 arved 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.
  @@ -68,13 +68,16 @@
mainRefAreaHeight = maxHeight - beforeFloatRefAreaHeight - 
footnoteRefAreaHeight;
beforeFloatReferenceArea = new AreaContainer(fontState, xPosition, yPosition,
allocationWidth, beforeFloatRefAreaHeight, Position.ABSOLUTE);
  + beforeFloatReferenceArea.setAreaName(before-float-reference-area);
this.addChild(beforeFloatReferenceArea);
mainReferenceArea = new AreaContainer(fontState, xPosition, yPosition,
allocationWidth, mainRefAreaHeight, Position.ABSOLUTE);
  + mainReferenceArea.setAreaName(main-reference-area);
this.addChild(mainReferenceArea);
int footnoteRefAreaYPosition = yPosition - mainRefAreaHeight;
footnoteReferenceArea = new AreaContainer(fontState, xPosition, 
footnoteRefAreaYPosition,
allocationWidth, footnoteRefAreaHeight, Position.ABSOLUTE);
  + footnoteReferenceArea.setAreaName(footnote-reference-area);
this.addChild(footnoteReferenceArea);

// all padding and border-width must be 0
  
  
  
  1.3   +2 -1  xml-fop/src/org/apache/fop/layout/ColumnArea.java
  
  Index: 

cvs commit: xml-fop/src/org/apache/fop/render/xml XMLRenderer.java

2001-07-16 Thread arved

arved   01/07/16 20:16:29

  Modified:src/org/apache/fop/render/xml XMLRenderer.java
  Log:
  AHS: improving area information
  
  Revision  ChangesPath
  1.19  +32 -6 xml-fop/src/org/apache/fop/render/xml/XMLRenderer.java
  
  Index: XMLRenderer.java
  ===
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/xml/XMLRenderer.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- XMLRenderer.java  2001/06/05 12:51:53 1.18
  +++ XMLRenderer.java  2001/07/17 03:16:29 1.19
  @@ -1,4 +1,4 @@
  -/* $Id: XMLRenderer.java,v 1.18 2001/06/05 12:51:53 keiron Exp $
  +/* $Id: XMLRenderer.java,v 1.19 2001/07/17 03:16:29 arved 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.
  @@ -149,7 +149,7 @@
* @param area the area container to render
*/
   public void renderAreaContainer(AreaContainer area) {
  -writeStartTag(AreaContainer);
  +writeStartTag(AreaContainer name=\ + area.getAreaName() + \);
   Enumeration e = area.getChildren().elements();
   while (e.hasMoreElements()) {
   Box b = (Box) e.nextElement();
  @@ -194,9 +194,35 @@
* @param area the block area to render
*/
   public void renderBlockArea(BlockArea area) {
  -writeStartTag(BlockArea start-indent=\ +
  -  area.getStartIndent() + \ end-indent=\ +
  -  area.getEndIndent() + \);
  + StringBuffer baText = new StringBuffer();
  + baText.append(BlockArea start-indent=\ + area.getStartIndent() + 
\);
  + baText.append( end-indent=\ + area.getEndIndent() + \);
  + baText.append(\nis-first=\ + area.isFirst + \);
  + baText.append( is-last=\ + area.isLast + \);
  + if (null != area.generatedBy)
  + baText.append( generated-by=\ + area.generatedBy.getName() +
  + // + area.generatedBy + \);
  + baText.append();
  +writeStartTag(baText.toString());
  + 
  + // write out marker info
  + java.util.Vector markers = area.getMarkers();
  + if (!markers.isEmpty()) {
  + writeStartTag(Markers);
  + for (int m = 0; m  markers.size(); m++) {
  + org.apache.fop.fo.flow.Marker marker =
  + 
(org.apache.fop.fo.flow.Marker)markers.elementAt(m);
  + StringBuffer maText = new StringBuffer();
  + maText.append(Marker marker-class-name=\ +
  + marker.getMarkerClassName() + \);
  + maText.append( RegisteredArea=\ +
  + marker.getRegistryArea() + \);
  + maText.append(/);
  + writeEmptyElementTag(maText.toString());
  + }
  + writeEndTag(/Markers);
  + }
  + 
   Enumeration e = area.getChildren().elements();
   while (e.hasMoreElements()) {
   Box b = (Box) e.nextElement();
  @@ -310,7 +336,7 @@
   public void renderPage(Page page) {
   BodyAreaContainer body;
   AreaContainer before, after;
  -writeStartTag(Page number=\ + page.getNumber() + \);
  +writeStartTag(Page number=\ + page.getFormattedNumber() + \);
   body = page.getBody();
   before = page.getBefore();
   after = page.getAfter();
  
  
  

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




XMLRenderer improvements

2001-07-16 Thread Arved Sandstrom

Hi, all

I added extra information to AreaContainers, and modified XMLRenderer so that 
it is really starting to become a useful tool. Best way to get a flavour of 
it is to actually run it:

java org.apache.fop.apps.Fop -fo fofile -s -at areatreefile

The -s short-circuits the XML output at BlockArea level; leave it out and 
you'll see everything.

Regards,
Arved Sandstrom

-- 
Fairly Senior Software Type
e-plicity (http://www.e-plicity.com)
Halifax, Nova Scotia
Wireless * B2B * J2EE * XML

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