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 UngroupingSelectiongetUngrouping()Configures the extractor's behavior regarding the selection of groups to be un-grouped.java.util.Iterator<ContentElement>iterator()voidsetUngrouping(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- ifcontentisnull
-
-
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- ifvalueisnull
-
iterator
public java.util.Iterator<ContentElement> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<ContentElement>
-
-