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 intTo test corner case of PDFBOX-4302.private int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the given CID to Unicode mapping.(package private) static boolean(package private) static booleanallowCodeRange(int prev, int next) (package private) static booleanallowDestinationRange(String prev, String next) voidsetWMode(int wMode) Sets the WMode (writing mode) of this CMap.private voidwriteLine(BufferedWriter writer, String text) voidwriteTo(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
-