final class ToUnicodeWriter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.Integer,java.lang.String> |
cidToUnicode |
(package private) static int |
MAX_ENTRIES_PER_OPERATOR
To test corner case of PDFBOX-4302.
|
private int |
wMode |
Constructor and Description |
---|
ToUnicodeWriter()
Creates a new ToUnicode CMap writer.
|
Modifier and Type | Method and Description |
---|---|
void |
add(int cid,
java.lang.String text)
Adds the given CID to Unicode mapping.
|
void |
setWMode(int wMode)
Sets the WMode (writing mode) of this CMap.
|
private void |
writeLine(java.io.BufferedWriter writer,
java.lang.String text) |
void |
writeTo(java.io.OutputStream out)
Writes the CMap as ASCII to the given output stream.
|
private final java.util.Map<java.lang.Integer,java.lang.String> cidToUnicode
private int wMode
static final int MAX_ENTRIES_PER_OPERATOR
public void setWMode(int wMode)
wMode
- 1 for vertical, 0 for horizontal (default)public void add(int cid, java.lang.String text)
cid
- CIDtext
- Unicode text, up to 512 bytes.public void writeTo(java.io.OutputStream out) throws java.io.IOException
out
- ASCII output streamjava.io.IOException
- if the stream could not be writtenprivate void writeLine(java.io.BufferedWriter writer, java.lang.String text) throws java.io.IOException
java.io.IOException