* ============================================================================
* 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.datatypes;
import org.apache.fop.fo.Property;
}
/**
- * What to do here?? There isn't really a meaningful single value.
+ * Not sure what to do here. There isn't really a meaningful single value.
*/
public String toString() {
return "Keep";
* ============================================================================
* 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.truetype;
import java.io.IOException;
private int ansiWidth[];
private Map ansiIndex;
-
+
private TTFDirTabEntry currentDirTab;
/**
/**
* Read the "hhea" table to find the ascender and descender and
- * size of "hmtx" table, i.e. a fixed size font might have only
- * one width
+ * size of "hmtx" table, as a fixed size font might have only
+ * one width.
* @param in FontFileReader to read the hhea table from
* @throws IOException in case of an I/O problem
*/
case 0x00020000:
getLogger().debug("PostScript format 2");
int numGlyphStrings = 0;
-
+
// Read Number of Glyphs
- int l = in.readTTFUShort();
-
+ int l = in.readTTFUShort();
+
// Read indexes
- for (int i = 0; i < l; i++) {
+ for (int i = 0; i < l; i++) {
mtxTab[i].setIndex(in.readTTFUShort());
if (mtxTab[i].getIndex() > 257) {
getLogger().debug("PostScript index: " + mtxTab[i].getIndexAsString());
}
}
-
+
// firstChar=minIndex;
String[] psGlyphsBuffer = new String[numGlyphStrings];
if (getLogger().isDebugEnabled()) {
* ============================================================================
* 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;
// Java
/**
* This is an implementation for XML-based images such as SVG.
- *
+ *
* @see AbstractFopImage
* @see FopImage
*/
public class XMLImage extends AbstractFopImage {
-
+
private Document doc;
private String namespace = "";
/**
- * @see org.apache.fop.image.AbstractFopImage#AbstractFopImage(ImageInfo)
+ * @see org.apache.fop.image.AbstractFopImage#AbstractFopImage(FopImage.ImageInfo)
*/
public XMLImage(FopImage.ImageInfo imgInfo) {
super(imgInfo);
* ============================================================================
* 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;
import java.util.Enumeration;
import java.io.Serializable;
/**
- * <h2>Ternary Search Tree</h2>
+ * <h2>Ternary Search Tree.</h2>
*
* <p>A ternary search tree is a hibrid between a binary tree and
* a digital search tree (trie). Keys are limited to strings.
* ============================================================================
* 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;
// Java
*
*/
public class PDFDocument implements LogEnabled {
-
+
private static final Integer LOCATION_PLACEHOLDER = new Integer(0);
/**
* the version of PDF supported which is 1.4
private PDFFactory factory;
-
+
private boolean encodingOnTheFly = true;
/**
- * creates an empty PDF document <p>
+ * Creates an empty PDF document.
*
* The constructor creates a /Root and /Pages object to
* track the document but does not write these objects until
/**
* Helper method to allow sub-classes to aquire logger.
- *
+ *
* <p>There is no performance penalty as this is a final method
* and will be inlined by the JVM.</p>
* @return the Logger
return text.getBytes(ENCODING);
} catch (UnsupportedEncodingException uee) {
return text.getBytes();
- }
+ }
}
/**
}
/**
- * Registers a PDFObject in this PDF document. The PDF is assigned a new
+ * Registers a PDFObject in this PDF document. The PDF is assigned a new
* object number.
* @param obj PDFObject to add
* @return PDFObject the PDFObject added (its object number set)
}
/**
- * Assigns the PDFObject a object number and sets the parent of the
+ * Assigns the PDFObject a object number and sets the parent of the
* PDFObject to this PDFDocument.
* @param obj PDFObject to assign a number to
*/
throw new IllegalStateException("Error registering a PDFObject: "
+ "PDFObject already has a parent PDFDocument");
}
-
+
obj.setObjectNumber(++this.objectcount);
if (currentParent == null) {
//Add object to list
this.objects.add(obj);
-
+
//System.out.println("Registering: "+obj);
-
+
//Add object to special lists where necessary
if (obj instanceof PDFFunction) {
this.functions.add(obj);
}
if (obj instanceof PDFLink) {
this.links.add(obj);
- }
+ }
if (obj instanceof PDFFileSpec) {
this.filespecs.add(obj);
}
*/
public void addTrailerObject(PDFObject obj) {
this.trailerObjects.add(obj);
-
+
if (obj instanceof PDFGoTo) {
this.gotos.add(obj);
- }
+ }
}
/**
+ "generated without encryption.");
}
}
-
-
+
+
/**
* Indicates whether encryption is active for this PDF or not.
* @return boolean True if encryption is active
public boolean isEncryptionActive() {
return this.encryption != null;
}
-
+
/**
* Returns the active Encryption object.
* @return the Encryption object
protected PDFGoTo findGoTo(PDFGoTo compare) {
return (PDFGoTo)findPDFObject(gotos, compare);
}
-
+
/**
* Looks for an existing GState to use
* @param wanted requested features
* @throws java.io.FileNotFoundException if the URI could not be resolved
* @return the InputStream from the URI.
*/
- protected InputStream resolveURI(String uri)
+ protected InputStream resolveURI(String uri)
throws java.io.FileNotFoundException {
try {
/**@todo Temporary hack to compile, improve later */
return xObject;
}
- /**
+ /**
* Add a form XObject to the PDF document.
* This adds a Form XObject to the PDF objects.
* If a Form XObject with the same key already exists it will return the
* old PDFFormXObject.
- *
+ *
* @param res the PDF resource context to add to, may be null
* @param cont the PDF Stream contents of the Form XObject
* @param formres the PDF Resources for the Form XObject data
}
/**
- * write the PDF header <P>
+ * Write the PDF header.
*
* This method must be called prior to formatting
* and outputting AreaTrees.
/* construct the trailer */
String pdf = "trailer\n" + "<<\n"
+ "/Size " + (this.objectcount + 1) + "\n"
- + "/Root " + this.root.referencePDF() + "\n"
- + "/Info " + this.info.referencePDF() + "\n"
+ + "/Root " + this.root.referencePDF() + "\n"
+ + "/Info " + this.info.referencePDF() + "\n"
+ encryptEntry
+ ">>\n" + "startxref\n" + this.xref
+ "\n" + "%%EOF\n";
<HTML>
<TITLE>org.apache.fop.pdf Package</TITLE>
<BODY>
-<P>Classes for handling the low-level creation of PDF documents</P>
+<P>Classes for handling the low-level creation of PDF documents.</P>
<P>These classes were developed for FOP, but could be used by other
applications wishing to produce PDF.</P>
</BODY>
* ============================================================================
* 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;
// Java
}
/**
- * @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.
<HTML>
<TITLE>org.apache.fop.render Package</TITLE>
<BODY>
-<P>generic renderer interface</P>
+<P>Generic renderer interface.</P>
</BODY>
</HTML>
\ No newline at end of file
<HTML>
<TITLE>org.apache.fop.render.pdf Package</TITLE>
<BODY>
-<P>classes for rendering to PDF</P>
+<P>Classes for rendering to PDF.</P>
</BODY>
</HTML>
\ No newline at end of file
<HTML>
<TITLE>org.apache.fop.render.xml Package</TITLE>
<BODY>
-<P>classes for rendering to XML for debugging</P>
+<P>Classes for rendering to XML for debugging.</P>
</BODY>
</HTML>
\ No newline at end of file