20#ifndef INCLUDED_SDEXT_SOURCE_PDFIMPORT_XPDFWRAPPER_PDFIOUTDEV_GPL_HXX
21#define INCLUDED_SDEXT_SOURCE_PDFIMPORT_XPDFWRAPPER_PDFIOUTDEV_GPL_HXX
24#include <config_poppler.h>
26#if defined __GNUC__ || defined __clang__
27# pragma GCC diagnostic push
28# pragma GCC diagnostic ignored "-Wundef"
29# pragma GCC diagnostic ignored "-Wunused-parameter"
32#pragma warning(disable : 4100)
33#pragma warning(disable : 4310)
38#include <UnicodeMap.h>
42#include <GlobalParams.h>
45#if defined __GNUC__ || defined __clang__
46# pragma GCC diagnostic pop
51#include <unordered_map>
58#include <cpp/poppler-version.h>
59#define POPPLER_CHECK_VERSION(major,minor,micro) \
60 (POPPLER_VERSION_MAJOR > (major) || \
61 (POPPLER_VERSION_MAJOR == (major) && POPPLER_VERSION_MINOR > (minor)) || \
62 (POPPLER_VERSION_MAJOR == (major) && POPPLER_VERSION_MINOR == (minor) && POPPLER_VERSION_MICRO >= (micro)))
124 {
return const_cast<GooString &
>(
familyName); }
128#if POPPLER_VERSION_MAJOR == 0 && POPPLER_VERSION_MINOR < 71
138 mutable std::unordered_map<
long long,
143 int parseFont(
long long nNewId, GfxFont* pFont,
const GfxState* state )
const;
145#if POPPLER_CHECK_VERSION(0, 83, 0)
146 static void printPath(
const GfxPath* pPath );
174#if POPPLER_CHECK_VERSION(0, 71, 0)
181 virtual void startPage(
int pageNum, GfxState *state
188 virtual void endPage()
override;
191 #if POPPLER_CHECK_VERSION(0, 19, 0)
192 virtual void processLink(AnnotLink *link)
override;
193 #elif POPPLER_CHECK_VERSION(0, 17, 0)
194 virtual void processLink(AnnotLink *link, Catalog *catalog)
override;
200 virtual void saveState(GfxState *state)
override;
204 virtual void updateCTM(GfxState *state,
double m11,
double m12,
205 double m21,
double m22,
double m31,
double m32)
override;
219 virtual void updateFont(GfxState *state)
override;
223 virtual void stroke(GfxState *state)
override;
224 virtual void fill(GfxState *state)
override;
225 virtual void eoFill(GfxState *state)
override;
228 virtual void clip(GfxState *state)
override;
229 virtual void eoClip(GfxState *state)
override;
232#if POPPLER_CHECK_VERSION(0, 82, 0)
233 virtual void drawChar(GfxState *state,
double x,
double y,
234 double dx,
double dy,
235 double originX,
double originY,
236 CharCode code,
int nBytes,
const Unicode *u,
int uLen)
override;
238 virtual void drawChar(GfxState *state,
double x,
double y,
239 double dx,
double dy,
240 double originX,
double originY,
241 CharCode code,
int nBytes, Unicode *u,
int uLen)
override;
243#if POPPLER_CHECK_VERSION(0, 64, 0)
244 virtual void drawString(GfxState *state,
const GooString *s)
override;
246 virtual void drawString(GfxState *state, GooString *s)
override;
251 virtual void drawImageMask(GfxState *state, Object *ref, Stream *str,
255#if POPPLER_CHECK_VERSION(0, 82, 0)
256 virtual void drawImage(GfxState *state, Object *ref, Stream *str,
257 int width,
int height, GfxImageColorMap *colorMap,
259 const int* maskColors,
poppler_bool inlineImg)
override;
261 virtual void drawImage(GfxState *state, Object *ref, Stream *str,
262 int width,
int height, GfxImageColorMap *colorMap,
266 virtual void drawMaskedImage(GfxState *state, Object *ref, Stream *str,
267 int width,
int height,
268 GfxImageColorMap *colorMap,
270 Stream *maskStr,
int maskWidth,
int maskHeight,
275 int width,
int height,
276 GfxImageColorMap *colorMap,
279 int maskWidth,
int maskHeight,
280 GfxImageColorMap *maskColorMap
296#if !POPPLER_CHECK_VERSION(0, 73, 0)
297static_assert(std::is_same_v<Guchar, unsigned char>,
"unexpected typedef");
virtual void endPage() override
virtual void drawMaskedImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, poppler_bool interpolate, Stream *maskStr, int maskWidth, int maskHeight, poppler_bool maskInvert, poppler_bool maskInterpolate) override
virtual void updateRender(GfxState *state) override
virtual void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, poppler_bool interpolate, Stream *maskStr, int maskWidth, int maskHeight, GfxImageColorMap *maskColorMap, poppler_bool maskInterpolate) override
virtual void endTextObject(GfxState *state) override
virtual void clip(GfxState *state) override
virtual void updateLineWidth(GfxState *state) override
virtual void drawImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, poppler_bool invert, poppler_bool interpolate, poppler_bool inlineImg) override
std::unique_ptr< UnicodeMap > m_pUtf8Map
void setSkipImages(bool bSkipImages)
virtual void updateLineJoin(GfxState *state) override
virtual void updateLineDash(GfxState *state) override
virtual void saveState(GfxState *state) override
int parseFont(long long nNewId, GfxFont *pFont, const GfxState *state) const
virtual poppler_bool useDrawChar() override
virtual void updateBlendMode(GfxState *state) override
void writeFontFile(GfxFont *gfxFont) const
virtual void eoClip(GfxState *state) override
static void printPath(GfxPath *pPath)
virtual void setDefaultCTM(double *ctm) override
virtual void drawString(GfxState *state, GooString *s) override
virtual void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, poppler_bool interpolate, int *maskColors, poppler_bool inlineImg) override
virtual poppler_bool interpretType3Chars() override
virtual void processLink(Link *link, Catalog *catalog) override
virtual void updateFillColor(GfxState *state) override
virtual void fill(GfxState *state) override
virtual void stroke(GfxState *state) override
virtual poppler_bool upsideDown() override
virtual void restoreState(GfxState *state) override
virtual void eoFill(GfxState *state) override
virtual void updateStrokeColor(GfxState *state) override
static void setPageNum(int nNumPages)
virtual void updateLineCap(GfxState *state) override
virtual void updateCTM(GfxState *state, double m11, double m12, double m21, double m22, double m31, double m32) override
virtual ~PDFOutDev() override
virtual void updateFont(GfxState *state) override
virtual void updateStrokeOpacity(GfxState *state) override
std::unordered_map< long long, FontAttributes > m_aFontMap
virtual void updateFlatness(GfxState *state) override
virtual void updateFillOpacity(GfxState *state) override
virtual void updateMiterLimit(GfxState *state) override
virtual poppler_bool needNonText() override
virtual void startPage(int pageNum, GfxState *state) override
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) override
Output one glyph.
std::vector< Output_t > OutputBuffer
#define POPPLER_CHECK_VERSION(major, minor, micro)
FontAttributes & operator=(const FontAttributes &rSrc)
FontAttributes(const FontAttributes &rSrc)
GfxFont::Weight maFontWeight
GooString & getFamilyName() const
bool operator==(const FontAttributes &rFont) const