public class CMapContentParser extends Object
Modifier and Type | Field and Description |
---|---|
static int |
COMMAND_TYPE
Commands have this type.
|
Constructor and Description |
---|
CMapContentParser(PdfTokenizer tokeniser)
Creates a new instance of PdfContentParser
|
Modifier and Type | Method and Description |
---|---|
static String |
decodeCMapObject(CMapObject cMapObject) |
protected static String |
decodeName(byte[] content) |
boolean |
nextValidToken()
Reads the next token skipping over the comments.
|
void |
parse(List<CMapObject> ls)
Parses a single command from the content.
|
CMapObject |
readArray()
Reads an array.
|
CMapObject |
readDictionary()
Reads a dictionary.
|
CMapObject |
readObject()
Reads a pdf object.
|
static String |
toHex(int n)
Gets an hex string in the format " |
public static final int COMMAND_TYPE
public CMapContentParser(PdfTokenizer tokeniser)
tokeniser
- the tokeniser with the content
public void parse(List<CMapObject> ls) throws IOException
ls
- an ArrayList
to use. It will be cleared before using.
IOException
- on error
public CMapObject readDictionary() throws IOException
"<<"
token.
IOException
- on error
public CMapObject readArray() throws IOException
IOException
- on error
public CMapObject readObject() throws IOException
IOException
- on error
public boolean nextValidToken() throws IOException
true
if a token was read, false
if the end of content was reached.
IOException
- on error.
protected static String decodeName(byte[] content)
public static String toHex(int n)
n
- the number
public static String decodeCMapObject(CMapObject cMapObject)
Copyright © 1998–2018 iText Group NV. All rights reserved.