Package com.snowtide.pdf
Interface OutputSource
-
- All Known Implementing Classes:
PDFTextStream
public interface OutputSource
This 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 void
pipe(OutputHandler handler)
Equivalent topipe(OutputHandler, Direction)
, with a baseDirection
determined by eitherPage.guessDirection()
(if callingpipe
on a page) orBlock.guessDirection()
(if callingpipe
on aBlock
).void
pipe(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 baseDirection
determined by eitherPage.guessDirection()
(if callingpipe
on a page) orBlock.guessDirection()
(if callingpipe
on 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
OutputTarget
is recommended.- Parameters:
handler
- an OutputHandler instance.bd
- theDirection
that 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
-
-