Package com.pdftools.toolbox.pdf.content
Class ContentExtractor
- java.lang.Object
-
- com.pdftools.toolbox.internal.NativeBase
-
- com.pdftools.toolbox.internal.NativeObject
-
- com.pdftools.toolbox.pdf.content.ContentExtractor
-
- All Implemented Interfaces:
java.lang.Iterable<ContentElement>
public class ContentExtractor extends NativeObject implements java.lang.Iterable<ContentElement>
-
-
Constructor Summary
Constructors Constructor Description ContentExtractor(Content content)
Create a new content extractor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UngroupingSelection
getUngrouping()
Configures the extractor's behavior regarding the selection of groups to be un-grouped.java.util.Iterator<ContentElement>
iterator()
void
setUngrouping(UngroupingSelection value)
Configures the extractor's behavior regarding the selection of groups to be un-grouped.-
Methods inherited from class com.pdftools.toolbox.internal.NativeObject
equals, hashCode
-
-
-
-
Constructor Detail
-
ContentExtractor
public ContentExtractor(Content content) throws java.io.IOException, CorruptException
Create a new content extractor
- Parameters:
content
- the content object of a page or group- Throws:
java.io.IOException
- Error reading from the documentCorruptException
- The document is corruptjava.lang.IllegalArgumentException
- if the document associated with the {@link com.pdftools.toolbox.pdf.content.ContentExtractor# content} object has already been closedjava.lang.IllegalArgumentException
- if the document associated with the content has already been closedjava.lang.IllegalArgumentException
- if the {@link com.pdftools.toolbox.pdf.content.ContentExtractor# content}'s document is an output documentjava.lang.IllegalArgumentException
- ifcontent
isnull
-
-
Method Detail
-
getUngrouping
public UngroupingSelection getUngrouping()
Configures the extractor's behavior regarding the selection of groups to be un-grouped. Default value:UngroupingSelection.NONE
.- Throws:
java.lang.IllegalStateException
- the object has already been closed
-
setUngrouping
public void setUngrouping(UngroupingSelection value)
Configures the extractor's behavior regarding the selection of groups to be un-grouped. Default value:UngroupingSelection.NONE
.- Throws:
java.lang.IllegalStateException
- the object has already been closedjava.lang.IllegalArgumentException
- ifvalue
isnull
-
iterator
public java.util.Iterator<ContentElement> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<ContentElement>
-
-