aboutsummaryrefslogtreecommitdiffstats
path: root/src/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java')
-rw-r--r--src/java/org/apache/fop/render/awt/AWTRenderer.java9
-rw-r--r--src/java/org/apache/fop/render/pcl/PCLRenderer.java8
-rw-r--r--src/java/org/apache/fop/render/svg/SVGRenderer.java6
-rw-r--r--src/java/org/apache/fop/render/txt/TXTRenderer.java8
-rw-r--r--src/java/org/apache/fop/render/xml/XMLRenderer.java5
5 files changed, 36 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/render/awt/AWTRenderer.java b/src/java/org/apache/fop/render/awt/AWTRenderer.java
index 57b94ea0a..975f631f4 100644
--- a/src/java/org/apache/fop/render/awt/AWTRenderer.java
+++ b/src/java/org/apache/fop/render/awt/AWTRenderer.java
@@ -69,6 +69,9 @@ import org.apache.fop.render.awt.viewer.Translator;
*/
public class AWTRenderer extends AbstractRenderer implements Printable, Pageable {
+ /** The MIME type for PostScript */
+ public static final String MIME_TYPE = "application/awt";
+
protected double scaleFactor = 100.0;
protected int pageNumber = 0;
private int pageWidth = 0;
@@ -458,4 +461,10 @@ public class AWTRenderer extends AbstractRenderer implements Printable, Pageable
// TODO: render text decorations
currentBlockIPPosition += text.getWidth();
}
+
+ /** @see org.apache.fop.render.AbstractRenderer */
+ public String getMimeType() {
+ return MIME_TYPE;
+ }
+
}
diff --git a/src/java/org/apache/fop/render/pcl/PCLRenderer.java b/src/java/org/apache/fop/render/pcl/PCLRenderer.java
index 3be4ac45b..77fc15a8d 100644
--- a/src/java/org/apache/fop/render/pcl/PCLRenderer.java
+++ b/src/java/org/apache/fop/render/pcl/PCLRenderer.java
@@ -32,6 +32,9 @@ import java.io.OutputStream;
*/
public class PCLRenderer extends PrintRenderer {
+ /** The MIME type for PCL */
+ public static final String MIME_TYPE = "application/vnd.hp-PCL";
+
/**
* the current stream to add PCL commands to
*/
@@ -174,4 +177,9 @@ public class PCLRenderer extends PrintRenderer {
public void stopRenderer() throws IOException {
}
+ /** @see org.apache.fop.render.AbstractRenderer */
+ public String getMimeType() {
+ return MIME_TYPE;
+ }
+
}
diff --git a/src/java/org/apache/fop/render/svg/SVGRenderer.java b/src/java/org/apache/fop/render/svg/SVGRenderer.java
index fd7c855cf..55c34dd1a 100644
--- a/src/java/org/apache/fop/render/svg/SVGRenderer.java
+++ b/src/java/org/apache/fop/render/svg/SVGRenderer.java
@@ -414,5 +414,11 @@ public class SVGRenderer extends AbstractRenderer implements XMLHandler {
super.renderCharacter(ch);
}
+
+ /** @see org.apache.fop.render.AbstractRenderer */
+ public String getMimeType() {
+ return SVG_MIME_TYPE;
+ }
+
}
diff --git a/src/java/org/apache/fop/render/txt/TXTRenderer.java b/src/java/org/apache/fop/render/txt/TXTRenderer.java
index 4f743d673..c24cb1866 100644
--- a/src/java/org/apache/fop/render/txt/TXTRenderer.java
+++ b/src/java/org/apache/fop/render/txt/TXTRenderer.java
@@ -31,6 +31,9 @@ import org.apache.fop.render.pcl.PCLStream;
*/
public class TXTRenderer extends PrintRenderer {
+ /** The MIME type for PostScript */
+ public static final String MIME_TYPE = "text/plain";
+
/**
* the current stream to add Text commands to
*/
@@ -128,4 +131,9 @@ public class TXTRenderer extends PrintRenderer {
}
}
+ /** @see org.apache.fop.render.AbstractRenderer */
+ public String getMimeType() {
+ return MIME_TYPE;
+ }
+
}
diff --git a/src/java/org/apache/fop/render/xml/XMLRenderer.java b/src/java/org/apache/fop/render/xml/XMLRenderer.java
index d73e32556..a3d38897d 100644
--- a/src/java/org/apache/fop/render/xml/XMLRenderer.java
+++ b/src/java/org/apache/fop/render/xml/XMLRenderer.java
@@ -495,5 +495,10 @@ public class XMLRenderer extends AbstractRenderer {
return strbuf.toString();
}
+ /** @see org.apache.fop.render.AbstractRenderer */
+ public String getMimeType() {
+ return XML_MIME_TYPE;
+ }
+
}