multivalent.std.adaptor.pdf

Class PDF

public class PDF extends MediaAdaptorRandom

Parse a page of PDF and display with Java 2's 2D API.

Document Tree Construction

The PDF content stream is translated into a Multivalent document tree as follows. The tree is live: reformat. Objects drawn as appear in content stream, which usually but not necessarily follows reading order, To see the document tree for any particular PDF page, turn on the Debug switch in the Help menu, then select Debug/View Document Tree.

See Also

Other PDF viewers:

Version: $Revision: 1.149 $ $Date: 2004/02/05 06:12:41 $

Field Summary
static booleanGoFast
Go fast or be exactly correct.
static StringMSG_DUMP
Message of semantic event to control dumping of uncompress and decrypted content stream to temporary file.
static StringMSG_GO_FAST
Message "pdfSetGoFast": faster rendering if sometimes less accurate: arg=boolean or null to toggle.
static StringMSG_OWNER_PASSWORD
Message of semantic event to set the user password so encrypted files can be read, with the password String passed in arg.
static StringMSG_USER_PASSWORD
Message of semantic event to set the owner password so encrypted files can be read, with the password String passed in arg.
static StringOCG_OFF
static StringOCG_ON
static StringVAR_OCG
Optional content groups stored in Document under this key.
Method Summary
booleanformatAfter(Node node)
Enlarge content root to MediaBox.
RectanglegetCropBox()
PDFReadergetReader()
AffineTransformgetTransform()
booleanisAuthorized()
Objectparse(INode parent)
Parses individual page indicated in ATTR_PAGE of parent's containing Document and returns formatted document tree rooted at parent as described above.
booleansemanticEventAfter(SemanticEvent se, String msg)
booleansemanticEventBefore(SemanticEvent se, String msg)
"Dump PDF to temp dir" in Debug menu.
voidsetPassword(String pw)
voidsetZoom(float percent)
Set zoom/magnification percentage, from 25% to 1600%.

Field Detail

GoFast

public static boolean GoFast
Go fast or be exactly correct.

MSG_DUMP

public static final String MSG_DUMP
Message of semantic event to control dumping of uncompress and decrypted content stream to temporary file.

MSG_GO_FAST

public static final String MSG_GO_FAST
Message "pdfSetGoFast": faster rendering if sometimes less accurate: arg=boolean or null to toggle.

MSG_OWNER_PASSWORD

public static final String MSG_OWNER_PASSWORD
Message of semantic event to set the user password so encrypted files can be read, with the password String passed in arg.

MSG_USER_PASSWORD

public static final String MSG_USER_PASSWORD
Message of semantic event to set the owner password so encrypted files can be read, with the password String passed in arg.

OCG_OFF

public static final String OCG_OFF

OCG_ON

public static final String OCG_ON

VAR_OCG

public static final String VAR_OCG
Optional content groups stored in Document under this key. The value there is a java.util.Map with names of optional content groups as keys and OCG_ON and OCG_OFF as values.

Method Detail

formatAfter

public boolean formatAfter(Node node)
Enlarge content root to MediaBox.

getCropBox

public Rectangle getCropBox()

getReader

public PDFReader getReader()

getTransform

public AffineTransform getTransform()

isAuthorized

public boolean isAuthorized()

parse

public Object parse(INode parent)
Parses individual page indicated in ATTR_PAGE of parent's containing Document and returns formatted document tree rooted at parent as described above.

Returns: root of PDF subtree under parent

semanticEventAfter

public boolean semanticEventAfter(SemanticEvent se, String msg)
Implements MSG_DUMP, MSG_USER_PASSWORD, MSG_OWNER_PASSWORD.

semanticEventBefore

public boolean semanticEventBefore(SemanticEvent se, String msg)
"Dump PDF to temp dir" in Debug menu.

setPassword

public void setPassword(String pw)

setZoom

public void setZoom(float percent)
Set zoom/magnification percentage, from 25% to 1600%.