1 51 package org.apache.fop.pdf; 52 53 import java.io.UnsupportedEncodingException ; 55 56 58 63 public class PDFCIDSystemInfo extends PDFObject { 64 private static final StringBuffer p = new StringBuffer (); 65 protected String registry; 66 protected String ordering; 67 protected int supplement; 68 69 public PDFCIDSystemInfo(String registry, String ordering, 70 int supplement) { 71 this.registry = registry; 72 this.ordering = ordering; 73 this.supplement = supplement; 74 } 75 76 84 public byte[] toPDF() { 85 try { 86 return toPDFString().getBytes(PDFDocument.ENCODING); 87 } catch (UnsupportedEncodingException ue) { 88 return toPDFString().getBytes(); 89 } 90 } 91 92 public String toPDFString() { 93 p.setLength(0); 94 p.append("/CIDSystemInfo << /Registry ("); 95 p.append(registry); 96 p.append(")/Ordering ("); 97 p.append(ordering); 98 p.append(")/Supplement "); 99 p.append(supplement); 100 p.append(" >>"); 101 return p.toString(); 102 } 103 104 } 105 106 | Popular Tags |