From jtauber@locus.apache.org Thu Dec 2 09:37:53 1999 Return-Path: Mailing-List: contact fop-cvs-help@xml.apache.org; run by ezmlm Delivered-To: mailing list fop-cvs@xml.apache.org Delivered-To: moderator for fop-cvs@xml.apache.org Received: (qmail 37355 invoked from network); 2 Dec 1999 09:37:53 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 2 Dec 1999 09:37:53 -0000 Received: (qmail 18980 invoked by uid 2016); 2 Dec 1999 09:37:53 -0000 Delivered-To: apcore-xml-fop-cvs@apache.org Received: (qmail 18977 invoked from network); 2 Dec 1999 09:37:52 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 2 Dec 1999 09:37:52 -0000 Received: (qmail 37352 invoked by uid 1018); 2 Dec 1999 09:37:50 -0000 Date: 2 Dec 1999 09:37:50 -0000 Message-ID: <19991202093750.37351.qmail@locus.apache.org> From: jtauber@locus.apache.org To: xml-fop-cvs@apache.org Subject: cvs commit: xml-fop/src/org/apache/fop/render/pdf PDFRenderer.java jtauber 99/12/02 01:37:50 Modified: src/org/apache/fop/layout Makefile Page.java src/org/apache/fop/render/pdf PDFRenderer.java Added: src/org/apache/fop/layout LinkSet.java Log: added more of Arved Sandtrom's simple-link implementation. New class LinkSet and modifications to Page and PDFRenderer to contain and make use of this class respectively Revision Changes Path 1.2 +1 -0 xml-fop/src/org/apache/fop/layout/Makefile Index: Makefile =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Makefile 1999/11/08 19:13:06 1.1 +++ Makefile 1999/12/02 09:37:50 1.2 @@ -18,6 +18,7 @@ InlineArea.java \ InlineSpace.java \ LineArea.java \ + LinkSet.java \ Page.java \ PageMaster.java \ PageMasterFactory.java \ 1.6 +17 -2 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.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- Page.java 1999/11/22 02:31:51 1.5 +++ Page.java 1999/12/02 09:37:50 1.6 @@ -1,4 +1,4 @@ -/*-- $Id: Page.java,v 1.5 1999/11/22 02:31:51 jtauber Exp $ -- +/*-- $Id: Page.java,v 1.6 1999/12/02 09:37:50 jtauber Exp $ -- ============================================================================ The Apache Software License, Version 1.1 @@ -22,7 +22,7 @@ Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. - 4. The names "Fop" and "Apache Software Foundation" must not be used to + 4. The names "FOP" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. @@ -48,6 +48,7 @@ Software Foundation, please see . */ + package org.apache.fop.layout; // FOP @@ -72,6 +73,8 @@ protected int pageNumber = 0; + protected Vector linkSets = new Vector(); + Page(AreaTree areaTree, int height, int width) { this.areaTree = areaTree; this.height = height; @@ -137,5 +140,17 @@ public FontInfo getFontInfo() { return this.areaTree.getFontInfo(); + } + + public void addLinkSet(LinkSet linkSet) { + this.linkSets.addElement(linkSet); + } + + public Vector getLinkSets() { + return this.linkSets; + } + + public boolean hasLinks() { + return (!this.linkSets.isEmpty()); } } 1.1 xml-fop/src/org/apache/fop/layout/LinkSet.java Index: LinkSet.java =================================================================== /*-- $Id: LinkSet.java,v 1.1 1999/12/02 09:37:50 jtauber Exp $ -- ============================================================================ The Apache Software License, Version 1.1 ============================================================================ Copyright (C) 1999 The Apache Software Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modifica- tion, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by the Apache Software Foundation (http://www.apache.org/)." Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. 4. The names "FOP" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. 5. Products derived from this software may not be called "Apache", nor may "Apache" appear in their name, without prior written permission of the Apache Software Foundation. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. This software consists of voluntary contributions made by many individuals on behalf of the Apache Software Foundation and was originally created by James Tauber . For more information on the Apache Software Foundation, please see . */ /* this class contributed by Arved Sandstrom with minor modifications by James Tauber */ package org.apache.fop.layout; // Java import java.util.Vector; import java.util.Enumeration; import java.awt.Rectangle; /** * a set of rectangles on a page that are linked to a common * destination */ public class LinkSet { /** the destination of the links */ String externalDestination; /** the set of rectangles */ Vector rects = new Vector(); int xoffset = 0; int yoffset = 0; public LinkSet(String externalDest) { this.externalDestination = externalDest; } public void addLinkedRect(Rectangle r) { r.y = yoffset; rects.addElement(r); } public void setYOffset(int y) { this.yoffset = y; } public void applyAreaContainerOffsets(AreaContainer ac) { Enumeration re = rects.elements(); while (re.hasMoreElements()) { Rectangle r = (Rectangle)re.nextElement(); r.x += ac.getXPosition(); r.y = ac.getYPosition() - ac.getHeight() - r.y; } } // intermediate implementation for joining all sublinks on same line public void mergeLinks() { int numRects = rects.size(); if (numRects == 1) return; Rectangle curRect = new Rectangle((Rectangle)rects.elementAt(0)); Vector nv = new Vector(); for (int ri=1; ri < numRects; ri++) { Rectangle r = (Rectangle)rects.elementAt(ri); if ((r.y != curRect.y) || (curRect.height != r.height)) { nv.addElement(curRect); curRect = new Rectangle(r); } else { curRect.width = r.x + r.width - curRect.x; } if (ri == numRects-1) nv.addElement(curRect); } rects = nv; } public String getDest() { return this.externalDestination; } public Vector getRects() { return this.rects; } } 1.9 +18 -2 xml-fop/src/org/apache/fop/render/pdf/PDFRenderer.java Index: PDFRenderer.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/pdf/PDFRenderer.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- PDFRenderer.java 1999/11/30 02:15:22 1.8 +++ PDFRenderer.java 1999/12/02 09:37:50 1.9 @@ -1,4 +1,4 @@ -/*-- $Id: PDFRenderer.java,v 1.8 1999/11/30 02:15:22 jtauber Exp $ -- +/*-- $Id: PDFRenderer.java,v 1.9 1999/12/02 09:37:50 jtauber Exp $ -- ============================================================================ The Apache Software License, Version 1.1 @@ -64,6 +64,8 @@ import java.io.IOException; import java.io.PrintWriter; import java.util.Enumeration; +import java.awt.Rectangle; +import java.util.Vector; /** * Renderer that renders areas to PDF @@ -457,7 +459,21 @@ currentStream.add("ET\n"); this.pdfDoc.makePage(this.pdfResources, currentStream, - page.getWidth()/1000, page.getHeight()/1000); + page.getWidth()/1000, + page.getHeight()/1000); + + if (page.hasLinks()) { + Enumeration e = page.getLinkSets().elements(); + while (e.hasMoreElements()) { + LinkSet linkSet = (LinkSet) e.nextElement(); + String dest = linkSet.getDest(); + Enumeration f = linkSet.getRects().elements(); + while (f.hasMoreElements()) { + Rectangle rect = (Rectangle) f.nextElement(); + this.pdfDoc.makeLink(rect, dest); + } + } + } } /** From jtauber@locus.apache.org Fri Dec 3 08:13:01 1999 Return-Path: Mailing-List: contact fop-cvs-help@xml.apache.org; run by ezmlm Delivered-To: mailing list fop-cvs@xml.apache.org Received: (qmail 68954 invoked from network); 3 Dec 1999 08:13:01 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 3 Dec 1999 08:13:01 -0000 Received: (qmail 20729 invoked by uid 2016); 3 Dec 1999 08:13:01 -0000 Delivered-To: apcore-xml-fop-cvs@apache.org Received: (qmail 20727 invoked from network); 3 Dec 1999 08:13:00 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 3 Dec 1999 08:13:00 -0000 Received: (qmail 68951 invoked by uid 1018); 3 Dec 1999 08:12:59 -0000 Date: 3 Dec 1999 08:12:59 -0000 Message-ID: <19991203081259.68950.qmail@locus.apache.org> From: jtauber@locus.apache.org To: xml-fop-cvs@apache.org Subject: cvs commit: xml-fop/src/org/apache/fop/layout BlockArea.java LineArea.java LinkSet.java jtauber 99/12/03 00:12:59 Modified: . STATUS src/codegen properties.xml src/org/apache/fop/fo FONode.java FOText.java PropertyListBuilder.java StandardElementMapping.java src/org/apache/fop/fo/flow Makefile PageNumber.java src/org/apache/fop/layout BlockArea.java LineArea.java LinkSet.java Added: src/org/apache/fop/fo/flow SimpleLink.java Log: incorporated rest of Arved Sandstrom's simple-link implementation: the FO and layout class modifications Revision Changes Path 1.14 +3 -2 xml-fop/STATUS Index: STATUS =================================================================== RCS file: /home/cvs/xml-fop/STATUS,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- STATUS 1999/11/30 02:15:21 1.13 +++ STATUS 1999/12/03 08:12:56 1.14 @@ -1,4 +1,4 @@ -$Id: STATUS,v 1.13 1999/11/30 02:15:21 jtauber Exp $ +$Id: STATUS,v 1.14 1999/12/03 08:12:56 jtauber Exp $ STATUS @@ -6,13 +6,14 @@ Get images working [PARTIAL] Get padding working -[PARTIAL] Incorporate Arved Sandstrom's simple-link implementation +[DONE] Incorporate Arved Sandstrom's simple-link implementation [PARTIAL] Implement basic keeps [PARTIAL] Incorporate Eric Schaeffer's further table fixes Other Bugs to fix: colour not continued onto subsequent pages if coloured block goes over page +simple-link doesn't seem to work (I think I, JKT, broke it) Todo's and problems with AWT Previewer: 1.6 +7 -0 xml-fop/src/codegen/properties.xml Index: properties.xml =================================================================== RCS file: /home/cvs/xml-fop/src/codegen/properties.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- properties.xml 1999/11/30 02:15:21 1.5 +++ properties.xml 1999/12/03 08:12:57 1.6 @@ -358,5 +358,12 @@ Length 0pt + + external-destination + ExternalDestination + false + String + + 1.7 +12 -1 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.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- FONode.java 1999/11/25 17:33:10 1.6 +++ FONode.java 1999/12/03 08:12:57 1.7 @@ -1,4 +1,4 @@ -/*-- $Id: FONode.java,v 1.6 1999/11/25 17:33:10 jtauber Exp $ -- +/*-- $Id: FONode.java,v 1.7 1999/12/03 08:12:57 jtauber Exp $ -- ============================================================================ The Apache Software License, Version 1.1 @@ -54,6 +54,7 @@ // FOP import org.apache.fop.apps.FOPException; import org.apache.fop.layout.Area; +import org.apache.fop.layout.LinkSet; // Java import java.util.Vector; @@ -90,6 +91,8 @@ protected int forcedStartOffset = 0; protected int forcedWidth = 0; + protected LinkSet linkSet; + protected FONode(FObj parent) { this.parent = parent; } @@ -144,6 +147,14 @@ public FObj getParent() { return this.parent; + } + + public void setLinkSet(LinkSet linkSet) { + this.linkSet = linkSet; + } + + public LinkSet getLinkSet() { + return this.linkSet; } abstract public Status layout(Area area) 1.7 +2 -1 xml-fop/src/org/apache/fop/fo/FOText.java Index: FOText.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/FOText.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- FOText.java 1999/11/25 17:33:10 1.6 +++ FOText.java 1999/12/03 08:12:57 1.7 @@ -1,4 +1,4 @@ -/*-- $Id: FOText.java,v 1.6 1999/11/25 17:33:10 jtauber Exp $ -- +/*-- $Id: FOText.java,v 1.7 1999/12/03 08:12:57 jtauber Exp $ -- ============================================================================ The Apache Software License, Version 1.1 @@ -118,6 +118,7 @@ int orig_start = this.marker; this.marker = ((BlockArea) area).addText(fs, red, green, blue, wrapOption, + this.getLinkSet(), whiteSpaceTreatment, ca, this.marker, length); if (this.marker == -1) { 1.9 +2 -2 xml-fop/src/org/apache/fop/fo/PropertyListBuilder.java Index: PropertyListBuilder.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/PropertyListBuilder.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- PropertyListBuilder.java 1999/11/30 02:15:22 1.8 +++ PropertyListBuilder.java 1999/12/03 08:12:57 1.9 @@ -1,4 +1,4 @@ -/*-- $Id: PropertyListBuilder.java,v 1.8 1999/11/30 02:15:22 jtauber Exp $ -- +/*-- $Id: PropertyListBuilder.java,v 1.9 1999/12/03 08:12:57 jtauber Exp $ -- ============================================================================ The Apache Software License, Version 1.1 @@ -109,7 +109,7 @@ propertyTable.put("padding-bottom",PaddingBottom.maker()); propertyTable.put("padding-left",PaddingLeft.maker()); propertyTable.put("padding-right",PaddingRight.maker()); - + propertyTable.put("external-destination",ExternalDestination.maker()); propertyTable.put("height",SVGLength.maker()); propertyTable.put("width",SVGLength.maker()); propertyTable.put("x",SVGLength.maker()); 1.6 +4 -2 xml-fop/src/org/apache/fop/fo/StandardElementMapping.java Index: StandardElementMapping.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/StandardElementMapping.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- StandardElementMapping.java 1999/11/22 02:31:27 1.5 +++ StandardElementMapping.java 1999/12/03 08:12:57 1.6 @@ -1,4 +1,4 @@ -/*-- $Id: StandardElementMapping.java,v 1.5 1999/11/22 02:31:27 jtauber Exp $ -- +/*-- $Id: StandardElementMapping.java,v 1.6 1999/12/03 08:12:57 jtauber Exp $ -- ============================================================================ The Apache Software License, Version 1.1 @@ -22,7 +22,7 @@ Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. - 4. The names "Fop" and "Apache Software Foundation" must not be used to + 4. The names "FOP" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. @@ -48,6 +48,7 @@ Software Foundation, please see . */ + package org.apache.fop.fo; import org.apache.fop.fo.flow.*; @@ -98,5 +99,6 @@ builder.addMapping(uri, "table-body", TableBody.maker()); builder.addMapping(uri, "table-row", TableRow.maker()); builder.addMapping(uri, "table-cell", TableCell.maker()); + builder.addMapping(uri, "simple-link", SimpleLink.maker()); } } 1.3 +1 -0 xml-fop/src/org/apache/fop/fo/flow/Makefile Index: Makefile =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Makefile 1999/11/25 18:04:15 1.2 +++ Makefile 1999/12/03 08:12:58 1.3 @@ -17,6 +17,7 @@ ListItemBody.java \ ListItemLabel.java \ PageNumber.java \ + SimpleLink.java \ StaticContent.java \ Table.java \ TableBody.java \ 1.7 +7 -2 xml-fop/src/org/apache/fop/fo/flow/PageNumber.java Index: PageNumber.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/PageNumber.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- PageNumber.java 1999/11/25 17:33:12 1.6 +++ PageNumber.java 1999/12/03 08:12:58 1.7 @@ -1,4 +1,4 @@ -/*-- $Id: PageNumber.java,v 1.6 1999/11/25 17:33:12 jtauber Exp $ -- +/*-- $Id: PageNumber.java,v 1.7 1999/12/03 08:12:58 jtauber Exp $ -- ============================================================================ The Apache Software License, Version 1.1 @@ -111,7 +111,12 @@ this.marker = 0; } String p = Integer.toString(area.getPage().getNumber()); - this.marker = ((BlockArea) area).addText(fs, red, green, blue, wrapOption, whiteSpaceTreatment, p.toCharArray(), 0, p.length()); + this.marker = ((BlockArea) area).addText(fs, red, green, blue, + wrapOption, + null, + whiteSpaceTreatment, + p.toCharArray(), 0, + p.length()); return new Status(Status.OK); } } 1.1 xml-fop/src/org/apache/fop/fo/flow/SimpleLink.java Index: SimpleLink.java =================================================================== /*-- $Id: SimpleLink.java,v 1.1 1999/12/03 08:12:58 jtauber Exp $ -- ============================================================================ The Apache Software License, Version 1.1 ============================================================================ Copyright (C) 1999 The Apache Software Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modifica- tion, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by the Apache Software Foundation (http://www.apache.org/)." Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. 4. The names "FOP" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. 5. Products derived from this software may not be called "Apache", nor may "Apache" appear in their name, without prior written permission of the Apache Software Foundation. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. This software consists of voluntary contributions made by many individuals on behalf of the Apache Software Foundation and was originally created by James Tauber . For more information on the Apache Software Foundation, please see . */ /* this class contributed by Arved Sandstrom with minor modifications by James Tauber */ package org.apache.fop.fo.flow; // FOP import org.apache.fop.fo.*; import org.apache.fop.apps.FOPException; import org.apache.fop.fo.properties.*; import org.apache.fop.layout.*; import org.apache.fop.datatypes.ColorType; // Java import java.util.Enumeration; import java.awt.Rectangle; public class SimpleLink extends FObjMixed { public static class Maker extends FObj.Maker { public FObj make(FObj parent, PropertyList propertyList) throws FOPException { return new SimpleLink(parent, propertyList); } } public static FObj.Maker maker() { return new SimpleLink.Maker(); } public SimpleLink(FObj parent, PropertyList propertyList) throws FOPException { super(parent, propertyList); this.name = "fo:simple-link"; if (parent.getName().equals("fo:flow")) { throw new FOPException("simple-link can't be directly" + " under flow"); } } public Status layout(Area area) throws FOPException { String externalDest = this.properties.get("external-destination").getString(); if (this.marker == START) { this.marker = 0; } // new LinkedArea to gather up inlines LinkSet ls = new LinkSet(externalDest); Page p = area.getPage(); // assumption - AS // should be able to retrieve this from somewhere - JT AreaContainer ac = p.getBody(); int numChildren = this.children.size(); for (int i = this.marker; i < numChildren; i++) { FONode fo = (FONode) children.elementAt(i); fo.setLinkSet(ls); Status status; if ((status = fo.layout(area)).isIncomplete()) { this.marker = i; return status; } } ls.applyAreaContainerOffsets(ac); // comment this out to see individual words linked ls.mergeLinks(); p.addLinkSet(ls); return new Status(Status.OK); } } 1.6 +13 -4 xml-fop/src/org/apache/fop/layout/BlockArea.java Index: BlockArea.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/BlockArea.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- BlockArea.java 1999/11/22 02:31:49 1.5 +++ BlockArea.java 1999/12/03 08:12:58 1.6 @@ -1,4 +1,4 @@ -/*-- $Id: BlockArea.java,v 1.5 1999/11/22 02:31:49 jtauber Exp $ -- +/*-- $Id: BlockArea.java,v 1.6 1999/12/03 08:12:58 jtauber Exp $ -- ============================================================================ The Apache Software License, Version 1.1 @@ -113,7 +113,7 @@ } public int addText(FontState fontState, float red, float green, - float blue, int wrapOption, + float blue, int wrapOption, LinkSet ls, int whiteSpaceTreatment, char data[], int start, int end) { int ts, te; @@ -131,7 +131,12 @@ this.currentLineArea.changeColor(red, green, blue); this.currentLineArea.changeWrapOption(wrapOption); this.currentLineArea.changeWhiteSpaceTreatment(whiteSpaceTreatment); - ts = this.currentLineArea.addText(ca, ts, te); + + if (ls != null) { + ls.setYOffset(currentHeight); + } + + ts = this.currentLineArea.addText(ca, ts, te, ls); this.hasLines = true; while (ts != -1) { @@ -148,7 +153,11 @@ this.currentLineArea.changeColor(red, green, blue); this.currentLineArea.changeWrapOption(wrapOption); this.currentLineArea.changeWhiteSpaceTreatment(whiteSpaceTreatment); - ts = this.currentLineArea.addText(ca, ts, te); + if (ls != null) { + ls.setYOffset(currentHeight); + } + + ts = this.currentLineArea.addText(ca, ts, te, ls); } return -1; } 1.7 +42 -11 xml-fop/src/org/apache/fop/layout/LineArea.java Index: LineArea.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/LineArea.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- LineArea.java 1999/11/22 02:31:51 1.6 +++ LineArea.java 1999/12/03 08:12:59 1.7 @@ -1,4 +1,4 @@ -/*-- $Id: LineArea.java,v 1.6 1999/11/22 02:31:51 jtauber Exp $ -- +/*-- $Id: LineArea.java,v 1.7 1999/12/03 08:12:59 jtauber Exp $ -- ============================================================================ The Apache Software License, Version 1.1 @@ -22,7 +22,7 @@ Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. - 4. The names "Fop" and "Apache Software Foundation" must not be used to + 4. The names "FOP" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. @@ -48,12 +48,14 @@ Software Foundation, please see . */ + package org.apache.fop.layout; import org.apache.fop.render.Renderer; import java.util.Vector; import java.util.Enumeration; +import java.awt.Rectangle; import org.apache.fop.fo.properties.WrapOption; // for enumerated // values @@ -143,7 +145,7 @@ renderer.renderLineArea(this); } - public int addText(char data[], int start, int end) { + public int addText(char data[], int start, int end, LinkSet ls) { boolean overrun = false; wordStart = start; @@ -212,6 +214,16 @@ Enumeration e = pendingAreas.elements(); while (e.hasMoreElements()) { InlineArea inlineArea = (InlineArea) e.nextElement(); + if (ls != null) { + Rectangle lr = + new Rectangle(startIndent + + finalWidth, + 0, + inlineArea.getContentWidth(), + lineHeight); + ls.addRect(lr); + } + addChild(inlineArea); } finalWidth += pendingWidth; @@ -223,12 +235,22 @@ // add the current word if (wordLength > 0) { - addChild(new InlineArea(currentFontState, - this.red, this.green, - this.blue, new - String(data, wordStart, - wordLength), - wordWidth)); + InlineArea ia = new InlineArea(currentFontState, + this.red, this.green, + this.blue, new + String(data, wordStart, + wordLength), + wordWidth); + addChild(ia); + if (ls != null) { + Rectangle lr = + new Rectangle(startIndent + + finalWidth, + 0, + ia.getContentWidth(), + lineHeight); + ls.addRect(lr); + } finalWidth += wordWidth; // reset word width @@ -318,10 +340,19 @@ } // end of iteration over text if (prev == TEXT) { - pendingAreas.addElement(new InlineArea(currentFontState, this.red, + InlineArea pia = new InlineArea(currentFontState, this.red, this.green, this.blue, new String(data, wordStart, - wordLength), wordWidth)); + wordLength), wordWidth); + if (ls != null) { + Rectangle lr = + new Rectangle(startIndent + finalWidth, + spaceWidth, + pia.getContentWidth(), + lineHeight); + ls.addRect(lr); + } + pendingAreas.addElement(pia); pendingWidth += wordWidth; wordWidth = 0; } 1.2 +2 -2 xml-fop/src/org/apache/fop/layout/LinkSet.java Index: LinkSet.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/LinkSet.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- LinkSet.java 1999/12/02 09:37:50 1.1 +++ LinkSet.java 1999/12/03 08:12:59 1.2 @@ -1,4 +1,4 @@ -/*-- $Id: LinkSet.java,v 1.1 1999/12/02 09:37:50 jtauber Exp $ -- +/*-- $Id: LinkSet.java,v 1.2 1999/12/03 08:12:59 jtauber Exp $ -- ============================================================================ The Apache Software License, Version 1.1 @@ -79,7 +79,7 @@ this.externalDestination = externalDest; } - public void addLinkedRect(Rectangle r) { + public void addRect(Rectangle r) { r.y = yoffset; rects.addElement(r); } From jtauber@locus.apache.org Fri Dec 3 08:38:06 1999 Return-Path: Mailing-List: contact fop-cvs-help@xml.apache.org; run by ezmlm Delivered-To: mailing list fop-cvs@xml.apache.org Received: (qmail 69457 invoked from network); 3 Dec 1999 08:38:06 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 3 Dec 1999 08:38:06 -0000 Received: (qmail 2820 invoked by uid 2016); 3 Dec 1999 08:36:51 -0000 Delivered-To: apcore-xml-fop-cvs@apache.org Received: (qmail 2818 invoked from network); 3 Dec 1999 08:36:51 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 3 Dec 1999 08:36:51 -0000 Received: (qmail 69452 invoked by uid 1018); 3 Dec 1999 08:36:50 -0000 Date: 3 Dec 1999 08:36:50 -0000 Message-ID: <19991203083650.69451.qmail@locus.apache.org> From: jtauber@locus.apache.org To: xml-fop-cvs@apache.org Subject: cvs commit: xml-fop/src/org/apache/fop/apps XTCommandLine.java jtauber 99/12/03 00:36:50 Modified: . STATUS src/org/apache/fop/apps XTCommandLine.java Log: fixed bug that stopped XTCommandLine from working. contributed by Bill Raudabaugh Revision Changes Path 1.15 +4 -1 xml-fop/STATUS Index: STATUS =================================================================== RCS file: /home/cvs/xml-fop/STATUS,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- STATUS 1999/12/03 08:12:56 1.14 +++ STATUS 1999/12/03 08:36:49 1.15 @@ -1,4 +1,4 @@ -$Id: STATUS,v 1.14 1999/12/03 08:12:56 jtauber Exp $ +$Id: STATUS,v 1.15 1999/12/03 08:36:49 jtauber Exp $ STATUS @@ -9,6 +9,7 @@ [DONE] Incorporate Arved Sandstrom's simple-link implementation [PARTIAL] Implement basic keeps [PARTIAL] Incorporate Eric Schaeffer's further table fixes +Implement MessageHandler (or similar) Other Bugs to fix: @@ -33,6 +34,8 @@ Done since 0.12.0 release: basic support for padding-{top,left,bottom,right} on blocks. +implemented simple-link (don't think it works, though) +XTCommandLine now works again Done for 0.12.0 release: 1.6 +4 -3 xml-fop/src/org/apache/fop/apps/XTCommandLine.java Index: XTCommandLine.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/apps/XTCommandLine.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- XTCommandLine.java 1999/11/22 02:31:18 1.5 +++ XTCommandLine.java 1999/12/03 08:36:49 1.6 @@ -1,4 +1,4 @@ -/*-- $Id: XTCommandLine.java,v 1.5 1999/11/22 02:31:18 jtauber Exp $ -- +/*-- $Id: XTCommandLine.java,v 1.6 1999/12/03 08:36:49 jtauber Exp $ -- ============================================================================ The Apache Software License, Version 1.1 @@ -22,7 +22,7 @@ Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. - 4. The names "Fop" and "Apache Software Foundation" must not be used to + 4. The names "FOP" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. @@ -48,6 +48,7 @@ Software Foundation, please see . */ + package org.apache.fop.apps; import org.apache.fop.render.pdf.PDFRenderer; @@ -117,7 +118,7 @@ driver.addElementMapping("org.apache.fop.fo.StandardElementMapping"); driver.addElementMapping("org.apache.fop.svg.SVGElementMapping"); driver.setWriter(new PrintWriter(new FileWriter(args[2]))); - driver.buildFOTree(parser, fileInputSource(args[0])); + driver.buildFOTree(xslProcessor, fileInputSource(args[0])); driver.format(); driver.render(); } catch (Exception e) { From dirkx@webweaving.org Fri Dec 3 08:44:59 1999 Return-Path: Mailing-List: contact fop-cvs-help@xml.apache.org; run by ezmlm Delivered-To: mailing list fop-cvs@xml.apache.org Received: (qmail 70114 invoked from network); 3 Dec 1999 08:44:59 -0000 Received: from ns.skylink.it (root@194.177.113.1) by 63.211.145.10 with SMTP; 3 Dec 1999 08:44:59 -0000 Received: from kim.ispra.webweaving.org (va-140.skylink.it [194.185.55.140]) by ns.skylink.it (8.9.1/8.8.8) with ESMTP id JAA19043 for ; Fri, 3 Dec 1999 09:44:58 +0100 Received: (from dirkx@localhost) by kim.ispra.webweaving.org (8.8.8/8.8.5) id IAA17394 for fop-cvs@xml.apache.org; Fri, 3 Dec 1999 08:44:27 GMT X-Passed: MX on Ispra.WebWeaving.org Fri, 3 Dec 1999 08:44:27 GMT and masked X-No-Spam: Neither the receipients nor the senders email address(s) are to be used for Unsolicited (Commercial) Email without the explicit written consent of either party; as a per-message fee is incurred for inbound and outbound traffic to the originator. Date: Fri, 3 Dec 1999 08:44:27 GMT From: Dirk-Willem van Gulik (kim) Posted-Date: Fri, 3 Dec 1999 08:44:27 GMT Message-Id: <199912030844.IAA17394@kim.ispra.webweaving.org> To: fop-cvs@xml.apache.org Subject: Test Test. Ignore From eschaeffer@posterconseil.com Fri Dec 3 08:53:32 1999 Return-Path: Mailing-List: contact fop-cvs-help@xml.apache.org; run by ezmlm Delivered-To: mailing list fop-cvs@xml.apache.org Received: (qmail 70698 invoked from network); 3 Dec 1999 08:53:32 -0000 Received: from unknown (HELO aquarium.politel.com) (195.219.34.1) by 63.211.145.10 with SMTP; 3 Dec 1999 08:53:32 -0000 Message-ID: <4a1194e0f5574e53b632fade5ca981c53847850c@> From: "Eric SCHAEFFER" To: References: <0670B83B1F99D2118DAF00805F6505C9019DCDF9@USAESMS1> <039601bf3d62$1a9847a0$eb020a0a@bowstreet.com> Subject: Re: Unsupported bmp format in 0.12.0 Date: Fri, 3 Dec 1999 09:52:17 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Here is what I've done for images. It only works with the GifJepgImage class. - ImageFactory create an FOPImage using the right class depending on the content type or the file extension - FOPImage (GifJepgImage only for the moment) read the image and stock it compressed with zlib - PDFRenderer write the compressed image in the PDF file (very very smaller PDF). I used the old code because I had problems with XObjects. I wanted also to stock images in an Hash not to reload it if it's already done... Kelly (or other people), can you tell me what you think about it... Eric. Index: ./src/org/apache/fop/fo/flow/DisplayGraphic.java =================================================================== RCS file: /home/cvspublic/xml-fop/src/org/apache/fop/fo/flow/DisplayGraphic.java,v retrieving revision 1.7 diff -r1.7 DisplayGraphic.java 111d110 < // FIXME 147,148c146 < endIndent = area.getAllocationWidth() - forcedWidth - < forcedStartOffset; --- > endIndent += area.getAllocationWidth() - forcedWidth - forcedStartOffset; 157c155 < --- > 159,172c157,200 < < this.imageArea = new ImageArea(fs, < img, < area.getAllocationWidth(), < img.getWidth(), < img.getHeight(), < startIndent, endIndent, < align); < < imageArea.start(); < imageArea.end(); < area.addChild(imageArea); < area.increaseHeight(imageArea.getHeight()); < --- > > if ( img != null ) { > double ratio = ((double) img.getPixelWidth()) / ((double) img.getPixelHeight()); > > width = img.getWidth(); > height = img.getHeight(); > > // FIXE-ME : not really the good way... > int area_max_width = area.getAllocationWidth(); > int page_height = this.properties.get("page-height").getLength().mvalue() - > this.properties.get("margin-top").getLength().mvalue() - > this.properties.get("margin-bottom").getLength().mvalue(); > while ( ( width > area_max_width ) || ( height > page_height ) ) { > if ( width > area_max_width ) { > width = area_max_width; > height = (int) (((double) width) / ratio); > } > if ( height > page_height ) { > height = page_height; > width = (int) (ratio * ((double) height)); > } > } > > img.setDimensions(width, height); > // Test if enougth space > if ( height > area.spaceLeft() ) { > return new Status(Status.AREA_FULL_NONE); > } > > this.imageArea = new ImageArea(fs, > img, > area.getAllocationWidth(), > img.getWidth(), > img.getHeight(), > startIndent, endIndent, > align); > > imageArea.start(); > imageArea.end(); > area.addChild(imageArea); > area.increaseHeight(imageArea.getHeight()); > > } > Index: ./src/org/apache/fop/image/BmpBwImage.java =================================================================== RCS file: /home/cvspublic/xml-fop/src/org/apache/fop/image/BmpBwImage.java,v retrieving revision 1.5 diff -r1.5 BmpBwImage.java 120c120 < public String gethref() { return this.ref; } --- > public String getHRef() { return this.ref; } 123,124c123,124 < public int getpixelwidth() { return this.pixelwidth; } < public int getpixelheight() { return this.pixelheight; } --- > public int getPixelWidth() { return this.pixelwidth; } > public int getPixelHeight() { return this.pixelheight; } 126a127,131 > > public void setDimensions(int w, int h) { > this.width = w; > this.height = h; > } 151,152c156,167 < public boolean getcolor(){return false;} < public int getbitperpixel() {return this.bitperpixel;} --- > //// TEST //// > public byte[] getCompressedMap() { > return new byte[1]; > } > > public int getCompressedSize() { > return 0; > } > //// TEST //// > > public boolean isColored(){return false;} > public int getBitsPerPixel() {return this.bitperpixel;} Index: ./src/org/apache/fop/image/BmpColImage.java =================================================================== RCS file: /home/cvspublic/xml-fop/src/org/apache/fop/image/BmpColImage.java,v retrieving revision 1.5 diff -r1.5 BmpColImage.java 120c120 < public String gethref() { return this.ref; } --- > public String getHRef() { return this.ref; } 123,124c123,124 < public int getpixelwidth() { return this.pixelwidth; } < public int getpixelheight() { return this.pixelheight; } --- > public int getPixelWidth() { return this.pixelwidth; } > public int getPixelHeight() { return this.pixelheight; } 126a127,131 > > public void setDimensions(int w, int h) { > this.width = w; > this.height = h; > } 162a168,176 > //// TEST //// > public byte[] getCompressedMap() { > return new byte[1]; > } > > public int getCompressedSize() { > return 0; > } > //// TEST //// 164,165c178,179 < public boolean getcolor(){return true;} < public int getbitperpixel() {return this.bitperpixel;} --- > public boolean isColored(){return true;} > public int getBitsPerPixel() {return this.bitperpixel;} Index: ./src/org/apache/fop/image/FopImage.java =================================================================== RCS file: /home/cvspublic/xml-fop/src/org/apache/fop/image/FopImage.java,v retrieving revision 1.5 diff -r1.5 FopImage.java 64,65c64,65 < public int getpixelwidth(); < public int getpixelheight(); --- > public int getPixelWidth(); > public int getPixelHeight(); 67a68 > public void setDimensions(int w, int h); 70c71 < public String gethref(); --- > public String getHRef(); 72,73c73,76 < public boolean getcolor(); < public int getbitperpixel(); --- > public byte[] getCompressedMap(); > public int getCompressedSize(); > public boolean isColored(); > public int getBitsPerPixel(); Index: ./src/org/apache/fop/image/FopImageFactory.java =================================================================== RCS file: /home/cvspublic/xml-fop/src/org/apache/fop/image/FopImageFactory.java,v retrieving revision 1.5 diff -r1.5 FopImageFactory.java 63c63 < import java.io.FileInputStream; --- > file://import java.io.FileInputStream; 64a65 > import java.net.*; 67,94d67 < < public static FopImage Make(String ref,int x,int y, int width, int height) { < < < int colorpos=28; file://offset positioning for w and height in bmp files < int [] headermap = new int[54]; < try{ < FileInputStream file=new FileInputStream(ref); < boolean eof=false; < int count=0; < while ((!eof) && (count<54) ) { < int input =file.read(); < if (input==-1) < eof=true; < else < headermap[count++]=input; < } < file.close(); < } catch (IOException e) {System.err.println("Image not found");} < int bpp=headermap[28]; < if (bpp==8) { < return (new BmpBwImage(ref,x,y,width,height)); < } else if (bpp==24) { < return (new BmpColImage(ref,x,y,width,height)); < } < System.err.println("Unsupported bmp format"); < < return null; 95a69,163 > public final static int IMAGE_GIF = 1; > public final static int IMAGE_JPEG = 2; > public final static int IMAGE_PNG = 3; > > public static FopImage Make(String ref,int x,int y, int width, int height) { > URL absoluteURL = null; > try { > absoluteURL = new URL(ref); > } > catch (MalformedURLException e) { > // maybe relative > /* URL context_url = null; > try { > context_url = new URL(); // how to get the context URL ? > try { > absoluteURL = new URL(context_url, ref); > } > catch (MalformedURLException e_abs) { > // not found > System.err.println("Invalid Image URL : " + e_abs.getMessage() + "(base URL " + context_url.toString() + ")"); > return null; > } > } > catch (MalformedURLException e_context) { > // pb context url > System.err.println("Invalid Image URL - error on relative URL : " + e_context.getMessage()); > return null; > } > */ > System.err.println("Invalid Image URL : " + e.getMessage()); > return null; > } > > int imageType = 0; > > // get image type by 'Content-Type' > String contentType = null; > try { > URLConnection url_conn = absoluteURL.openConnection(); > contentType = url_conn.getContentType(); > if ( contentType != null ) { > if ( contentType.equalsIgnoreCase("image/gif") ) { > imageType = IMAGE_GIF; > } else if ( contentType.equalsIgnoreCase("image/jpeg") ) { > imageType = IMAGE_JPEG; > } else if ( contentType.equalsIgnoreCase("image/png") ) { > imageType = IMAGE_PNG; > } else { > System.err.println("Image format not supported : " + contentType); > return null; > } > } > } > catch (IOException e) { > System.err.println("Error while recovering Image Type : " + e.getMessage()); > return null; > } > > // get image type by extension if the first method failed > if ( contentType == null ) { > String stringURL = absoluteURL.toString(); > int extensionStart = stringURL.lastIndexOf("."); > String extensionURL = ""; > if ( ( extensionStart > 0 ) && ( extensionStart < stringURL.length() - 1 ) ) { > extensionURL = stringURL.substring(extensionStart + 1, stringURL.length()); > } > > if ( extensionURL.equalsIgnoreCase("gif") ) { > imageType = IMAGE_GIF; > } else if ( extensionURL.equalsIgnoreCase("jpg") || > extensionURL.equalsIgnoreCase("jpeg") ) { > imageType = IMAGE_JPEG; > } else if ( extensionURL.equalsIgnoreCase("png") ) { > imageType = IMAGE_PNG; > } else { > // no Image Producer > System.err.println("Image format not supported : " + extensionURL); > return null; > } > } > > // Load the right class > if ( imageType == IMAGE_GIF || > imageType == IMAGE_JPEG ) { > // gif or jpeg image > return new GifJpegImage(absoluteURL, x, y, width, height); > /* } else if ( imageType == IMAGE_PNG ) { > // png image > > */ } else { > // no Image Producer > System.err.println("Image format not supported"); > return null; > } > Index: ./src/org/apache/fop/image/GifJpegImage.java =================================================================== RCS file: /home/cvspublic/xml-fop/src/org/apache/fop/image/GifJpegImage.java,v retrieving revision 1.6 diff -r1.6 GifJpegImage.java 64a65,68 > import java.lang.Math; > > import java.util.zip.Deflater; > 67,77c71,81 < int X; < int Y; < int width; < int height; < int pixelwidth; < int pixelheight; < String ref; < boolean color = true; < int bitperpixel = 8; < int[] imagemap; < int[] tempmap; --- > int X = 0; > int Y = 0; > int width = 0; > int height = 0; > int pixelWidth = 0; > int pixelHeight = 0; > URL HRef = null; > boolean colored = true; > int bitsPerPixel = 8; > byte[] compressedMap; > int compressedSize = 0; 82c86 < public GifJpegImage(String href, int x, int y, int w, int h) { --- > public GifJpegImage(URL href, int x, int y, int w, int h) { 84c88 < this.ref = href; --- > this.HRef = href; 87,88c91,94 < this.pixelheight = -1; < this.pixelwidth = -1; --- > this.width = w; > this.height = h; > this.pixelHeight = -1; > this.pixelWidth = -1; 89a96,97 > int[] tempMap; > 91,107c99,115 < URL url = new URL(href); < ImageProducer ip = (ImageProducer)url.getContent(); < FopImageConsumer consumer = new FopImageConsumer(this); < ip.startProduction(consumer); < synchronized (imageWait) { < imageWait.wait(); < } < /* this only works on windows, not on linux < while ((this.pixelheight = consumer.getHeight())==-1) {} < while ((this.pixelwidth = consumer.getWidth())==-1) {} < */ < this.tempmap = new int[this.pixelwidth * this.pixelheight]; < < PixelGrabber pg = new < PixelGrabber(ip, 0, 0, < this.pixelwidth, this.pixelheight, < this.tempmap, 0, w); --- > ImageProducer ip = (ImageProducer)HRef.getContent(); > FopImageConsumer consumer = new FopImageConsumer(this); > ip.startProduction(consumer); > /* Doesn't work for me... > synchronized (imageWait) { > imageWait.wait(); > } */ > // this only works on windows, not on linux > while ((this.pixelHeight = consumer.getHeight())==-1) {} > while ((this.pixelWidth = consumer.getWidth())==-1) {} > > tempMap = new int[this.pixelWidth * this.pixelHeight]; > > PixelGrabber pg = new > PixelGrabber( ip, 0, 0, > this.pixelWidth, this.pixelHeight, > tempMap, 0, this.pixelWidth); 111c119,120 < System.err.println("Image grabbing interrupted"); --- > System.err.println("Image grabbing interrupted"); > return; 114c123,124 < System.err.println("Image format not supported: " + href); --- > System.err.println("Image format not supported: " + HRef.toString() + " : " + e); > return; 116c126 < System.err.println("Error loading image " + href + --- > System.err.println("Error loading image " + HRef.toString() + 117a128 > return; 119,129c130,165 < < if (w==0) { < this.width=this.pixelwidth*1000; < } else { < this.width=w; < } < < if (h==0) { < this.height=this.pixelheight*1000; < } else { < this.height=h; --- > > // try to Deflat the image > Deflater compressor = new Deflater(); > compressor.setLevel(Deflater.DEFAULT_COMPRESSION); > compressor.setStrategy(Deflater.DEFAULT_STRATEGY); > byte[] byteTempMap = new byte[this.pixelWidth * this.pixelHeight * 3]; > for (int i = 0; i < this.pixelHeight; i++) { > for (int j = 0; j < this.pixelWidth; j++) { > int p = tempMap[i * this.pixelWidth + j]; > int r = (p >> 16) & 0xFF; > int g = (p >> 8) & 0xFF; > int b = (p ) & 0xFF; > byteTempMap[3 * (i * this.pixelWidth + j)] = (byte) (r & 0xFF); > byteTempMap[3 * (i * this.pixelWidth + j) + 1] = (byte) (g & 0xFF); > byteTempMap[3 * (i * this.pixelWidth + j) + 2] = (byte) (b & 0xFF); > } > } > compressor.setInput(byteTempMap); > compressor.finish(); > compressedMap = new byte[this.pixelWidth * this.pixelHeight * 3]; > compressedSize = compressor.deflate(compressedMap); > compressor.end(); > > tempMap = null; > byteTempMap = null; > > double ratio = ((double) pixelWidth) / ((double) pixelHeight); > > // found formatting size > if ( ( width == 0 ) && ( height == 0 ) ) { > height = (int) (1000.0 * ((double) pixelHeight) / 2.0); > width = (int) (1000.0 * ((double) pixelWidth) / 2.0); > } else if ( width == 0 ) { > width = (int) (ratio * ((double) height)); > } else if ( height == 0 ) { > height = (int) (((double) width) / ratio); 130a167 > 132c169,174 < --- > > public void setDimensions(int width, int height) { > this.width = width; > this.height = height; > } > 142a185 > /* Doesn't work for me 146c189 < } --- > */ } 176,177c219,221 < public String gethref() { < return this.ref; --- > public String getHRef() { > // need to be changed (URL everywhere...) > return this.HRef.toString(); 188,189c232,233 < public int getpixelwidth() { < return this.pixelwidth; --- > public int getPixelWidth() { > return this.pixelWidth; 192,193c236,237 < public int getpixelheight() { < return this.pixelheight; --- > public int getPixelHeight() { > return this.pixelHeight; 203a248,255 > public int getCompressedSize() { > return this.compressedSize; > } > > public byte[] getCompressedMap() { > return this.compressedMap; > } > 205,216c257,258 < this.imagemap=new int[this.pixelheight * this.pixelwidth * 3]; < int count = 0; < int i; < for(i = 0; i < (this.pixelheight * this.pixelwidth); i++) { < int red = ((this.tempmap[i]>>16) & 0xff); < int green = ((this.tempmap[i]>> 8) & 0xff); < int blue = ((this.tempmap[i] ) & 0xff); < this.imagemap[count++]=red; < this.imagemap[count++]=green; < this.imagemap[count++]=blue; < } < return imagemap; --- > // tmp > return new int[1]; 219c261 < public boolean getcolor() { --- > public boolean isColored() { 223,224c265,266 < public int getbitperpixel() { < return this.bitperpixel; --- > public int getBitsPerPixel() { > return this.bitsPerPixel; Index: ./src/org/apache/fop/image/ImageArea.java =================================================================== RCS file: /home/cvspublic/xml-fop/src/org/apache/fop/image/ImageArea.java,v retrieving revision 1.5 diff -r1.5 ImageArea.java 56a57 > import org.apache.fop.fo.properties.TextAlign; 69,88c70,89 < super(fontState,width,height); < this.currentHeight = height; < this.contentRectangleWidth = width; < this.image = img; < < switch (align) { < case 1: < xOffset = startIndent; < break; < case 2: < if (endIndent == 0) < endIndent = AllocationWidth; < xOffset = (endIndent - width); < break; < case 3: < case 4: < if (endIndent == 0) < endIndent = AllocationWidth; < xOffset = startIndent + ((endIndent - startIndent) - width)/2; < break; --- > > super(fontState,width,height); > this.currentHeight = height; > this.contentRectangleWidth = width; > this.image = img; > > switch ( align ) { > case TextAlign.START: > xOffset = startIndent; > break; > case TextAlign.END: > xOffset = AllocationWidth - endIndent - width; > break; > case TextAlign.JUSTIFIED: > xOffset = startIndent; > break; > case TextAlign.CENTERED: > xOffset = startIndent + (int) (((double) (AllocationWidth - startIndent - endIndent - width)) / 2.0 ); > break; > } 90d90 < } Index: ./src/org/apache/fop/render/pdf/PDFRenderer.java =================================================================== RCS file: /home/cvspublic/xml-fop/src/org/apache/fop/render/pdf/PDFRenderer.java,v retrieving revision 1.9 diff -r1.9 PDFRenderer.java 57a58,60 > //// TEST TMP //// > import org.apache.fop.image.GifJpegImage; > //// TEST TMP //// 283c286,287 < this.currentYPosition -= h*1000; --- > // this.currentYPosition -= h*1000; > this.currentYPosition -= h; 285c289,290 < FopImage img = area.getImage(); --- > // FopImage img = area.getImage(); > GifJpegImage img = (GifJpegImage) area.getImage(); 286a292,319 > int pw = img.getPixelWidth(); > int ph = img.getPixelHeight(); > // int[] pixels = img.getimagemap(); > byte[] pixels = img.getCompressedMap(); > int size = img.getCompressedSize(); > > float rx = (x + img.getX())/1000f; > float ry = (y + img.getY())/1000f; > float rh = img.getHeight()/1000f; > float rw = img.getWidth()/1000f; > > currentStream.add("ET\nq\n" + rw + " 0 0 " + rh + " " + rx + " " + (ry-rh) > + " cm\nBI\n/W " + pw + "\n/H " + ph + > "\n/BPC 8\n/CS /RGB\n/F [/ASCIIHexDecode /FlateDecode]\nID\n"); > > // currentStream.addImageArray(pixels, pw, ph); > for (int i = 0; i < size; i++) { > int val = (int) (pixels[i] & 0xFF); > if ( val < 16 ) { > this.currentStream.add(Integer.toString(0)); > } > this.currentStream.add(Integer.toHexString(val)); > } > this.currentStream.add(">\n"); > > currentStream.add("EI\nQ\nBT\n"); > > /* 287a321,326 > > currentStream.add("ET\nq\n" + rw + " 0 0 " + rh + " " + rx + " " + (ry - h) > + " cm\n/Im" + xObjectNum + " Do\nQ\nBT\n"); > */ > //// TEST //// > /* int xObjectNum = this.pdfDoc.addImage(img); 294c333 < } --- > */ } The command completed successfully. _______________________________________ Eric SCHAEFFER eschaeffer@posterconseil.com POSTER CONSEIL 118 rue de Tocqueville 75017 PARIS FRANCE Tel. : 33-140541058 Fax : 33-140541059 _______________________________________ ----- Original Message ----- From: James Tauber To: Sent: Friday, December 03, 1999 8:42 AM Subject: Re: Unsupported bmp format in 0.12.0 > > I tried FOP 0.12.0 with a graphic block like > href="image.jpg"/> but I get the error message "Unsupported bmp format" > just > > after the message "Formatting FOs into areas". I also tried with a gif > file > > but I get the same result. > > > > Is it really a problem with the image type, or is it something else? > > Has anyone actually got display-graphic working in FOP 0.12.0? > > Kelly and Eric, you sent some bug fixes, so presumably you got something > working. > > James > From jtauber@locus.apache.org Fri Dec 3 09:41:39 1999 Return-Path: Mailing-List: contact fop-cvs-help@xml.apache.org; run by ezmlm Delivered-To: mailing list fop-cvs@xml.apache.org Received: (qmail 73085 invoked from network); 3 Dec 1999 09:41:39 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 3 Dec 1999 09:41:39 -0000 Received: (qmail 18067 invoked by uid 2016); 3 Dec 1999 09:41:13 -0000 Delivered-To: apcore-xml-fop-cvs@apache.org Received: (qmail 18049 invoked from network); 3 Dec 1999 09:41:11 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 3 Dec 1999 09:41:11 -0000 Received: (qmail 73049 invoked by uid 1018); 3 Dec 1999 09:38:56 -0000 Date: 3 Dec 1999 09:38:56 -0000 Message-ID: <19991203093856.73048.qmail@locus.apache.org> From: jtauber@locus.apache.org To: xml-fop-cvs@apache.org Subject: cvs commit: xml-fop/src/org/apache/fop/fo FONode.java jtauber 99/12/03 01:38:56 Modified: src/org/apache/fop/fo FONode.java Log: made FONode set/force methods recursive as part of Eric Schaeffers fix for lists within tables Revision Changes Path 1.8 +41 -1 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.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- FONode.java 1999/12/03 08:12:57 1.7 +++ FONode.java 1999/12/03 09:38:56 1.8 @@ -1,4 +1,4 @@ -/*-- $Id: FONode.java,v 1.7 1999/12/03 08:12:57 jtauber Exp $ -- +/*-- $Id: FONode.java,v 1.8 1999/12/03 09:38:56 jtauber Exp $ -- ============================================================================ The Apache Software License, Version 1.1 @@ -99,34 +99,74 @@ public void setIsInLabel() { this.isInLabel = true; + // made recursive by Eric Schaeffer + for (int i = 0; i < this.children.size(); i++ ) { + FONode child = (FONode) this.children.elementAt(i); + child.setIsInLabel(); + } } public void setIsInListBody() { this.isInListBody = true; + // made recursive by Eric Schaeffer + for (int i = 0; i < this.children.size(); i++) { + FONode child = (FONode) this.children.elementAt(i); + child.setIsInListBody(); + } } public void setIsInTableCell() { this.isInTableCell = true; + // made recursive by Eric Schaeffer + for (int i = 0; i < this.children.size(); i++) { + FONode child = (FONode) this.children.elementAt(i); + child.setIsInTableCell(); + } } public void setDistanceBetweenStarts(int distance) { this.distanceBetweenStarts = distance; + // made recursive by Eric Schaeffer + for (int i = 0; i < this.children.size(); i++) { + FONode child = (FONode) this.children.elementAt(i); + child.setDistanceBetweenStarts(distance); + } } public void setLabelSeparation(int separation) { this.labelSeparation = separation; + // made recursive by Eric Schaeffer + for (int i = 0; i < this.children.size(); i++) { + FONode child = (FONode) this.children.elementAt(i); + child.setLabelSeparation(separation); + } } public void setBodyIndent(int indent) { this.bodyIndent = indent; + // made recursive by Eric Schaeffer + for (int i = 0; i < this.children.size(); i++) { + FONode child = (FONode) this.children.elementAt(i); + child.setBodyIndent(indent); + } } public void forceStartOffset(int offset) { this.forcedStartOffset = offset; + // made recursive by Eric Schaeffer + for (int i = 0; i < this.children.size(); i++) { + FONode child = (FONode) this.children.elementAt(i); + child.forceStartOffset(offset); + } } public void forceWidth(int width) { this.forcedWidth = width; + // made recursive by Eric Schaeffer + for (int i = 0; i < this.children.size(); i++) { + FONode child = (FONode) this.children.elementAt(i); + child.forceWidth(width); + } } public void resetMarker() { From fotis@locus.apache.org Fri Dec 3 09:27:53 1999 Return-Path: Mailing-List: contact fop-cvs-help@xml.apache.org; run by ezmlm Delivered-To: mailing list fop-cvs@xml.apache.org Delivered-To: moderator for fop-cvs@xml.apache.org Received: (qmail 72838 invoked from network); 3 Dec 1999 09:27:53 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 3 Dec 1999 09:27:53 -0000 Received: (qmail 7467 invoked by uid 2016); 3 Dec 1999 09:27:49 -0000 Delivered-To: apcore-xml-fop-cvs@apache.org Received: (qmail 7459 invoked from network); 3 Dec 1999 09:27:49 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 3 Dec 1999 09:27:49 -0000 Received: (qmail 72611 invoked by uid 1061); 3 Dec 1999 09:18:09 -0000 Date: 3 Dec 1999 09:18:09 -0000 Message-ID: <19991203091809.72610.qmail@locus.apache.org> From: fotis@locus.apache.org To: xml-fop-cvs@apache.org Subject: cvs commit: xml-fop/docs xml2pdf.xsl fotis 99/12/03 01:18:09 Modified: docs xml2pdf.xsl Log: Submitted by: Fotis Jannidis Fixes the overflow bug, minor changes for better readability Revision Changes Path 1.2 +158 -115 xml-fop/docs/xml2pdf.xsl Index: xml2pdf.xsl =================================================================== RCS file: /home/cvs/xml-fop/docs/xml2pdf.xsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- xml2pdf.xsl 1999/11/26 05:18:06 1.1 +++ xml2pdf.xsl 1999/12/03 09:18:08 1.2 @@ -11,54 +11,60 @@ - + - - + + - - - - - - - - - - - - - - - - - - - - - -FOP - p. - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + FOP - p. + + + + + + + + + + @@ -66,128 +72,165 @@ + + + + - - - + + + + + + + + + Content + + + + ) + + + + - - + + - -) - - + + ) + + - - - + + + - - - + + + + - + - + - - - + + + - - - + + + - - - + + + - -* - - - - - - + + * + + + + + + - - - + + + - - - + + + - - - -() + + + + + () + From fotis@locus.apache.org Fri Dec 3 09:53:24 1999 Return-Path: Mailing-List: contact fop-cvs-help@xml.apache.org; run by ezmlm Delivered-To: mailing list fop-cvs@xml.apache.org Delivered-To: moderator for fop-cvs@xml.apache.org Received: (qmail 73551 invoked from network); 3 Dec 1999 09:53:24 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 3 Dec 1999 09:53:24 -0000 Received: (qmail 28021 invoked by uid 2016); 3 Dec 1999 09:53:21 -0000 Delivered-To: apcore-xml-fop-cvs@apache.org Received: (qmail 28018 invoked from network); 3 Dec 1999 09:53:20 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 3 Dec 1999 09:53:20 -0000 Received: (qmail 73191 invoked by uid 1061); 3 Dec 1999 09:50:16 -0000 Date: 3 Dec 1999 09:50:16 -0000 Message-ID: <19991203095016.73190.qmail@locus.apache.org> From: fotis@locus.apache.org To: xml-fop-cvs@apache.org Subject: cvs commit: xml-fop/docs qaml-xml.css fotis 99/12/03 01:50:16 Added: docs qaml-xml.css Log: From: Fotis Jannidis Basic stylesheet for readme.xml Revision Changes Path 1.1 xml-fop/docs/qaml-xml.css Index: qaml-xml.css =================================================================== /* the "state of the art" xml browser don't support xlink and list-item */ faq { display:block; font-family:"Times Roman",Times,serif; font-size:12pt; margin-left:15%; margin-right:15%; } a { display:block; } address { display:block; } althdr { display:block; } archive { display:block; } author { display:block; } body { display:block; } content { display:block; } contributor { display:block; } div { display:block; } email { display:block; } head { display:block; } hdr { display:block; } label { display:block; } link { display:inline; } logo { display:inline; } maintain { display:block; } name { display:block; } p { display:block; font-style:monospace; } /*not supported by mozilla 5 and ie 5 */ p.li { display:list-item; } p.pre { display:block; font-family:Monospace; font-size:10pt; margin-top:5pt; margin-bottom:5pt; } q { display:block; } qna { display:block; } section { display:block; } span { display:block; } subject { display:block; } title { display:block; margin-top:9pt; margin-bottom:6pt; font-size:14pt; font-weight:bold; } topic { display:block; } type { display:block; } version { display:block; } From jtauber@locus.apache.org Fri Dec 3 11:21:08 1999 Return-Path: Mailing-List: contact fop-cvs-help@xml.apache.org; run by ezmlm Delivered-To: mailing list fop-cvs@xml.apache.org Received: (qmail 77075 invoked from network); 3 Dec 1999 11:21:08 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 3 Dec 1999 11:21:08 -0000 Received: (qmail 1789 invoked by uid 2016); 3 Dec 1999 11:21:08 -0000 Delivered-To: apcore-xml-fop-cvs@apache.org Received: (qmail 1743 invoked from network); 3 Dec 1999 11:21:07 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 3 Dec 1999 11:21:07 -0000 Received: (qmail 75357 invoked by uid 1018); 3 Dec 1999 11:17:47 -0000 Date: 3 Dec 1999 11:17:47 -0000 Message-ID: <19991203111747.75356.qmail@locus.apache.org> From: jtauber@locus.apache.org To: xml-fop-cvs@apache.org Subject: cvs commit: xml-fop/src/org/apache/fop/fo/flow ListBlock.java jtauber 99/12/03 03:17:47 Modified: . STATUS src/org/apache/fop/fo/flow ListBlock.java Log: background-color now works on list-block (contributed by Eric Schaeffer) Revision Changes Path 1.16 +2 -1 xml-fop/STATUS Index: STATUS =================================================================== RCS file: /home/cvs/xml-fop/STATUS,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- STATUS 1999/12/03 08:36:49 1.15 +++ STATUS 1999/12/03 11:17:47 1.16 @@ -1,4 +1,4 @@ -$Id: STATUS,v 1.15 1999/12/03 08:36:49 jtauber Exp $ +$Id: STATUS,v 1.16 1999/12/03 11:17:47 jtauber Exp $ STATUS @@ -36,6 +36,7 @@ basic support for padding-{top,left,bottom,right} on blocks. implemented simple-link (don't think it works, though) XTCommandLine now works again +background color works on list-block Done for 0.12.0 release: 1.7 +6 -1 xml-fop/src/org/apache/fop/fo/flow/ListBlock.java Index: ListBlock.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/ListBlock.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- ListBlock.java 1999/11/25 17:33:12 1.6 +++ ListBlock.java 1999/12/03 11:17:47 1.7 @@ -1,4 +1,4 @@ -/*-- $Id: ListBlock.java,v 1.6 1999/11/25 17:33:12 jtauber Exp $ -- +/*-- $Id: ListBlock.java,v 1.7 1999/12/03 11:17:47 jtauber Exp $ -- ============================================================================ The Apache Software License, Version 1.1 @@ -54,6 +54,7 @@ // FOP import org.apache.fop.fo.*; import org.apache.fop.fo.properties.*; +import org.apache.fop.datatypes.*; import org.apache.fop.layout.Area; import org.apache.fop.layout.BlockArea; import org.apache.fop.layout.FontState; @@ -88,6 +89,7 @@ int provisionalDistanceBetweenStarts; int provisionalLabelSeparation; int spaceBetweenListRows = 0; + ColorType backgroundColor; public ListBlock(FObj parent, PropertyList propertyList) { super(parent, propertyList); @@ -126,6 +128,8 @@ this.provisionalLabelSeparation = this.properties.get("provisional-label-separation").getLength().mvalue(); this.spaceBetweenListRows = 0; // not used at present + this.backgroundColor = + this.properties.get("background-color").getColorType(); this.marker = 0; @@ -148,6 +152,7 @@ area.spaceLeft(), startIndent, endIndent, 0, align, alignLast, lineHeight); blockArea.setPage(area.getPage()); + blockArea.setBackgroundColor(backgroundColor); blockArea.start(); int numChildren = this.children.size(); From jtauber@locus.apache.org Fri Dec 3 11:40:10 1999 Return-Path: Mailing-List: contact fop-cvs-help@xml.apache.org; run by ezmlm Delivered-To: mailing list fop-cvs@xml.apache.org Received: (qmail 82272 invoked from network); 3 Dec 1999 11:40:10 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 3 Dec 1999 11:40:10 -0000 Received: (qmail 13096 invoked by uid 2016); 3 Dec 1999 11:40:08 -0000 Delivered-To: apcore-xml-fop-cvs@apache.org Received: (qmail 13082 invoked from network); 3 Dec 1999 11:40:07 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 3 Dec 1999 11:40:07 -0000 Received: (qmail 82255 invoked by uid 1018); 3 Dec 1999 11:40:07 -0000 Date: 3 Dec 1999 11:40:07 -0000 Message-ID: <19991203114007.82254.qmail@locus.apache.org> From: jtauber@locus.apache.org To: xml-fop-cvs@apache.org Subject: cvs commit: xml-fop/src/org/apache/fop/fo/flow ListBlock.java jtauber 99/12/03 03:40:07 Modified: . STATUS src/org/apache/fop/fo/flow ListBlock.java Log: list-blocks can now go in table-cells (contributed by Eric Schaeffer) Revision Changes Path 1.17 +2 -1 xml-fop/STATUS Index: STATUS =================================================================== RCS file: /home/cvs/xml-fop/STATUS,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- STATUS 1999/12/03 11:17:47 1.16 +++ STATUS 1999/12/03 11:40:06 1.17 @@ -1,4 +1,4 @@ -$Id: STATUS,v 1.16 1999/12/03 11:17:47 jtauber Exp $ +$Id: STATUS,v 1.17 1999/12/03 11:40:06 jtauber Exp $ STATUS @@ -37,6 +37,7 @@ implemented simple-link (don't think it works, though) XTCommandLine now works again background color works on list-block +list-blocks can now be in table-cell Done for 0.12.0 release: 1.8 +7 -1 xml-fop/src/org/apache/fop/fo/flow/ListBlock.java Index: ListBlock.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/ListBlock.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- ListBlock.java 1999/12/03 11:17:47 1.7 +++ ListBlock.java 1999/12/03 11:40:06 1.8 @@ -1,4 +1,4 @@ -/*-- $Id: ListBlock.java,v 1.7 1999/12/03 11:17:47 jtauber Exp $ -- +/*-- $Id: ListBlock.java,v 1.8 1999/12/03 11:40:06 jtauber Exp $ -- ============================================================================ The Apache Software License, Version 1.1 @@ -144,6 +144,12 @@ if (this.isInListBody) { startIndent += bodyIndent + distanceBetweenStarts; bodyIndent = startIndent; + } + + if (this.isInTableCell) { + startIndent += forcedStartOffset; + endIndent += area.getAllocationWidth() - forcedWidth - + forcedStartOffset; } } From fotis@locus.apache.org Fri Dec 3 12:27:36 1999 Return-Path: Mailing-List: contact fop-cvs-help@xml.apache.org; run by ezmlm Delivered-To: mailing list fop-cvs@xml.apache.org Received: (qmail 95238 invoked from network); 3 Dec 1999 12:27:36 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 3 Dec 1999 12:27:36 -0000 Received: (qmail 19306 invoked by uid 2016); 3 Dec 1999 12:27:19 -0000 Delivered-To: apcore-xml-fop-cvs@apache.org Received: (qmail 19282 invoked from network); 3 Dec 1999 12:27:12 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 3 Dec 1999 12:27:12 -0000 Received: (qmail 95107 invoked by uid 1061); 3 Dec 1999 12:27:12 -0000 Date: 3 Dec 1999 12:27:12 -0000 Message-ID: <19991203122712.95106.qmail@locus.apache.org> From: fotis@locus.apache.org To: xml-fop-cvs@apache.org Subject: cvs commit: xml-fop/src/org/apache/fop/apps AWTCommandLine.java CommandLine.java fotis 99/12/03 04:27:12 Modified: src/org/apache/fop/apps AWTCommandLine.java CommandLine.java Log: sets Xerces-J as default sax parser Revision Changes Path 1.2 +7 -1 xml-fop/src/org/apache/fop/apps/AWTCommandLine.java Index: AWTCommandLine.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/apps/AWTCommandLine.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- AWTCommandLine.java 1999/11/25 19:21:09 1.1 +++ AWTCommandLine.java 1999/12/03 12:27:12 1.2 @@ -57,12 +57,18 @@ frame.setVisible(true); } + /** + * creates a SAX parser, using the value of org.xml.sax.parser + * defaulting to org.apache.xerces.parsers.SAXParser + * + * @return the created SAX parser + */ static Parser createParser() { String parserClassName = System.getProperty("org.xml.sax.parser"); if (parserClassName == null) { - parserClassName = "com.jclark.xml.sax.Driver"; + parserClassName = "org.apache.xerces.parsers.SAXParser"; } System.err.println("using SAX parser " + parserClassName); 1.6 +3 -3 xml-fop/src/org/apache/fop/apps/CommandLine.java Index: CommandLine.java =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/apps/CommandLine.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- CommandLine.java 1999/11/22 02:31:17 1.5 +++ CommandLine.java 1999/12/03 12:27:12 1.6 @@ -1,4 +1,4 @@ -/*-- $Id: CommandLine.java,v 1.5 1999/11/22 02:31:17 jtauber Exp $ -- +/*-- $Id: CommandLine.java,v 1.6 1999/12/03 12:27:12 fotis Exp $ -- ============================================================================ The Apache Software License, Version 1.1 @@ -76,7 +76,7 @@ /** * creates a SAX parser, using the value of org.xml.sax.parser - * defaulting to com.jclark.xml.sax.Driver + * defaulting to org.apache.xerces.parsers.SAXParser * * @return the created SAX parser */ @@ -84,7 +84,7 @@ String parserClassName = System.getProperty("org.xml.sax.parser"); if (parserClassName == null) { - parserClassName = "com.jclark.xml.sax.Driver"; + parserClassName = "org.apache.xerces.parsers.SAXParser"; } System.err.println("using SAX parser " + parserClassName); From fotis@locus.apache.org Fri Dec 3 12:31:29 1999 Return-Path: Mailing-List: contact fop-cvs-help@xml.apache.org; run by ezmlm Delivered-To: mailing list fop-cvs@xml.apache.org Received: (qmail 96628 invoked from network); 3 Dec 1999 12:31:29 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 3 Dec 1999 12:31:29 -0000 Received: (qmail 23041 invoked by uid 2016); 3 Dec 1999 12:31:29 -0000 Delivered-To: apcore-xml-fop-cvs@apache.org Received: (qmail 23039 invoked from network); 3 Dec 1999 12:31:28 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 3 Dec 1999 12:31:28 -0000 Received: (qmail 96620 invoked by uid 1061); 3 Dec 1999 12:31:28 -0000 Date: 3 Dec 1999 12:31:28 -0000 Message-ID: <19991203123128.96619.qmail@locus.apache.org> From: fotis@locus.apache.org To: xml-fop-cvs@apache.org Subject: cvs commit: xml-fop/docs readme.xml fotis 99/12/03 04:31:28 Modified: docs readme.xml Log: New sections: How to get involved. Problems. Points to Xerces-J as standard parser. Mentions swing classes. Revision Changes Path 1.4 +67 -23 xml-fop/docs/readme.xml Index: readme.xml =================================================================== RCS file: /home/cvs/xml-fop/docs/readme.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- readme.xml 1999/11/30 04:16:08 1.3 +++ readme.xml 1999/12/03 12:31:27 1.4 @@ -1,5 +1,5 @@ - + - + FOP: An Open-Source XSL Formatter and Renderer - 1.4 1999/11/29 19:45 + 1.5 1999/12/01 16:00 James Tauber Fotis Jannidis jtauber@jtauber.com - jannidis@lrz.uni-muenchen.deFOP + fotis.jannidis@lrz.uni-muenchen.de + FOP
+ What is FOP?

FOP is the world's first print formatter driven by XSL formatting objects. It is a Java 1.1 application that reads a formatting object @@ -51,7 +53,11 @@ 1. Prerequisites

a) Java 1.1.x or later -

+

If you use Java 1.1.x you must also seperately include the swing classes, which can + be found at the + Sun website. From Java 1.2 on (aka Java 2) they are part of the standard + distribution. +

b) An XML parser @@ -93,6 +99,12 @@ 1) Prerequisites

Following software must be installed:

a) Java 1.1.x or later

+

For the fo-file viewer mode of FOP (see below) you must have the swing classes installed. + From Java 1.2 on (aka Java 2) they are part of the standard java distribution. + If you use Java 1.1.x you must seperately include the swing classes, which can + be found at the + Sun website. +

b) An XML parser which supports SAX and DOM like Xerces-J.

c) If you have to produce the flow objects files, which are the input for FOP, @@ -104,8 +116,8 @@

2) Starting FOP as an standalone application -

There are three ways of running FOP from the command line.

-

a) Batch processing formatting object files:

+

There are three ways to run FOP from the command line.

+

a) Batch processing formatting objects (fo) files:

java org.apache.fop.apps.CommandLine fo-file pdf-file

b) Batch processing xml files (includes production of the fo-files):

java org.apache.fop.apps.CommandLine xml-file xsl-file pdf-file

@@ -118,17 +130,18 @@

One is to first use an XSLT engine to produce the formatting object tree as an XML document and then running the class org.apache.fop.apps.CommandLine with the formatting object file name and PDF filename as arguments. You will need to include - FOP, SAX and your SAX Parser in your classpath and so you might invoke + FOP and your XML Parser in your classpath and so you might invoke

-

java -cp fop_x_xx_x.jar;sax.jar;xp.jar

-

org.apache.fop.apps.CommandLine formatting-tree-file pdf-file

-

If your SAX Parser is other than XP, you will need to set the property +

java -cp fop_x_xx_x.jar;xerces.jar

+

org.apache.fop.apps.CommandLine fo-file pdf-file

+

If your SAX Parser is other than Xerces, you will need to set the property org.xml.sax.parser to the SAX Parser class to use. The following example shows - the command line, if you use Xerces, the xml parser from xml.apache.org: + the command line, if you use XP, the XML parser from James Clark:

-

java -Dorg.xml.sax.parser=org.apache.xerces.parsers.SAXParser

-

-cp fop_x_xx_x.jar;xerces.jar

+

java -Dorg.xml.sax.parser=com.jclark.xml.sax.Driver

+

-cp fop_x_xx_x.jar;sax.jar;xt.jar;xp.jar;xerces.jar

org.apache.fop.apps.AWTCommandLine formatting-tree-file pdf-file

+

(You have to include xerces.jar or another xml parser which supports DOM in your classpath.)

b) Method Two @@ -139,9 +152,10 @@ need to include FOP, SAX, your SAX Parser and XT in your classpath and so you might invoke

-

java -cp fop_x_xx_x.jar;sax.jar;xp.jar;xt.jar

+

java -Dorg.xml.sax.parser=com.jclark.xml.sax.Driver

+

-cp fop_x_xx_x.jar;xt.jar;xerces.jar

org.apache.fop.apps.CommandLine xml-file xsl-file pdf-file

-

Again, if your SAX Parser is other than XP, you will need to set the property +

Again, if your SAX Parser is other than Xerces, you will need to set the property org.xml.sax.parser to the SAX Parser class to use.

@@ -149,9 +163,11 @@ c) Method Three

If you already produced the FO file, you can preview the results of your transformation without using any pdf viewer by invoking FOP with the viewer - application. You will need to include FOP, SAX and your SAX Parser in your classpath + application. You will need to include FOP and your XML Parser in your classpath

-

java org.apache.fop.apps.AWTCommandLine formatting-tree-file

+

java -cp fop_x_xx_x.jar;xerces.jar

+

org.apache.fop.apps.AWTCommandLine fo-file

+

The viewer uses the swing classes.

Note: If you are using java 2 or later (i.e. jdk 1.2. or later) you can put all needed jar files into the subdirectory jdk1.2.x\jre\lib\ext (windows example). Then FOP can be started without classpath: @@ -159,6 +175,14 @@

java org.apache.fop.apps.CommandLine fo-file pdf-file

+
+ 3) Problems +

If you have problems running FOP, please have a look at the + FOP FAQ. If you don't find a solution there, + you can ask for help on the list fop-dev@xml.apache.org. Maybe it's bug and + maybe somebody is already working on it. +

+
@@ -167,7 +191,7 @@ What's Implemented?

Also see STATUS for what is being worked on.

- a) Formatting Objects + 1) Formatting Objects

root

layout-master-set

@@ -197,11 +221,11 @@

table-body (minimal support)

table-row (minimal support)

table-cell (minimal support)

- -
+
+
- b) Properties + 2) Properties

end-indent

page-master-name

@@ -255,6 +279,26 @@

see STATUS file

+ + +
+ Getting involved +

1. Subscribe to fop-dev@xml.apache.org by sending an email + to fop-dev-subscribe@xml.apache.org

+

2. Read the archives to fop-dev to get an idea of the issues being + discussed.

+

3. Subscribe to fop-cvs@xml.apache.org by sending an email to + fop-cvs-subscribe@xml.apache.org (it is important + that you follow changes being made).

+

4. Try :-) to wrap your head around the XSL working draft.

+

5. Get CVS working on your system.

+

6. Ask, on fop-dev, any questions you have at all about the code, design, etc.

+

7. When you feel comfortable modifying the code, send diffs to + fop-dev with your contributions.

+

8. Have fun!

+
+ +
@@ -262,7 +306,7 @@

XML Recommendation

XSL-FO Working Draft

-

XSLT Recommandation

+

XSLT Recommendation

PDF Documentation

Simple API for XML (SAX)

Document Object Model (DOM)

From fotis@locus.apache.org Fri Dec 3 09:37:52 1999 Return-Path: Mailing-List: contact fop-cvs-help@xml.apache.org; run by ezmlm Delivered-To: mailing list fop-cvs@xml.apache.org Delivered-To: moderator for fop-cvs@xml.apache.org Received: (qmail 73004 invoked from network); 3 Dec 1999 09:37:52 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 3 Dec 1999 09:37:52 -0000 Received: (qmail 15735 invoked by uid 2016); 3 Dec 1999 09:37:52 -0000 Delivered-To: apcore-xml-fop-cvs@apache.org Received: (qmail 15732 invoked from network); 3 Dec 1999 09:37:52 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 3 Dec 1999 09:37:52 -0000 Received: (qmail 72986 invoked by uid 1061); 3 Dec 1999 09:35:51 -0000 Date: 3 Dec 1999 09:35:51 -0000 Message-ID: <19991203093551.72985.qmail@locus.apache.org> From: fotis@locus.apache.org To: xml-fop-cvs@apache.org Subject: cvs commit: xml-fop/docs xml2html.xsl fotis 99/12/03 01:35:51 Modified: docs xml2html.xsl Log: From: Fotis Jannidis Revision Changes Path 1.2 +3 -3 xml-fop/docs/xml2html.xsl Index: xml2html.xsl =================================================================== RCS file: /home/cvs/xml-fop/docs/xml2html.xsl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- xml2html.xsl 1999/11/26 05:18:06 1.1 +++ xml2html.xsl 1999/12/03 09:35:50 1.2 @@ -46,7 +46,7 @@

-) +) # @@ -79,10 +79,10 @@

- + -) +)

From jtauber@locus.apache.org Sat Dec 4 08:18:27 1999 Return-Path: Mailing-List: contact fop-cvs-help@xml.apache.org; run by ezmlm Delivered-To: mailing list fop-cvs@xml.apache.org Received: (qmail 52917 invoked from network); 4 Dec 1999 08:18:27 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 4 Dec 1999 08:18:27 -0000 Received: (qmail 13577 invoked by uid 2016); 4 Dec 1999 08:18:27 -0000 Delivered-To: apcore-xml-fop-cvs@apache.org Received: (qmail 13575 invoked from network); 4 Dec 1999 08:18:27 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 4 Dec 1999 08:18:27 -0000 Received: (qmail 52914 invoked by uid 1018); 4 Dec 1999 08:18:26 -0000 Date: 4 Dec 1999 08:18:26 -0000 Message-ID: <19991204081826.52913.qmail@locus.apache.org> From: jtauber@locus.apache.org To: xml-fop-cvs@apache.org Subject: cvs commit: xml-fop/src/org/apache/fop/viewer Makefile jtauber 99/12/04 00:18:26 Modified: src/org/apache/fop/apps Makefile src/org/apache/fop/datatypes Makefile src/org/apache/fop/fo/flow Makefile src/org/apache/fop/fo/pagination Makefile src/org/apache/fop/image Makefile src/org/apache/fop/layout Makefile src/org/apache/fop/pdf Makefile src/org/apache/fop/render/awt Makefile src/org/apache/fop/render/pdf Makefile src/org/apache/fop/render/pdf/fonts Makefile src/org/apache/fop/render/xml Makefile src/org/apache/fop/svg Makefile src/org/apache/fop/viewer Makefile Log: at Chris Maden's suggestion, fixed bottom-level Makefiles to not try and recurse into sub directories as it leads to syntax illegal in some shells Revision Changes Path 1.3 +2 -2 xml-fop/src/org/apache/fop/apps/Makefile Index: Makefile =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/apps/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Makefile 1999/11/25 19:21:09 1.2 +++ Makefile 1999/12/04 08:18:22 1.3 @@ -17,9 +17,9 @@ CLASSES=$(SOURCES:.java=.class) -all: $(CLASSES) allsubs +all: $(CLASSES) -clean: cleanme cleansubs +clean: cleanme cleanme: rm -f *.class 1.2 +2 -2 xml-fop/src/org/apache/fop/datatypes/Makefile Index: Makefile =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/datatypes/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Makefile 1999/11/08 19:13:14 1.1 +++ Makefile 1999/12/04 08:18:22 1.2 @@ -11,9 +11,9 @@ CLASSES=$(SOURCES:.java=.class) -all: $(CLASSES) allsubs +all: $(CLASSES) -clean: cleanme cleansubs +clean: cleanme cleanme: rm -f *.class 1.4 +2 -2 xml-fop/src/org/apache/fop/fo/flow/Makefile Index: Makefile =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Makefile 1999/12/03 08:12:58 1.3 +++ Makefile 1999/12/04 08:18:23 1.4 @@ -27,9 +27,9 @@ CLASSES=$(SOURCES:.java=.class) -all: $(CLASSES) allsubs +all: $(CLASSES) -clean: cleanme cleansubs +clean: cleanme cleanme: rm -f *.class 1.2 +2 -2 xml-fop/src/org/apache/fop/fo/pagination/Makefile Index: Makefile =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/pagination/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Makefile 1999/11/08 19:12:58 1.1 +++ Makefile 1999/12/04 08:18:23 1.2 @@ -22,9 +22,9 @@ CLASSES=$(SOURCES:.java=.class) -all: $(CLASSES) allsubs +all: $(CLASSES) -clean: cleanme cleansubs +clean: cleanme cleanme: rm -f *.class 1.2 +2 -2 xml-fop/src/org/apache/fop/image/Makefile Index: Makefile =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/image/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Makefile 1999/11/08 19:13:15 1.1 +++ Makefile 1999/12/04 08:18:23 1.2 @@ -14,9 +14,9 @@ CLASSES=$(SOURCES:.java=.class) -all: $(CLASSES) allsubs +all: $(CLASSES) -clean: cleanme cleansubs +clean: cleanme cleanme: rm -f *.class 1.3 +2 -2 xml-fop/src/org/apache/fop/layout/Makefile Index: Makefile =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Makefile 1999/12/02 09:37:50 1.2 +++ Makefile 1999/12/04 08:18:23 1.3 @@ -30,9 +30,9 @@ CLASSES=$(SOURCES:.java=.class) -all: $(CLASSES) allsubs +all: $(CLASSES) -clean: cleanme cleansubs +clean: cleanme cleanme: rm -f *.class 1.3 +2 -2 xml-fop/src/org/apache/fop/pdf/Makefile Index: Makefile =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/pdf/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Makefile 1999/11/22 17:37:15 1.2 +++ Makefile 1999/12/04 08:18:24 1.3 @@ -22,9 +22,9 @@ CLASSES=$(SOURCES:.java=.class) -all: $(CLASSES) allsubs +all: $(CLASSES) -clean: cleanme cleansubs +clean: cleanme cleanme: rm -f *.class 1.2 +2 -2 xml-fop/src/org/apache/fop/render/awt/Makefile Index: Makefile =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/awt/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Makefile 1999/11/25 19:21:10 1.1 +++ Makefile 1999/12/04 08:18:24 1.2 @@ -9,9 +9,9 @@ CLASSES=$(SOURCES:.java=.class) -all: $(CLASSES) allsubs +all: $(CLASSES) -clean: cleanme cleansubs +clean: cleanme cleanme: rm -f *.class 1.2 +2 -2 xml-fop/src/org/apache/fop/render/pdf/Makefile Index: Makefile =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/pdf/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Makefile 1999/11/08 19:13:11 1.1 +++ Makefile 1999/12/04 08:18:24 1.2 @@ -12,9 +12,9 @@ CLASSES=$(SOURCES:.java=.class) -all: $(CLASSES) allsubs +all: $(CLASSES) -clean: cleanme cleansubs +clean: cleanme cleanme: rm -f *.class 1.2 +1 -1 xml-fop/src/org/apache/fop/render/pdf/fonts/Makefile Index: Makefile =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/pdf/fonts/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Makefile 1999/11/08 19:13:11 1.1 +++ Makefile 1999/12/04 08:18:25 1.2 @@ -11,7 +11,7 @@ all: allsubs -clean: cleanme cleansubs +clean: cleanme cleanme: rm -f *.class 1.2 +2 -2 xml-fop/src/org/apache/fop/render/xml/Makefile Index: Makefile =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/render/xml/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Makefile 1999/11/08 19:13:12 1.1 +++ Makefile 1999/12/04 08:18:25 1.2 @@ -9,9 +9,9 @@ CLASSES=$(SOURCES:.java=.class) -all: $(CLASSES) allsubs +all: $(CLASSES) -clean: cleanme cleansubs +clean: cleanme cleanme: rm -f *.class 1.2 +2 -2 xml-fop/src/org/apache/fop/svg/Makefile Index: Makefile =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Makefile 1999/11/08 19:13:12 1.1 +++ Makefile 1999/12/04 08:18:25 1.2 @@ -19,9 +19,9 @@ CLASSES=$(SOURCES:.java=.class) -all: $(CLASSES) allsubs +all: $(CLASSES) -clean: cleanme cleansubs +clean: cleanme cleanme: rm -f *.class 1.2 +2 -2 xml-fop/src/org/apache/fop/viewer/Makefile Index: Makefile =================================================================== RCS file: /home/cvs/xml-fop/src/org/apache/fop/viewer/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Makefile 1999/11/25 19:21:11 1.1 +++ Makefile 1999/12/04 08:18:25 1.2 @@ -13,9 +13,9 @@ CLASSES=$(SOURCES:.java=.class) -all: $(CLASSES) allsubs +all: $(CLASSES) -clean: cleanme cleansubs +clean: cleanme cleanme: rm -f *.class From fotis@locus.apache.org Sat Dec 18 12:16:58 1999 Return-Path: Mailing-List: contact fop-cvs-help@xml.apache.org; run by ezmlm Delivered-To: mailing list fop-cvs@xml.apache.org Received: (qmail 31176 invoked from network); 18 Dec 1999 12:16:58 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 18 Dec 1999 12:16:58 -0000 Received: (qmail 6730 invoked by uid 2016); 18 Dec 1999 12:16:57 -0000 Delivered-To: apcore-xml-fop-cvs@apache.org Received: (qmail 6728 invoked from network); 18 Dec 1999 12:16:57 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 18 Dec 1999 12:16:57 -0000 Received: (qmail 31173 invoked by uid 1061); 18 Dec 1999 12:16:57 -0000 Date: 18 Dec 1999 12:16:57 -0000 Message-ID: <19991218121657.31172.qmail@locus.apache.org> From: fotis@locus.apache.org To: xml-fop-cvs@apache.org Subject: cvs commit: xml-fop/docs apidoc.jar fotis 99/12/18 04:16:56 Added: docs apidoc.jar Log: Api documentation Revision Changes Path 1.1 xml-fop/docs/apidoc.jar <> From fotis@locus.apache.org Mon Dec 20 22:35:45 1999 Return-Path: Mailing-List: contact fop-cvs-help@xml.apache.org; run by ezmlm Delivered-To: mailing list fop-cvs@xml.apache.org Received: (qmail 12875 invoked from network); 20 Dec 1999 22:35:45 -0000 Received: from taz.hyperreal.org (HELO hyperreal.org) (209.133.83.16) by 63.211.145.10 with SMTP; 20 Dec 1999 22:35:45 -0000 Received: (qmail 24508 invoked by uid 2016); 20 Dec 1999 22:35:44 -0000 Delivered-To: apcore-xml-fop-cvs@apache.org Received: (qmail 24484 invoked from network); 20 Dec 1999 22:35:39 -0000 Received: from unknown (HELO locus.apache.org) (63.211.145.10) by taz.hyperreal.org with SMTP; 20 Dec 1999 22:35:39 -0000 Received: (qmail 12866 invoked by uid 1061); 20 Dec 1999 22:35:38 -0000 Date: 20 Dec 1999 22:35:38 -0000 Message-ID: <19991220223538.12865.qmail@locus.apache.org> From: fotis@locus.apache.org To: xml-fop-cvs@apache.org Subject: cvs commit: xml-fop README fotis 99/12/20 14:35:38 Modified: . README Log: new sections on: Downloading, Limitations, Embedding, Involvement, License Revision Changes Path 1.6 +387 -167 xml-fop/README Index: README =================================================================== RCS file: /home/cvs/xml-fop/README,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- README 1999/11/30 04:16:07 1.5 +++ README 1999/12/20 22:35:38 1.6 @@ -1,169 +1,156 @@ +FOP readme + Content + 1. What is FOP? + 2. Downloading FOP + 3. Running FOP + 4. Features + 5. Limitations + 6. Compiling FOP + 7. Embedding FOP + 8. Getting involved + 9. FOP Relevant Specifications + 10. License + +1. What is FOP? + FOP is the world's first print formatter driven by XSL formatting + objects. It is a Java 1.1 application that reads a formatting object + tree and then turns it into a PDF document. The formatting object + tree, can be in the form of an XML document (output by an XSLT engine + like XT or Xalan) or can be passed in memory as a DOM Document or (in + the case of XT) SAX events. + + FOP is part of Apache's XML project. The homepage of FOP is + http:/xml.apache.org/fop (http:/xml.apache.org/fop). + + +2. Downloading FOP + + 2.1. Downloading binaries + You can download the latest release version FOP 0.12.0 + (http://xml.apache.org/dist/fop_bin_0_12_0.jar). + NOTE: you do not have to unjar or unzip this jar file. + To run FOP from the command line, see Running FOP. If you are + interested in embedding FOP in a Java application of your own, see + Embedding FOP. + + 2.2. Downloading source code + You can also download the source code v. 0.12.0 + (http://xml.apache.org/dist/fop_src_0_12_0.jar) as a jar file - FOP: An Open-Source XSL Formatter and Renderer - - +3. Running FOP - - -1) What is FOP? -2) Compiling FOP -3) Running FOP -4) What's Implemented? -5) Bugs -6) FOP Relevant Specifications - - - 1) What is FOP? - FOP is the world's first print formatter driven by XSL formatting - objects. It is a Java 1.1 application that reads a formatting object - tree and then turns it into a PDF document. The formatting object - tree, can be in the form of an XML document (output by an XSLT engine - like XT or Xalan) or can be passed in memory as a DOM Document or (in - the case of XT) SAX events. - - - FOP is part of Apache's XML project. The homepage of FOP is - http:/xml.apache.org/fop (http:/xml.apache.org/fop) -. - - - - - - - 2) Compiling FOP - - 1. Prerequisites - - a) Java 1.1.x or later - - - - b) An XML parser - An XML parser which supports DOM like - Xerces-J (http://xml.apache.org/xerces-j/index.html) -. - - - c) XT from James Clark - Some of the Java source code in FOP is generated from XML using - XSLT. XT must be used to generate this code. - XT is an XSL stylesheet processor written in java. At the moment you - can't use any other processor, because the make file makes use of some - proprietary features of Clark's xt which allow to write output in more - then one document. You can find XT at - James Clark's website (http://www.jclark.com/xml/xt.html) -. You have to use XT version 19991105 or later. - (Under windows you shouldn't use the prepackaged xt.exe but also the - generic jar file, otherwise make won't work) - - XT relies on an sax parser like XP (also J. Clark), which can be - downloaded at James - Clark's Website (http://www.jclark.com/xml/xp/index.html) - - - - - d) make - Under windows it has been reported that the use of the cygnus solutions port - of the GNU utilities works. You can find it at - Cygnus Solutions (http://sourceware.cygnus.com/cygwin/) - - - - - - - - - - 3) Running FOP - - 1) Prerequisites + 3.1. Prerequisites Following software must be installed: a) Java 1.1.x or later b) An XML parser which supports SAX and DOM like - Xerces-J (http://xml.apache.org/xerces-j/index.html) -. + Xerces-J (http://xml.apache.org/xerces-j/index.html). c) If you have to produce the flow objects files, which are the input for FOP, you need a transformation utility to create this files from your xml files. Normally this is an XSLT stylesheet processor like XT (http://www.jclark.com/xml/xt.html) - - or XALAN (http://xml.apache.org/xalan/index.html) -. - - - - 2) Starting FOP as an standalone application - There are three ways of running FOP from the command line. - a) Batch processing formatting object files: - java org.apache.fop.apps.CommandLine fo-file pdf-file + or XALAN (http://xml.apache.org/xalan/index.html). + + 3.2. Starting FOP as an standalone application + There are three ways to run FOP from the command line. + a) Batch processing formatting objects (fo) files: + java org.apache.fop.apps.CommandLine fo-file pdf-file b) Batch processing xml files (includes production of the fo-files): - java org.apache.fop.apps.CommandLine xml-file xsl-file pdf-file + java org.apache.fop.apps.CommandLine xml-file xsl-file pdf-file c) Previewing the fo-file: - java org.apache.fop.apps.AWTCommandLine fo-file + java org.apache.fop.apps.AWTCommandLine fo-file Each method uses next to the fop classes other packages. The following describes each method in detail. - - a) Method One + + 3.2.1. Method One One is to first use an XSLT engine to produce the formatting object tree as an - XML document and then running the class org.apache.fop.apps.CommandLine with the - formatting object file name and PDF filename as arguments. You will need to include - FOP, SAX and your SAX Parser in your classpath and so you might invoke + XML document and then running the class org.apache.fop.apps.CommandLine with the + formatting object file name and PDF filename as arguments. You need to set classpath + and set the used sax parser according to your enviroment - java -cp fop_x_xx_x.jar;sax.jar;xp.jar - org.apache.fop.apps.CommandLine formatting-tree-file pdf-file - If your SAX Parser is other than XP, you will need to set the property - org.xml.sax.parser to the SAX Parser class to use. The following example shows - the command line, if you use Xerces, the xml parser from xml.apache.org: + Classpath settings: You will need to include FOP and your XML Parser + in your classpath and so you might invoke FOP, if XP is your sax parser + and Xerces-J your DOM parser: - java -Dorg.xml.sax.parser=org.apache.xerces.parsers.SAXParser - -cp fop_x_xx_x.jar;xerces.jar - org.apache.fop.apps.AWTCommandLine formatting-tree-file pdf-file - + java -cp fop_bin_0_12_0.jar;xp.jar;xerces.jar + org.apache.fop.apps.CommandLine fo-file pdf-file + + For historical reasons the standard sax parser for FOP is XP from James Clark. + This will change in the future to Xerces-J, but at the moment you will need to + set the property org.xml.sax.parser to any other SAX Parser class to use. + The following example shows the command line, if you use Xerces-J: + + java -Dorg.xml.sax.parser=org.apache.xerces.parsers.SAXParser + -cp fop_bin_0_12_0.jar;xerces.jar + org.apache.fop.apps.CommandLine fo-file pdf-file - b) Method Two + 3.2.2. Method Two Rather than performing transformation with an XSLT before invoking FOP, it is - possible, if you use XT as your XSLT engine, to just call FOP and have it call - XT for you. To do this, run the class org.apache.fop.apps.CommandLine with the - source XML file name, XSL file name and PDF file name as arguments. You will - need to include FOP, SAX, your SAX Parser and XT in your classpath and so you might - invoke + possible, if you use XT as your XSLT engine, to just call FOP and have it call + XT for you. To do this, run the class org.apache.fop.apps.CommandLine with the + source XML file name, XSL file name and PDF file name as arguments. You will + need to include FOP, SAX, your SAX Parser and XT in your classpath and so you might + invoke - java -cp fop_x_xx_x.jar;sax.jar;xp.jar;xt.jar - org.apache.fop.apps.CommandLine xml-file xsl-file pdf-file + java -cp fop_bin_0_12_0.jar;xt.jar;xp.jar;xerces.jar + org.apache.fop.apps.CommandLine xml-file xsl-file pdf-file + Again, if your SAX Parser is other than XP, you will need to set the property - org.xml.sax.parser to the SAX Parser class to use. + org.xml.sax.parser to the SAX Parser class to use. - - c) Method Three + 3.2.3. Method Three If you already produced the FO file, you can preview the results of your - transformation without using any pdf viewer by invoking FOP with the viewer - application. You will need to include FOP, SAX and your SAX Parser in your classpath + transformation without using any pdf viewer by invoking FOP with the viewer + application. You will need to include FOP and your XML Parser in your classpath - java org.apache.fop.apps.AWTCommandLine formatting-tree-file + java -cp fop_bin_0_12_0.jar;xp.jar;xerces.jar + org.apache.fop.apps.AWTCommandLine fo-file + + The viewer uses the swing classes. + Note: If you are using java 2 or later (i.e. jdk 1.2. or later) you can put all - needed jar files into the subdirectory jdk1.2.x\jre\lib\ext (windows example). Then - FOP can be started without classpath: + needed jar files into the subdirectory jdk1.2.x\jre\lib\ext (windows example). Then + FOP can be started without classpath: - java org.apache.fop.apps.CommandLine fo-file pdf-file + java org.apache.fop.apps.CommandLine fo-file pdf-file - - - - - - - 4) What's Implemented? - Also see STATUS for what is being worked on. - a) Formatting Objects + 3.3. Running FOP on MacOS + Ensure that you have a recent MRJ, and that you have downloaded and + unpacked the XP and SAX distributions. The xp.jar and sax.jar files work + as is on MacOS. - root + Drag the FOP jarfile onto the JBindery icon. When the first dialog + appears, type "org.apache.fop.apps.CommandLine" in the "Class name" field. + Using UNIX syntax, type the names of the input formatting-object file and + the output PDF in the "Optional parameters" field. + + Click on the Classpath icon. To add the xp.jar and sax.jar files, click + the "Add .zip file" button, navigate to the file in question, and click + Open. + + Once both are added (the FOP jarfile will already be in the list), click + Run. A "stdout" window will appear and display FOP runtime messages. + + + 3.4. Problems + If you have problems running FOP, please have a look at the + FOP FAQ (faq-running.html). If you don't find a solution there, + you can ask for help on the list fop-dev@xml.apache.org. Maybe it is a bug and + maybe somebody is already working on it. + + +4. Features + + 4.1. What's Implemented? + The following formatting objects and properties of the xsl-fo + working draft are implemented. Please have also a look at the + section on limitations (limitations.html) + + 1) Formatting Objects + root layout-master-set simple-page-master region-body @@ -191,12 +178,8 @@ table-body (minimal support) table-row (minimal support) table-cell (minimal support) - - - - b) Properties - + 2) Properties end-indent page-master-name page-master-first @@ -238,45 +221,282 @@ padding-left (only in conjunction with background color) padding-bottom (only in conjunction with background color) padding-right (only in conjunction with background color) - - - - - - - 5) Bugs - see STATUS file - - +5. Limitations + Although FOP implements the above listed fo objects and properties, sometimes it does so + only in a limited way. + + 5.1. list-block + The fo working draft allows describes two ways to markup lists.The list-block must + have as children either: 1) pairs of fo:list-item-label and fo:list-item-body + formatting objects, or 2) fo:list-item formatting objects. + At the moment FOP only implements the second way. Therefore a list has a basic + structure like this: + + + + + + + + 5.2. Padding + Padding works in conjunction with indents and spaces. It is only implemented + for blocks. At the moment padding can't be used to make extra space (indents+spaces + must be used), but only to control how much the background-color extends beyond + the content rectangle. + + 5.3. Tables + There two limitations for tables: 1) FOP needs you to explicitly specify column widths + 2) Cells have to contain block-level FOs. They can't contain straight character data. + + A working basic example of a table looks like this: + + + + + + + text + + + text + + + + + text + + + text + + + + + text + + + text + + + + + +6. Compiling FOP + + 6.1. Prerequisites + 6.1.1. Java 1.1.x or later + If you use Java 1.1.x you must also seperately include the swing classes, which can + be found at the Sun website (http://java.sun.com/products/jfc/#download-swing). From + Java 1.2 on (aka Java 2) they are part of the standard distribution. + + 6.1.2. An XML parser + An XML parser which supports DOM like Xerces-J + (http://xml.apache.org/xerces-j/index.html). + + 6.1.3. XT from James Clark + Some of the Java source code in FOP is generated from XML using + XSLT. XT must be used to generate this code. + XT is an XSL stylesheet processor written in java. At the moment you + can't use any other processor, because the make file makes use of some + proprietary features of Clark's xt which allow to write output in more + then one document. You can find XT at James Clark's website + (http://www.jclark.com/xml/xt.html). You have to use XT version 19991105 + or later. (Under windows you shouldn't use the prepackaged xt.exe but also the + generic jar file, otherwise make won't work) + + XT relies on an sax parser like XP (also J. Clark), which can be + downloaded at James Clark's Website (http://www.jclark.com/xml/xp/index.html) + + 6.1.4. make + Under windows it has been reported that the use of the cygnus solutions port + of the GNU utilities works. You can find it at + Cygnus Solutions (http://sourceware.cygnus.com/cygwin/) + + 6.2. Compiling FOP on MacOS + We strongly recommend the use of Codewarrior Java. You will find + a link to