public class PDFPageParser
extends java.lang.Object
Currently unsupported: - Ignores hyperlinks (annotations) - Type 1 & Type 3 fonts - Transparency blend modes other than /Normal ...
Constructor and Description |
---|
PDFPageParser(PDFFile aPdfFile,
int aPageIndex)
Creates a new page parser for a given PDF file and a page index.
|
Modifier and Type | Method and Description |
---|---|
void |
drawImage(java.awt.Image im)
Establishes an image transform and tells markup engine to draw the image
|
void |
establishClip(java.awt.geom.GeneralPath newclip,
boolean intersect)
Called when the clipping path changes.
|
void |
executeForm(PDFForm f) |
void |
executePatternStream(TilingPattern pat) |
static int |
getPDFHexString(byte[] pageBytes,
int start,
int end,
com.inductiveautomation.rm.pdf.reader.Range r)
Replace ascii hex in pageBytes with actual bytes.
|
static byte[] |
getPDFHexString(java.lang.String s) |
int |
getTokens(byte[] pageBytes,
int offset,
int end,
java.util.List tokens)
The lexer.
|
void |
parse()
Main entry point.
|
void |
parse(java.util.List tokenList,
byte[] pageBytes)
The meat and potatoes of the pdf parser.
|
int |
parseInlineImage(int tIndex,
byte[] pageBytes)
Converts the tokens & data inside a BI/EI block into an image and draws it.
|
boolean |
parseTextOperator(byte oper,
int tindex,
int numops,
PDFGState gs,
byte[] pageBytes) |
public PDFPageParser(PDFFile aPdfFile, int aPageIndex)
public int getTokens(byte[] pageBytes, int offset, int end, java.util.List tokens)
public static byte[] getPDFHexString(java.lang.String s)
public static int getPDFHexString(byte[] pageBytes, int start, int end, com.inductiveautomation.rm.pdf.reader.Range r)
public void parse()
public void parse(java.util.List tokenList, byte[] pageBytes)
public void executeForm(PDFForm f)
public void executePatternStream(TilingPattern pat)
public boolean parseTextOperator(byte oper, int tindex, int numops, PDFGState gs, byte[] pageBytes)
public int parseInlineImage(int tIndex, byte[] pageBytes)
public void drawImage(java.awt.Image im)
public void establishClip(java.awt.geom.GeneralPath newclip, boolean intersect)
NB. This routine modifies the path that's passed in to it.