ElementReader Class |
Namespace: pdftron.PDF
public sealed class ElementReader : IClosable
The ElementReader type exposes the following members.
Name | Description | |
---|---|---|
ElementReader | Instantiates a new element reader.
|
Name | Description | |
---|---|---|
Begin(Obj) | Begin processing given content stream. The content stream may be
a Form XObject, Type3 glyph stream, pattern stream or any other content stream.
| |
Begin(Page) | Begin processing a page.
| |
Begin(Obj, Obj) | Begin processing given content stream. The content stream may be
a Form XObject, Type3 glyph stream, pattern stream or any other content stream.
| |
Begin(Page, Context) | ||
Begin(Obj, Obj, Context) | ||
ClearChangeList | Clear the list containing identifiers of modified graphics state attributes.
The list of modified attributes is then accumulated during a subsequent call(s)
to ElementReader.Next().
| |
Close | ||
Current | Current.
| |
End | Close the current display list.
If the current display list is a sub-list created using FormBegin(), PatternBegin(),
or Type3FontBegin() methods, the function will end the sub-list and will return
processing to the parent display list at the point where it left off before
entering the sub-list.
| |
Equals | (Inherited from Object.) | |
FormBegin | When the current element is a form XObject you have the option to skip form
processing (by not calling FormBegin()) or to open the form stream and
continue Element traversal into the form.
To open a form XObject display list use FormBegin() method. The Next() returned
Element will be the first Element in the form XObject display list. Subsequent calls to Next()
will traverse form's display list until NULL is returned. At any point you can
close the form sub-list using ElementReader::End() method. After the form display
list is closed (using End()) the processing will return to the parent display list
at the point where it left off before entering the form XObject.
| |
GetChangesIterator | Gets the changes iterator.
| |
GetColorSpace | Gets the color space.
| |
GetExtGState | Gets the ext g state.
| |
GetFont | Gets the font.
| |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetPattern | Gets the pattern.
| |
GetShading | Gets the shading.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetXObject | Gets the x object.
| |
IsChanged | Checks if is changed.
| |
Next | Next.
| |
PatternBegin(Boolean) | Pattern begin.
| |
PatternBegin(Boolean, Boolean) | A method used to spawn the sub-display list representing the tiling pattern
of the current element in the ElementReader. You can call this method at any
point as long as the current element is valid.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
Type3FontBegin | A method used to spawn a sub-display list representing a Type3 Font glyph. You can
call this method at any point as long as the current element in the ElementReader
is a text element whose font type is type 3.
|
... ElementReader reader=new ElementReader(); reader.Begin(page); for (Element element=reader.next(); element!=null;element=reader.next()) { Rect bbox; if((bbox=element.getBBox())!=null) System.out.println("Bounding Box: " + bbox.getRectangle()); switch (element.getType()) { case Element.e_path: { // Process path data... double[] data = element.getPathPoints(); } break; case Element.e_text: // ... break; } } reader.End();