Package com.snowtide.pdf
Interface OutputSource
-
- All Known Implementing Classes:
PDFTextStream
public interface OutputSourceThis interface is implemented by every level of the PDFxStream document model that can emit content events to anOutputHandler.- Since:
- v4.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidpipe(OutputHandler handler)Equivalent topipe(OutputHandler, Direction), with a baseDirectiondetermined by eitherPage.guessDirection()(if callingpipeon a page) orBlock.guessDirection()(if callingpipeon aBlock).voidpipe(OutputHandler handler, Direction bd)Extracts all available text from thisOutputSource, sending all PDF text events to the givenOutputHandler, with the specifiedDirection.
-
-
-
Method Detail
-
pipe
void pipe(OutputHandler handler) throws IOException
Equivalent topipe(OutputHandler, Direction), with a baseDirectiondetermined by eitherPage.guessDirection()(if callingpipeon a page) orBlock.guessDirection()(if callingpipeon aBlock).- Throws:
IOException
-
pipe
void pipe(OutputHandler handler, Direction bd) throws IOException
Extracts all available text from this
OutputSource, sending all PDF text events to the givenOutputHandler, with the specifiedDirection.If no special PDF text event handling is needed (i.e. you just want a straight text extract), then using an
OutputTargetis recommended.- Parameters:
handler- an OutputHandler instance.bd- theDirectionthat should be used to disambiguate the order in which extracted text is emitted- Throws:
IOException- if an error occurs during the extraction process- See Also:
OutputHandler,OutputTarget
-
-