Glyph Strategy Extracts Glyphs and Metrics
This strategy extracts each single glyph including its metrics in the order in which it appears in the PDF data stream. The result is NOT sorted.
The result may be used for further processing by another strategy or text analyses.
An instance has to be created individually and has to be passed to the main class:
$glyphStrategy = new SetaPDF_Extractor_Strategy_Glyph(); $extractor = new SetaPDF_Extractor($document); $extractor->setStrategy($glyphStrategy);
You can get the result by this strategy by calling the getResultByPageNumber() method for each individual page. Each glyph will be represented by an instance of SetaPDF_Extractor_Result_Glyph which implements both the SetaPDF_Extractor_Result_CompareableInterface and SetaPDF_Extractor_Result_HasBoundsInterface interfaces.