* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
- *
+ *
* Copyright (C) 1999-2003 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
* (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 <jtauber@jtauber.com>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
- */
+ */
package org.apache.fop.apps;
// Imported java.io classes
/**
* XSLTInputHandler basically takes an XML file and transforms it with an XSLT
* file and the resulting XSL-FO document is input for FOP.
- * @todo add URL constructor
+ * (todo) add URL constructor
*/
public class XSLTInputHandler extends InputHandler {
return new InputSource(reader);
} catch (Exception ex) {
ex.printStackTrace();
- /**@todo do proper logging of exceptions */
+ /**(todo) do proper logging of exceptions */
return null;
}
} else {
* We have not found a definition of "word" in the standard (1.0), so the
* logic used here is based on the programmer's best guess.
*
- * @parameter char inputChar: the character to be tested.
+ * @param char inputChar: the character to be tested.
* @return int IS_WORD_CHAR_TRUE, IS_WORD_CHAR_FALSE, or IS_WORD_CHAR_MAYBE,
* depending on whether the character should be considered part of a word
* or not.
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
- *
+ *
* Copyright (C) 1999-2003 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
* (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 <jtauber@jtauber.com>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
- */
+ */
package org.apache.fop.fo;
// Java
* with other resolveable areas
*/
public class FOUserAgent implements LogEnabled {
-
+
private Logger log;
private Map defaults = new java.util.HashMap();
private Map handlers = new java.util.HashMap();
/**
* Returns the logger to use.
* @see org.apache.avalon.framework.logger.AbstractLogEnabled#getLogger()
- * @todo This breaks IoC/SoC. Should be improved.
+ * (todo) This breaks IoC/SoC. Should be improved.
*/
public Logger getLogger() {
return this.log;
/**
* Sets the parameters for PDF encryption.
- * @param pdfEncryptionParams the PDF encryption parameters, null to
+ * @param pdfEncryptionParams the PDF encryption parameters, null to
* disable PDF encryption
*/
public void setPDFEncryptionParams(PDFEncryptionParams pdfEncryptionParams) {
this.pdfEncryptionParams = pdfEncryptionParams;
}
-
-
+
+
/**
* Get an input stream for a reference.
* Temporary solution until API better.
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
- *
+ *
* Copyright (C) 1999-2003 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
* (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 <jtauber@jtauber.com>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
- */
+ */
package org.apache.fop.fo.expr;
import java.util.Vector;
* is set.
* @param dim The dimension of the value. 0 for a Number, 1 for a Length
* (any type), >1, <0 if Lengths have been multiplied or divided.
- * @pcBase The PercentBase object used to calculate an actual value for
+ * @param pcBase The PercentBase object used to calculate an actual value for
* a PC_LENGTH.
*/
protected Numeric(int valType, double absValue, double pcValue,
public boolean isMultiByte() {
return true;
}
-
+
/**
* Returns a PDFWArray containing all the widths of the subset to be used.
* @return the character widths
- * @todo Try to avoid dependency on PDF library
+ * (todo) Try to avoid dependency on PDF library
*/
public abstract PDFWArray getSubsetWidths();
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
- *
+ *
* Copyright (C) 1999-2003 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
* (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 <jtauber@jtauber.com>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
- */
+ */
package org.apache.fop.fonts;
import java.util.Map;
/**
* Abstract base class for custom fonts loaded from files, for example.
*/
-public abstract class CustomFont extends Font
+public abstract class CustomFont extends Font
implements FontDescriptor, MutableFont {
private String fontName = null;
private FontType fontType = FontType.TYPE1;
private int firstChar = 0;
private int lastChar = 255;
-
+
private Map kerning = new java.util.HashMap();
-
+
private boolean useKerning = true;
}
/**
- * Returns the lookup name to an embeddable font file available as a
+ * Returns the lookup name to an embeddable font file available as a
* resource.
- * @todo Remove this method, this should be done using a resource: URI.
+ * (todo) Remove this method, this should be done using a resource: URI.
* @return the lookup name
*/
public String getEmbedResourceName() {
/**
* Returns the width to be used when no width is available.
- * @return a character width
+ * @return a character width
*/
public int getMissingWidth() {
return missingWidth;
public FontType getFontType() {
return fontType;
}
-
+
/**
* Returns the index of the first character defined in this font.
* @return the index of the first character
public int getFirstChar() {
return 0;
// return firstChar;
- /**@todo Why is this hardcoded??? This code was in SingleByteFont.java */
+ /**(todo) Why is this hardcoded??? This code was in SingleByteFont.java */
}
/**
/* ---- MutableFont interface ---- */
-
+
/**
* @see org.apache.fop.fonts.MutableFont#setFontName(String)
*/
public void setFontName(String name) {
this.fontName = name;
}
-
+
/**
* @see org.apache.fop.fonts.MutableFont#setEmbedFileName(String)
*/
public void setEmbedFileName(String path) {
this.embedFileName = path;
}
-
+
/**
* @see org.apache.fop.fonts.MutableFont#setEmbedResourceName(String)
*/
public void setEmbedResourceName(String name) {
this.embedResourceName = name;
}
-
+
/**
* @see org.apache.fop.fonts.MutableFont#setCapHeight(int)
*/
public void setCapHeight(int capHeight) {
this.capHeight = capHeight;
}
-
+
/**
* Returns the XHeight value of the font.
* @param xHeight the XHeight value
public void setXHeight(int xHeight) {
this.xHeight = xHeight;
}
-
+
/**
* @see org.apache.fop.fonts.MutableFont#setAscender(int)
*/
public void setAscender(int ascender) {
this.ascender = ascender;
}
-
+
/**
* @see org.apache.fop.fonts.MutableFont#setDescender(int)
*/
public void setDescender(int descender) {
this.descender = descender;
}
-
+
/**
* @see org.apache.fop.fonts.MutableFont#setFontBBox(int[])
*/
public void setFontBBox(int[] bbox) {
this.fontBBox = bbox;
}
-
+
/**
* @see org.apache.fop.fonts.MutableFont#setFlags(int)
*/
public void setFlags(int flags) {
this.flags = flags;
}
-
+
/**
* @see org.apache.fop.fonts.MutableFont#setStemV(int)
*/
public void setStemV(int stemV) {
this.stemV = stemV;
}
-
+
/**
* @see org.apache.fop.fonts.MutableFont#setItalicAngle(int)
*/
public void setItalicAngle(int italicAngle) {
this.italicAngle = italicAngle;
}
-
+
/**
* @see org.apache.fop.fonts.MutableFont#setMissingWidth(int)
*/
public void setMissingWidth(int width) {
this.missingWidth = width;
}
-
+
/**
* @see org.apache.fop.fonts.MutableFont#setFontType(FontType)
*/
public void setFirstChar(int index) {
this.firstChar = index;
}
-
+
/**
* @see org.apache.fop.fonts.MutableFont#setLastChar(int)
*/
public void setLastChar(int index) {
this.lastChar = index;
}
-
+
/**
* @see org.apache.fop.fonts.MutableFont#setKerningEnabled(boolean)
*/
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
- *
+ *
* Copyright (C) 1999-2003 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
* (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 <jtauber@jtauber.com>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
- */
+ */
package org.apache.fop.image;
import java.io.InputStream;
* @return the color space
*/
ColorSpace getColorSpace();
-
+
/**
* Returns the ICC profile.
* @return the ICC profile, null if none is available
* @return True if it is transparent
*/
boolean isTransparent();
-
+
/**
* For transparent images. Returns the transparent color.
* @return the transparent color
- * @todo Remove the PDF dependency
+ * (todo) Remove the PDF dependency
*/
PDFColor getTransparentColor();
-
+
/**
- * Indicates whether the image has a Soft Mask (See section 7.5.4 in the
+ * Indicates whether the image has a Soft Mask (See section 7.5.4 in the
* PDF specs)
* @return True if a Soft Mask exists
*/
boolean hasSoftMask();
-
+
/**
* For images with a Soft Mask. Returns the Soft Mask as an array.
* @return the Soft Mask
byte[] getSoftMask();
/**
- * Returns the decoded and uncompressed image as a array of
+ * Returns the decoded and uncompressed image as a array of
* width * height * [colorspace-multiplicator] pixels.
* @return the bitmap
*/
* @return the raw image
*/
byte[] getRessourceBytes();
-
+
/**
* Returns the number of bytes of the raw image.
* @return the size in bytes
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
- *
+ *
* Copyright (C) 1999-2003 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
* (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 <jtauber@jtauber.com>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
- */
+ */
package org.apache.fop.image.analyser;
// Java
/**
* Creates an ImageInfo object from an XML image read from a stream.
*
- * @todo This means the external svg document will be loaded twice. Possibly need
+ * (todo) This means the external svg document will be loaded twice. Possibly need
* a slightly different design for the image stuff.
*
* @param uri The URI to the image
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
- *
+ *
* Copyright (C) 1999-2003 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
* (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 <jtauber@jtauber.com>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
- */
+ */
package org.apache.fop.layout;
import org.apache.fop.apps.FOPException;
/**
* This class defines area classes.
- * @todo Would better be replaced by an Enum (Avalon or Commons)
+ * (todo) Would better be replaced by an Enum (Avalon or Commons)
*/
public class AreaClass {
public static final String UNASSIGNED = "unassigned";
// checker method
public static String setAreaClass(String areaClass) throws FOPException {
- if (areaClass.equals(XSL_NORMAL)
+ if (areaClass.equals(XSL_NORMAL)
|| areaClass.equals(XSL_ABSOLUTE)
|| areaClass.equals(XSL_FOOTNOTE)
|| areaClass.equals(XSL_SIDE_FLOAT)
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
- *
+ *
* Copyright (C) 1999-2003 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
* (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 <jtauber@jtauber.com>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
- */
+ */
package org.apache.fop.layout.hyphenation;
/**
* @author Carlos Villegas <cav@uniscope.co.jp>
- * @todo Derive from FOPException
+ * (todo) Derive from FOPException
*/
public class HyphenationException extends Exception {
protected char[] eq;
/**
- * <P>The character stored in this node: splitchar
+ * <P>The character stored in this node: splitchar.
* Two special values are reserved:</P>
* <ul><li>0x0000 as string terminator</li>
* <li>0xFFFF to indicate that the branch starting at
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
- *
+ *
* Copyright (C) 1999-2003 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
* (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 <jtauber@jtauber.com>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
- */
+ */
package org.apache.fop.layoutmgr;
import org.apache.fop.fo.flow.Marker;
* area passed in.
*
* @param childArea the child area to get the parent for
- * @return the parent Area
+ * @return the parent Area
*/
Area getParentArea(Area childArea);
/**
* Add an id to the page.
- * @todo add the location of the area on the page
+ * (todo) add the location of the area on the page
*
* @param id the id reference to add.
*/
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
- *
+ *
* Copyright (C) 1999-2003 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
* (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 <jtauber@jtauber.com>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
- */
+ */
package org.apache.fop.pdf;
import java.io.IOException;
* add an ICC profile to the document).
*
* @param doc the PDF parent document
- * @todo Remove this and deletgate to the XObject
+ * (todo) Remove this and delegate to the XObject
*/
void setup(PDFDocument doc);
}
/**
- * @param ext <todo> Description of the Parameter
+ * @param ext (todo) Description of the Parameter
* @see org.apache.fop.render.Renderer
*/
public void renderExtension(TreeExt ext) { }
}
/**
- * <todo> Description of the Method
+ * (todo) Description of the Method
*
* @param ctm The coordinate transformation matrix to use
*/
}
/**
- * <todo> Description of the Method
+ * (todo) Description of the Method
*/
protected void endVParea() { }
*
* @param image The image
* @param pos The target position of the image
- * <todo> Make renderImage() protected
+ * (todo) Make renderImage() protected
*/
public void renderImage(Image image, Rectangle2D pos) {
// Default: do nothing.
*
* @param fo The foreign object area
* @param pos The target position of the foreign object
- * <todo> Make renderForeignObject() protected
+ * (todo) Make renderForeignObject() protected
*/
public void renderForeignObject(ForeignObject fo, Rectangle2D pos) {
// Default: do nothing.
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
- *
+ *
* Copyright (C) 1999-2003 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
* (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 <jtauber@jtauber.com>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
- */
+ */
package org.apache.fop.render.ps;
//Java
* @see org.apache.fop.svg.PSGraphics2D
*/
public class PSDocumentGraphics2D extends PSGraphics2D {
-
+
private int width;
private int height;
//Setup for PostScript generation
setPSGenerator(new PSGenerator(stream));
-
+
//PostScript Header
gen.writeln(DSCConstants.PS_ADOBE_30);
- gen.writeDSCComment(DSCConstants.CREATOR,
+ gen.writeDSCComment(DSCConstants.CREATOR,
new String[] {"FOP PostScript Transcoder for SVG"});
- gen.writeDSCComment(DSCConstants.CREATION_DATE,
+ gen.writeDSCComment(DSCConstants.CREATION_DATE,
new Object[] {new java.util.Date()});
gen.writeDSCComment(DSCConstants.PAGES, new Object[] {new Integer(1)});
gen.writeDSCComment(DSCConstants.BBOX, new Object[]
{zero, zero, pagewidth, pageheight});
gen.writeDSCComment(DSCConstants.END_COMMENTS);
-
+
//Defaults
gen.writeDSCComment(DSCConstants.BEGIN_DEFAULTS);
gen.writeDSCComment(DSCConstants.END_DEFAULTS);
-
+
//Prolog
gen.writeDSCComment(DSCConstants.BEGIN_PROLOG);
gen.writeDSCComment(DSCConstants.END_PROLOG);
-
+
//Setup
gen.writeDSCComment(DSCConstants.BEGIN_SETUP);
PSProcSets.writeFOPStdProcSet(gen);
//Start page
Integer pageNumber = new Integer(1);
- gen.writeDSCComment(DSCConstants.PAGE, new Object[]
+ gen.writeDSCComment(DSCConstants.PAGE, new Object[]
{pageNumber.toString(), pageNumber});
gen.writeDSCComment(DSCConstants.PAGE_BBOX, new Object[]
{zero, zero, pagewidth, pageheight});
- gen.writeDSCComment(DSCConstants.BEGIN_PAGE_SETUP);
+ gen.writeDSCComment(DSCConstants.BEGIN_PAGE_SETUP);
gen.writeln("FOPFonts begin");
gen.writeln("0.001 0.001 scale");
gen.concatMatrix(1, 0, 0, -1, 0, pageheight.doubleValue() * 1000);
- gen.writeDSCComment(DSCConstants.END_PAGE_SETUP);
+ gen.writeDSCComment(DSCConstants.END_PAGE_SETUP);
}
* @param col the background colour to fill
*/
public void setBackgroundColor(Color col) {
- /**@todo Implement this */
+ /**(todo) Implement this */
/*
Color c = col;
PDFColor currentColour = new PDFColor(c.getRed(), c.getGreen(), c.getBlue());
*/
public void finish() throws IOException {
//Finish page
- gen.writeln("showpage");
+ gen.writeln("showpage");
gen.writeDSCComment(DSCConstants.PAGE_TRAILER);
gen.writeDSCComment(DSCConstants.END_PAGE);
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
- *
+ *
* Copyright (C) 1999-2003 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
* (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 <jtauber@jtauber.com>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
- */
+ */
package org.apache.fop.render.ps;
import java.awt.Graphics2D;
* drawString. If the text is complex or the cannot be translated
* into a simple drawString the StrokingTextPainter is used instead.
*
- * @todo handle underline, overline and strikethrough
- * @todo use drawString(AttributedCharacterIterator iterator...) for some
+ * (todo) handle underline, overline and strikethrough
+ * (todo) use drawString(AttributedCharacterIterator iterator...) for some
*
* @author <a href="mailto:keiron@aftexsw.com">Keiron Liddle</a>
* @version $Id: PSTextPainter.java,v 1.15 2003/01/08 14:03:55 jeremias Exp $
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
- *
+ *
* Copyright (C) 1999-2003 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
* (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 <jtauber@jtauber.com>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
- */
+ */
package org.apache.fop.servlet;
import java.io.File;
* Example URL: http://servername/fop/servlet/FopPrintServlet?fo=readme.fo
* <br/>
* Example URL: http://servername/fop/servlet/FopPrintServlet?xml=data.xml&xsl=format.xsl
- *
+ *
* @author <a href="mailto:fop-dev@xml.apache.org">Apache XML FOP Development Team</a>
* @version $Id: FopPrintServlet.java,v 1.2 2003/03/07 09:48:05 jeremias Exp $
- * @todo Doesn't work since there's no AWTRenderer at the moment. Revisit when
+ * (todo) Doesn't work since there's no AWTRenderer at the moment. Revisit when
* available.
- * @todo Don't use XSLTInputHandler anymore
- * @todo Ev. add caching mechanism for Templates objects
+ * (todo) Don't use XSLTInputHandler anymore
+ * (todo) Ev. add caching mechanism for Templates objects
*/
public class FopPrintServlet extends HttpServlet {
protected static final String XML_REQUEST_PARAM = "xml";
/** Name of the parameter used for the XSLT file */
protected static final String XSLT_REQUEST_PARAM = "xslt";
-
+
/** Logger to give to FOP */
protected Logger log = null;
/** The TransformerFactory to use to create Transformer instances */
// private helper, tell (browser) user that file printed
private void reportOK(HttpServletResponse response)
throws ServletException {
- String sMsg = "<html><title>Success</title>\n"
- + "<body><h1>FopPrintServlet: </h1>"
+ String sMsg = "<html><title>Success</title>\n"
+ + "<body><h1>FopPrintServlet: </h1>"
+ "<h3>The requested data was printed</h3></body></html>";
response.setContentType("text/html");
//removePage(
// Integer.parseInt((String) numbers.elementAt(i)));
}
-
+
try {
printerJob.print();
} catch (PrinterException e) {
e.printStackTrace();
- throw new IOException("Unable to print: "
+ throw new IOException("Unable to print: "
+ e.getClass().getName() + ": " + e.getMessage());
}
}
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
- *
+ *
* Copyright (C) 1999-2003 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
* (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 <jtauber@jtauber.com>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
- */
+ */
package org.apache.fop.servlet;
import java.io.ByteArrayOutputStream;
* <br/>
* Example URL: http://servername/fop/servlet/FopServlet?xml=data.xml&xslt=format.xsl
* <br/>
- * For this to work with Internet Explorer, you might need to append "&ext=.pdf"
+ * For this to work with Internet Explorer, you might need to append "&ext=.pdf"
* to the URL.
- *
+ *
* @author <a href="mailto:fop-dev@xml.apache.org">Apache XML FOP Development Team</a>
* @version $Id: FopServlet.java,v 1.2 2003/03/07 09:48:05 jeremias Exp $
- * @todo Ev. add caching mechanism for Templates objects
+ * (todo) Ev. add caching mechanism for Templates objects
*/
public class FopServlet extends HttpServlet {
-
+
/** Name of the parameter used for the XSL-FO file */
protected static final String FO_REQUEST_PARAM = "fo";
/** Name of the parameter used for the XML file */
protected static final String XML_REQUEST_PARAM = "xml";
/** Name of the parameter used for the XSLT file */
protected static final String XSLT_REQUEST_PARAM = "xslt";
-
+
/** Logger to give to FOP */
protected Logger log = null;
/** The TransformerFactory to use to create Transformer instances */
String foParam = request.getParameter(FO_REQUEST_PARAM);
String xmlParam = request.getParameter(XML_REQUEST_PARAM);
String xsltParam = request.getParameter(XSLT_REQUEST_PARAM);
-
+
//Analyze parameters and decide with method to use
byte[] content = null;
if (foParam != null) {
}
/**
- * Renders an XSL-FO file into a PDF file. The PDF is written to a byte
+ * Renders an XSL-FO file into a PDF file. The PDF is written to a byte
* array that is returned as the method's result.
* @param fo the XSL-FO file
* @return byte[] the rendered PDF file
- * @throws FOPException If an error occurs during the rendering of the
+ * @throws FOPException If an error occurs during the rendering of the
* XSL-FO
* @throws TransformerException If an error occurs while parsing the input
* file
*/
protected byte[] renderFO(String fo)
throws FOPException, TransformerException {
-
+
//Setup source
Source foSrc = convertString2Source(fo);
//Setup the identity transformation
Transformer transformer = this.transFactory.newTransformer();
-
+
//Start transformation and rendering process
return render(foSrc, transformer);
}
* @param xml the XML file
* @param xslt the XSLT file
* @return byte[] the rendered PDF file
- * @throws FOPException If an error occurs during the rendering of the
+ * @throws FOPException If an error occurs during the rendering of the
* XSL-FO
* @throws TransformerException If an error occurs during XSL
* transformation
*/
- protected byte[] renderXML(String xml, String xslt)
+ protected byte[] renderXML(String xml, String xslt)
throws FOPException, TransformerException {
//Setup sources
/**
* Renders an input file (XML or XSL-FO) into a PDF file. It uses the JAXP
* transformer given to optionally transform the input document to XSL-FO.
- * The transformer may be an identity transformer in which case the input
+ * The transformer may be an identity transformer in which case the input
* must already be XSL-FO. The PDF is written to a byte array that is
* returned as the method's result.
* @param src Input XML or XSL-FO
* @param transformer Transformer to use for optional transformation
* @return byte[] the rendered PDF file
- * @throws FOPException If an error occurs during the rendering of the
+ * @throws FOPException If an error occurs during the rendering of the
* XSL-FO
* @throws TransformerException If an error occurs during XSL
* transformation
*/
- protected byte[] render(Source src, Transformer transformer)
+ protected byte[] render(Source src, Transformer transformer)
throws FOPException, TransformerException {
//Setup FOP
//Setup output
ByteArrayOutputStream out = new ByteArrayOutputStream();
driver.setOutputStream(out);
-
+
//Make sure the XSL transformation's result is piped through to FOP
Result res = new SAXResult(driver.getContentHandler());
-
+
//Start the transformation and rendering process
transformer.transform(src, res);
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
- *
+ *
* Copyright (C) 1999-2003 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
* (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 <jtauber@jtauber.com>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
- */
+ */
package org.apache.fop.svg;
import java.awt.Graphics2D;
* drawString. If the text is complex or the cannot be translated
* into a simple drawString the StrokingTextPainter is used instead.
*
- * @todo handle underline, overline and strikethrough
- * @todo use drawString(AttributedCharacterIterator iterator...) for some
+ * (todo) handle underline, overline and strikethrough
+ * (todo) use drawString(AttributedCharacterIterator iterator...) for some
*
* @author <a href="mailto:keiron@aftexsw.com">Keiron Liddle</a>
* @version $Id: PDFTextPainter.java,v 1.16 2003/03/07 09:51:25 jeremias Exp $