aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/pdf/PDFCIDSystemInfo.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/org/apache/fop/pdf/PDFCIDSystemInfo.java')
-rw-r--r--src/java/org/apache/fop/pdf/PDFCIDSystemInfo.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/pdf/PDFCIDSystemInfo.java b/src/java/org/apache/fop/pdf/PDFCIDSystemInfo.java
index 0228addb6..7a96930aa 100644
--- a/src/java/org/apache/fop/pdf/PDFCIDSystemInfo.java
+++ b/src/java/org/apache/fop/pdf/PDFCIDSystemInfo.java
@@ -19,6 +19,9 @@
package org.apache.fop.pdf;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
// based on work by Takayuki Takeuchi
/**
@@ -64,5 +67,24 @@ public class PDFCIDSystemInfo extends PDFObject {
return p.toString();
}
+ /**
+ * {@inheritDoc}
+ */
+ public byte[] toPDF() {
+ ByteArrayOutputStream bout = new ByteArrayOutputStream(128);
+ try {
+ bout.write(encode("<< /Registry "));
+ bout.write(encodeText(registry));
+ bout.write(encode(" /Ordering "));
+ bout.write(encodeText(ordering));
+ bout.write(encode(" /Supplement "));
+ bout.write(encode(Integer.toString(supplement)));
+ bout.write(encode(" >>"));
+ } catch (IOException ioe) {
+ log.error("Ignored I/O exception", ioe);
+ }
+ return bout.toByteArray();
+ }
+
}