01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: /* $Id: PDFCIDSystemInfo.java 426576 2006-07-28 15:44:37Z jeremias $ */
19:
20: package org.apache.fop.pdf;
21:
22: // based on work by Takayuki Takeuchi
23:
24: /**
25: * class representing system information for "character identifier" fonts.
26: *
27: * this small object is used in the CID fonts and in the CMaps.
28: */
29: public class PDFCIDSystemInfo extends PDFObject {
30: private String registry;
31: private String ordering;
32: private int supplement;
33:
34: /**
35: * Create a CID system info.
36: *
37: * @param registry the registry value
38: * @param ordering the ordering value
39: * @param supplement the supplement value
40: */
41: public PDFCIDSystemInfo(String registry, String ordering,
42: int supplement) {
43: this .registry = registry;
44: this .ordering = ordering;
45: this .supplement = supplement;
46: }
47:
48: /**
49: * Create a string for the CIDSystemInfo dictionary.
50: * The entries are placed as an inline dictionary.
51: *
52: * @return the string for the CIDSystemInfo entry with the inline dictionary
53: */
54: public String toPDFString() {
55: StringBuffer p = new StringBuffer(64);
56: p.setLength(0);
57: p.append("/CIDSystemInfo << /Registry (");
58: p.append(registry);
59: p.append(") /Ordering (");
60: p.append(ordering);
61: p.append(") /Supplement ");
62: p.append(supplement);
63: p.append(" >>");
64: return p.toString();
65: }
66:
67: }
|