Class PDFParser
java.lang.Object
org.openpdf.renderer.BaseWatchable
org.openpdf.renderer.PDFParser
PDFParser is the class that parses a PDF content stream and
produces PDFCmds for a PDFPage. You should never ever see it run:
it gets created by a PDFPage only if needed, and may even run in
its own thread.
- Author:
- Mike Wessler
-
Field Summary
Fields inherited from interface Watchable
COMPLETED, ERROR, NEEDS_DATA, NOT_STARTED, PAUSED, RUNNING, STOPPED, UNKNOWN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanup()Cleanup when iteration is doneintiterate()parse the stream. commands are added to the PDFPage initialized in the constructor as they are encountered.protected voidsetStatus(int status) Set the status of this watchablevoidsetup()Called to prepare for some iterationsMethods inherited from class BaseWatchable
execute, getErrorHandler, getException, getStatus, go, go, go, go, isExecutable, isFinished, isSuppressSetErrorStackTrace, run, setError, setErrorHandler, setSuppressSetErrorStackTrace, stop, waitForFinish
-
Constructor Details
-
PDFParser
-
-
Method Details
-
setup
-
iterate
parse the stream. commands are added to the PDFPage initialized in the constructor as they are encountered.Page numbers in comments refer to the Adobe PDF specification.
commands are listed in PDF spec 32000-1:2008 in Table A.1- Specified by:
iteratein classBaseWatchable- Returns:
- Watchable.RUNNING when there are commands to be processed
- Watchable.COMPLETED when the page is done and all the commands have been processed
- Watchable.STOPPED if the page we are rendering into is no longer available
- Throws:
Exception
-
cleanup
-
setStatus
protected void setStatus(int status) Description copied from class:BaseWatchableSet the status of this watchable- Overrides:
setStatusin classBaseWatchable
-