Package org.apache.pdfbox.pdmodel.font
Class ToUnicodeWriter
java.lang.Object
org.apache.pdfbox.pdmodel.font.ToUnicodeWriter
Writes ToUnicode Mapping Files.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final int
To test corner case of PDFBOX-4302.private int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the given CID to Unicode mapping.(package private) static boolean
(package private) static boolean
allowCodeRange
(int prev, int next) (package private) static boolean
allowDestinationRange
(String prev, String next) void
setWMode
(int wMode) Sets the WMode (writing mode) of this CMap.private void
writeLine
(BufferedWriter writer, String text) void
writeTo
(OutputStream out) Writes the CMap as ASCII to the given output stream.
-
Field Details
-
cidToUnicode
-
wMode
private int wMode -
MAX_ENTRIES_PER_OPERATOR
static final int MAX_ENTRIES_PER_OPERATORTo test corner case of PDFBOX-4302.- See Also:
-
-
Constructor Details
-
ToUnicodeWriter
ToUnicodeWriter()Creates a new ToUnicode CMap writer.
-
-
Method Details
-
setWMode
public void setWMode(int wMode) Sets the WMode (writing mode) of this CMap.- Parameters:
wMode
- 1 for vertical, 0 for horizontal (default)
-
add
Adds the given CID to Unicode mapping.- Parameters:
cid
- CIDtext
- Unicode text, up to 512 bytes.
-
writeTo
Writes the CMap as ASCII to the given output stream.- Parameters:
out
- ASCII output stream- Throws:
IOException
- if the stream could not be written
-
writeLine
- Throws:
IOException
-
allowCIDToUnicodeRange
-
allowCodeRange
static boolean allowCodeRange(int prev, int next) -
allowDestinationRange
-