/* * Preprocessor.h * * PDF is so complicated that we have to scan twice * * Check used codes for each font * * by WangLu * 2012.09.07 */ #ifndef PREPROCESSOR_H__ #define PREPROCESSOR_H__ #include #include namespace pdf2htmlEX { class Preprocessor : public OutputDev { public: Preprocessor(void); virtual ~Preprocessor(void); virtual GBool upsideDown() { return gFalse; } virtual GBool useDrawChar() { return gTrue; } virtual GBool interpretType3Chars() { return gFalse; } virtual GBool needNonText() { return gFalse; } virtual void drawChar(GfxState *state, double x, double y, double dx, double dy, double originX, double originY, CharCode code, int nBytes, Unicode *u, int uLen); const char * get_code_map (long long font_id) const; protected: long long cur_font_id; char * cur_code_map; std::unordered_map code_maps; }; } // namespace pdf2htmlEX #endif //PREPROCESSOR_H__