Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
PdfParser Class Reference

PDF parsing module using libpoppler's facilities. More...

#include <pdf-parser.h>

Public Member Functions

 PdfParser (std::shared_ptr< PDFDoc > pdf_doc, SvgBuilder *builderA, Page *page, _POPPLER_CONST PDFRectangle *cropBox)
 
 PdfParser (XRef *xrefA, SvgBuilder *builderA, Dict *resDict, _POPPLER_CONST PDFRectangle *box)
 
virtual ~PdfParser ()
 
void parse (Object *obj, GBool topLevel=gTrue)
 
void saveState ()
 
void restoreState ()
 
GfxState * getState ()
 
void setApproximationPrecision (int shadingType, double colorDelta, int maxDepth)
 
void loadOptionalContentLayers (Dict *resources)
 
void loadPatternColorProfiles (Dict *resources)
 
void loadColorProfile ()
 
void loadColorSpaceProfile (GfxColorSpace *space, Object *obj)
 
std::unique_ptr< GfxPattern > lookupPattern (Object *obj, GfxState *state)
 Look up pattern/gradients from the GfxResource dictionary.
 
std::shared_ptr< CairoFontEnginegetFontEngine ()
 
void build_annots (const Object &annot, int page_num)
 

Private Member Functions

std::unique_ptr< GfxColorSpace > lookupColorSpaceCopy (Object &)
 Get a newly allocated color space instance by CS operation argument.
 
void setDefaultApproximationPrecision ()
 
void pushOperator (const char *name)
 
OpHistoryEntrypopOperator ()
 
const char * getPreviousOperator (unsigned int look_back=1)
 
void go (GBool topLevel)
 
void execOp (Object *cmd, Object args[], int numArgs)
 
PdfOperatorfindOp (const char *name)
 
GBool checkArg (Object *arg, TchkType type)
 
int getPos ()
 
void opOptionalContentGroup (Object args[], int numArgs)
 
void opSave (Object args[], int numArgs)
 
void opRestore (Object args[], int numArgs)
 
void opConcat (Object args[], int numArgs)
 Concatenate transformation matrix to the current state.
 
void opSetDash (Object args[], int numArgs)
 
void opSetFlat (Object args[], int numArgs)
 
void opSetLineJoin (Object args[], int numArgs)
 
void opSetLineCap (Object args[], int numArgs)
 
void opSetMiterLimit (Object args[], int numArgs)
 
void opSetLineWidth (Object args[], int numArgs)
 
void opSetExtGState (Object args[], int numArgs)
 
void doSoftMask (Object *str, GBool alpha, GfxColorSpace *blendingColorSpace, GBool isolated, GBool knockout, Function *transferFunc, GfxColor *backdropColor)
 
void opSetRenderingIntent (Object args[], int numArgs)
 
void opSetFillGray (Object args[], int numArgs)
 
void opSetStrokeGray (Object args[], int numArgs)
 
void opSetFillCMYKColor (Object args[], int numArgs)
 
void opSetStrokeCMYKColor (Object args[], int numArgs)
 
void opSetFillRGBColor (Object args[], int numArgs)
 
void opSetStrokeRGBColor (Object args[], int numArgs)
 
void opSetFillColorSpace (Object args[], int numArgs)
 
void opSetStrokeColorSpace (Object args[], int numArgs)
 
void opSetFillColor (Object args[], int numArgs)
 
void opSetStrokeColor (Object args[], int numArgs)
 
void opSetFillColorN (Object args[], int numArgs)
 
void opSetStrokeColorN (Object args[], int numArgs)
 
void opMoveTo (Object args[], int numArgs)
 
void opLineTo (Object args[], int numArgs)
 
void opCurveTo (Object args[], int numArgs)
 
void opCurveTo1 (Object args[], int numArgs)
 
void opCurveTo2 (Object args[], int numArgs)
 
void opRectangle (Object args[], int numArgs)
 
void opClosePath (Object args[], int numArgs)
 
void opEndPath (Object args[], int numArgs)
 
void opStroke (Object args[], int numArgs)
 
void opCloseStroke (Object args[], int numArgs)
 
void opFill (Object args[], int numArgs)
 
void opEOFill (Object args[], int numArgs)
 
void opFillStroke (Object args[], int numArgs)
 
void opCloseFillStroke (Object args[], int numArgs)
 
void opEOFillStroke (Object args[], int numArgs)
 
void opCloseEOFillStroke (Object args[], int numArgs)
 
void doFillAndStroke (GBool eoFill)
 
void doPatternFillFallback (GBool eoFill)
 
void doPatternStrokeFallback ()
 
void doShadingPatternFillFallback (GfxShadingPattern *sPat, GBool stroke, GBool eoFill)
 
void opShFill (Object args[], int numArgs)
 
void doFunctionShFill (GfxFunctionShading *shading)
 
void doFunctionShFill1 (GfxFunctionShading *shading, double x0, double y0, double x1, double y1, GfxColor *colors, int depth)
 
void doGouraudTriangleShFill (GfxGouraudTriangleShading *shading)
 
void gouraudFillTriangle (double x0, double y0, GfxColor *color0, double x1, double y1, GfxColor *color1, double x2, double y2, GfxColor *color2, int nComps, int depth)
 
void doPatchMeshShFill (GfxPatchMeshShading *shading)
 
void fillPatch (_POPPLER_CONST GfxPatch *patch, int nComps, int depth)
 
void doEndPath ()
 
void opClip (Object args[], int numArgs)
 
void opEOClip (Object args[], int numArgs)
 
void opBeginText (Object args[], int numArgs)
 
void opEndText (Object args[], int numArgs)
 
void opSetCharSpacing (Object args[], int numArgs)
 
void opSetFont (Object args[], int numArgs)
 
void opSetTextLeading (Object args[], int numArgs)
 
void opSetTextRender (Object args[], int numArgs)
 
void opSetTextRise (Object args[], int numArgs)
 
void opSetWordSpacing (Object args[], int numArgs)
 
void opSetHorizScaling (Object args[], int numArgs)
 
void opTextMove (Object args[], int numArgs)
 
void opTextMoveSet (Object args[], int numArgs)
 
void opSetTextMatrix (Object args[], int numArgs)
 
void opTextNextLine (Object args[], int numArgs)
 
void doUpdateFont ()
 
void opShowText (Object args[], int numArgs)
 
void opMoveShowText (Object args[], int numArgs)
 
void opMoveSetShowText (Object args[], int numArgs)
 
void opShowSpaceText (Object args[], int numArgs)
 
void doShowText (const GooString *s)
 
void doShowText (GooString *s)
 
void opXObject (Object args[], int numArgs)
 
void doImage (Object *ref, Stream *str, GBool inlineImg)
 
void doForm (Object *str, double *offset=nullptr)
 
void doForm1 (Object *str, Dict *resDict, double *matrix, double *bbox, GBool transpGroup=gFalse, GBool softMask=gFalse, GfxColorSpace *blendingColorSpace=nullptr, GBool isolated=gFalse, GBool knockout=gFalse, GBool alpha=gFalse, Function *transferFunc=nullptr, GfxColor *backdropColor=nullptr)
 
void opBeginImage (Object args[], int numArgs)
 
Stream * buildImageStream ()
 
void opImageData (Object args[], int numArgs)
 
void opEndImage (Object args[], int numArgs)
 
void opSetCharWidth (Object args[], int numArgs)
 
void opSetCacheDevice (Object args[], int numArgs)
 
void opBeginIgnoreUndef (Object args[], int numArgs)
 
void opEndIgnoreUndef (Object args[], int numArgs)
 
void opBeginMarkedContent (Object args[], int numArgs)
 
void opEndMarkedContent (Object args[], int numArgs)
 
void opMarkPoint (Object args[], int numArgs)
 
void pushResources (Dict *resDict)
 
void popResources ()
 

Private Attributes

std::shared_ptr< PDFDoc > _pdf_doc
 
std::shared_ptr< CairoFontEngine_font_engine
 
XRef * xref
 
SvgBuilderbuilder
 
GBool subPage
 
GBool printCommands
 
GfxResources * res
 
GfxState * state
 
GBool fontChanged
 
GfxClipType clip
 
int ignoreUndef
 
Geom::Affine baseMatrix
 
int formDepth
 
Parser * parser
 
int colorDeltas [pdfNumShadingTypes]
 
int maxDepths [pdfNumShadingTypes]
 
OpHistoryEntryoperatorHistory
 
std::map< std::string, std::unique_ptr< GfxColorSpace > > colorSpacesCache
 Caches color spaces by name.
 

Static Private Attributes

static PdfOperator opTab []
 

Detailed Description

PDF parsing module using libpoppler's facilities.

Definition at line 112 of file pdf-parser.h.

Constructor & Destructor Documentation

◆ PdfParser() [1/2]

◆ PdfParser() [2/2]

PdfParser::PdfParser ( XRef *  xrefA,
SvgBuilder builderA,
Dict *  resDict,
_POPPLER_CONST PDFRectangle *  box 
)

◆ ~PdfParser()

PdfParser::~PdfParser ( )
virtual

Member Function Documentation

◆ build_annots()

void PdfParser::build_annots ( const Object &  annot,
int  page_num 
)

Referenced by doShowText().

◆ buildImageStream()

Stream * PdfParser::buildImageStream ( )
private

Referenced by doShowText().

◆ checkArg()

GBool PdfParser::checkArg ( Object *  arg,
TchkType  type 
)
private

Definition at line 585 of file pdf-parser.cpp.

Referenced by execOp().

◆ doEndPath()

◆ doFillAndStroke()

◆ doForm()

void PdfParser::doForm ( Object *  str,
double *  offset = nullptr 
)
private

Referenced by doShowText().

◆ doForm1()

void PdfParser::doForm1 ( Object *  str,
Dict *  resDict,
double *  matrix,
double *  bbox,
GBool  transpGroup = gFalse,
GBool  softMask = gFalse,
GfxColorSpace *  blendingColorSpace = nullptr,
GBool  isolated = gFalse,
GBool  knockout = gFalse,
GBool  alpha = gFalse,
Function *  transferFunc = nullptr,
GfxColor *  backdropColor = nullptr 
)
private

Referenced by doShowText(), and doSoftMask().

◆ doFunctionShFill()

void PdfParser::doFunctionShFill ( GfxFunctionShading *  shading)
private

Definition at line 1642 of file pdf-parser.cpp.

References doFunctionShFill1().

Referenced by doShadingPatternFillFallback(), and opShFill().

◆ doFunctionShFill1()

void PdfParser::doFunctionShFill1 ( GfxFunctionShading *  shading,
double  x0,
double  y0,
double  x1,
double  y1,
GfxColor *  colors,
int  depth 
)
private

◆ doGouraudTriangleShFill()

void PdfParser::doGouraudTriangleShFill ( GfxGouraudTriangleShading *  shading)
private

Definition at line 1762 of file pdf-parser.cpp.

References gouraudFillTriangle().

Referenced by doShadingPatternFillFallback(), and opShFill().

◆ doImage()

void PdfParser::doImage ( Object *  ref,
Stream *  str,
GBool  inlineImg 
)
private

Referenced by doShowText().

◆ doPatchMeshShFill()

void PdfParser::doPatchMeshShFill ( GfxPatchMeshShading *  shading)
private

Definition at line 1824 of file pdf-parser.cpp.

References fillPatch(), and start.

Referenced by doShadingPatternFillFallback(), and opShFill().

◆ doPatternFillFallback()

void PdfParser::doPatternFillFallback ( GBool  eoFill)
private

Definition at line 1464 of file pdf-parser.cpp.

References doShadingPatternFillFallback(), getPos(), and state.

Referenced by doFillAndStroke(), opEOFill(), and opFill().

◆ doPatternStrokeFallback()

void PdfParser::doPatternStrokeFallback ( )
private

Definition at line 1483 of file pdf-parser.cpp.

References doShadingPatternFillFallback(), getPos(), and state.

Referenced by doFillAndStroke(), opCloseStroke(), and opStroke().

◆ doShadingPatternFillFallback()

void PdfParser::doShadingPatternFillFallback ( GfxShadingPattern *  sPat,
GBool  stroke,
GBool  eoFill 
)
private

◆ doShowText() [1/2]

void PdfParser::doShowText ( const GooString *  s)
private

Optional content groups are often used in ai files, but not always and can be useful ways of collecting objects.

Load the internal ICC profile from the PDF file.

Definition at line 2262 of file pdf-parser.cpp.

References _pdf_doc, Inkscape::Extension::Internal::SvgBuilder::addChar(), Inkscape::Extension::Internal::SvgBuilder::addColorProfile(), Inkscape::Extension::Internal::SvgBuilder::addImage(), Inkscape::Extension::Internal::SvgBuilder::addImageMask(), Inkscape::Extension::Internal::SvgBuilder::addMaskedImage(), Inkscape::Extension::Internal::SvgBuilder::addOptionalGroup(), Inkscape::Extension::Internal::SvgBuilder::addSoftMaskedImage(), baseMatrix, Inkscape::Extension::Internal::SvgBuilder::beginLayer(), Inkscape::Extension::Internal::SvgBuilder::beginMarkedContent(), Inkscape::Extension::Internal::SvgBuilder::beginString(), build_annots(), builder, buildImageStream(), colorDeltas, doForm(), doForm1(), doImage(), doShowText(), Inkscape::Extension::Internal::SvgBuilder::endLayer(), Inkscape::Extension::Internal::SvgBuilder::endMarkedContent(), Inkscape::Extension::Internal::SvgBuilder::endString(), Inkscape::Extension::Internal::SvgBuilder::finishGroup(), formDepth, getDictString(), getPos(), height, ignoreUndef, invert(), label, len, loadColorProfile(), loadOptionalContentLayers(), lookupColorSpaceCopy(), maxDepths, name, offset, opBeginIgnoreUndef(), opBeginImage(), opBeginMarkedContent(), opEndIgnoreUndef(), opEndImage(), opEndMarkedContent(), opImageData(), opMarkPoint(), opSetCacheDevice(), opSetCharWidth(), opXObject(), parse(), parser, popResources(), printCommands, props, pushResources(), ref, res, restoreState(), Inkscape::Extension::Internal::SvgBuilder::restoreState(), saveState(), Inkscape::Extension::Internal::SvgBuilder::saveState(), setApproximationPrecision(), Inkscape::Extension::Internal::SvgBuilder::setClip(), setDefaultApproximationPrecision(), Inkscape::Extension::Internal::SvgBuilder::setGroupOpacity(), Inkscape::Extension::Internal::SvgBuilder::startGroup(), state, stateToAffine(), visible, width, and xref.

Referenced by doShowText(), opMoveSetShowText(), opMoveShowText(), opShowSpaceText(), and opShowText().

◆ doShowText() [2/2]

void PdfParser::doShowText ( GooString *  s)
private

◆ doSoftMask()

void PdfParser::doSoftMask ( Object *  str,
GBool  alpha,
GfxColorSpace *  blendingColorSpace,
GBool  isolated,
GBool  knockout,
Function *  transferFunc,
GfxColor *  backdropColor 
)
private

Definition at line 869 of file pdf-parser.cpp.

References doForm1(), formDepth, and getPos().

Referenced by opSetExtGState().

◆ doUpdateFont()

◆ execOp()

void PdfParser::execOp ( Object *  cmd,
Object  args[],
int  numArgs 
)
private

◆ fillPatch()

void PdfParser::fillPatch ( _POPPLER_CONST GfxPatch *  patch,
int  nComps,
int  depth 
)
private

◆ findOp()

PdfOperator * PdfParser::findOp ( const char *  name)
private

Definition at line 564 of file pdf-parser.cpp.

References cmp(), name, and opTab.

Referenced by execOp().

◆ getFontEngine()

std::shared_ptr< CairoFontEngine > PdfParser::getFontEngine ( )

Definition at line 2157 of file pdf-parser.cpp.

References _font_engine.

Referenced by doUpdateFont().

◆ getPos()

◆ getPreviousOperator()

const char * PdfParser::getPreviousOperator ( unsigned int  look_back = 1)
private

Definition at line 499 of file pdf-parser.cpp.

References OpHistoryEntry::name, OpHistoryEntry::next, and operatorHistory.

◆ getState()

GfxState * PdfParser::getState ( )
inline

Definition at line 132 of file pdf-parser.h.

References state.

Referenced by Inkscape::Extension::Internal::SvgBuilder::_createTilingPattern().

◆ go()

void PdfParser::go ( GBool  topLevel)
private

Definition at line 400 of file pdf-parser.cpp.

References execOp(), getPos(), parser, and printCommands.

Referenced by parse().

◆ gouraudFillTriangle()

void PdfParser::gouraudFillTriangle ( double  x0,
double  y0,
GfxColor *  color0,
double  x1,
double  y1,
GfxColor *  color1,
double  x2,
double  y2,
GfxColor *  color2,
int  nComps,
int  depth 
)
private

◆ loadColorProfile()

void PdfParser::loadColorProfile ( )

Referenced by doShowText(), and PdfParser().

◆ loadColorSpaceProfile()

void PdfParser::loadColorSpaceProfile ( GfxColorSpace *  space,
Object *  obj 
)

◆ loadOptionalContentLayers()

void PdfParser::loadOptionalContentLayers ( Dict *  resources)

Referenced by doShowText(), and PdfParser().

◆ loadPatternColorProfiles()

void PdfParser::loadPatternColorProfiles ( Dict *  resources)

◆ lookupColorSpaceCopy()

std::unique_ptr< GfxColorSpace > PdfParser::lookupColorSpaceCopy ( Object &  arg)
private

Get a newly allocated color space instance by CS operation argument.

Maintains a cache for named color spaces to avoid expensive re-parsing.

Definition at line 949 of file pdf-parser.cpp.

References colorSpacesCache, formDepth, name, res, and state.

Referenced by doShowText(), opSetFillColorSpace(), and opSetStrokeColorSpace().

◆ lookupPattern()

std::unique_ptr< GfxPattern > PdfParser::lookupPattern ( Object *  obj,
GfxState *  state 
)

Look up pattern/gradients from the GfxResource dictionary.

Definition at line 980 of file pdf-parser.cpp.

References res, and state.

Referenced by opSetFillColorN(), and opSetStrokeColorN().

◆ opBeginIgnoreUndef()

void PdfParser::opBeginIgnoreUndef ( Object  args[],
int  numArgs 
)
private

Referenced by doShowText().

◆ opBeginImage()

void PdfParser::opBeginImage ( Object  args[],
int  numArgs 
)
private

Referenced by doShowText().

◆ opBeginMarkedContent()

void PdfParser::opBeginMarkedContent ( Object  args[],
int  numArgs 
)
private

Referenced by doShowText().

◆ opBeginText()

void PdfParser::opBeginText ( Object  args[],
int  numArgs 
)
private

◆ opClip()

void PdfParser::opClip ( Object  args[],
int  numArgs 
)
private

Definition at line 1991 of file pdf-parser.cpp.

References clip.

◆ opCloseEOFillStroke()

void PdfParser::opCloseEOFillStroke ( Object  args[],
int  numArgs 
)
private

Definition at line 1433 of file pdf-parser.cpp.

References doEndPath(), doFillAndStroke(), and state.

◆ opCloseFillStroke()

void PdfParser::opCloseFillStroke ( Object  args[],
int  numArgs 
)
private

Definition at line 1408 of file pdf-parser.cpp.

References doEndPath(), doFillAndStroke(), and state.

◆ opClosePath()

void PdfParser::opClosePath ( Object  args[],
int  numArgs 
)
private

Definition at line 1308 of file pdf-parser.cpp.

References getPos(), and state.

◆ opCloseStroke()

void PdfParser::opCloseStroke ( Object  args[],
int  numArgs 
)
private

◆ opConcat()

void PdfParser::opConcat ( Object  args[],
int  numArgs 
)
private

Concatenate transformation matrix to the current state.

Definition at line 622 of file pdf-parser.cpp.

References fontChanged, and state.

◆ opCurveTo()

void PdfParser::opCurveTo ( Object  args[],
int  numArgs 
)
private

Definition at line 1247 of file pdf-parser.cpp.

References getPos(), and state.

◆ opCurveTo1()

void PdfParser::opCurveTo1 ( Object  args[],
int  numArgs 
)
private

Definition at line 1263 of file pdf-parser.cpp.

References getPos(), and state.

◆ opCurveTo2()

void PdfParser::opCurveTo2 ( Object  args[],
int  numArgs 
)
private

Definition at line 1279 of file pdf-parser.cpp.

References getPos(), and state.

◆ opEndIgnoreUndef()

void PdfParser::opEndIgnoreUndef ( Object  args[],
int  numArgs 
)
private

Referenced by doShowText().

◆ opEndImage()

void PdfParser::opEndImage ( Object  args[],
int  numArgs 
)
private

Referenced by doShowText().

◆ opEndMarkedContent()

void PdfParser::opEndMarkedContent ( Object  args[],
int  numArgs 
)
private

Referenced by doShowText().

◆ opEndPath()

void PdfParser::opEndPath ( Object  args[],
int  numArgs 
)
private

Definition at line 1321 of file pdf-parser.cpp.

References doEndPath().

◆ opEndText()

void PdfParser::opEndText ( Object  args[],
int  numArgs 
)
private

◆ opEOClip()

void PdfParser::opEOClip ( Object  args[],
int  numArgs 
)
private

Definition at line 1996 of file pdf-parser.cpp.

References clip.

◆ opEOFill()

void PdfParser::opEOFill ( Object  args[],
int  numArgs 
)
private

◆ opEOFillStroke()

void PdfParser::opEOFillStroke ( Object  args[],
int  numArgs 
)
private

Definition at line 1421 of file pdf-parser.cpp.

References doEndPath(), doFillAndStroke(), and state.

◆ opFill()

void PdfParser::opFill ( Object  args[],
int  numArgs 
)
private

◆ opFillStroke()

void PdfParser::opFillStroke ( Object  args[],
int  numArgs 
)
private

◆ opImageData()

void PdfParser::opImageData ( Object  args[],
int  numArgs 
)
private

Referenced by doShowText().

◆ opLineTo()

void PdfParser::opLineTo ( Object  args[],
int  numArgs 
)
private

Definition at line 1237 of file pdf-parser.cpp.

References getPos(), and state.

◆ opMarkPoint()

void PdfParser::opMarkPoint ( Object  args[],
int  numArgs 
)
private

Referenced by doShowText().

◆ opMoveSetShowText()

void PdfParser::opMoveSetShowText ( Object  args[],
int  numArgs 
)
private

◆ opMoveShowText()

void PdfParser::opMoveShowText ( Object  args[],
int  numArgs 
)
private

◆ opMoveTo()

void PdfParser::opMoveTo ( Object  args[],
int  numArgs 
)
private

Definition at line 1231 of file pdf-parser.cpp.

References state.

◆ opOptionalContentGroup()

void PdfParser::opOptionalContentGroup ( Object  args[],
int  numArgs 
)
private

◆ opRectangle()

void PdfParser::opRectangle ( Object  args[],
int  numArgs 
)
private

Definition at line 1295 of file pdf-parser.cpp.

References state, and w.

◆ opRestore()

void PdfParser::opRestore ( Object  args[],
int  numArgs 
)
private

Definition at line 613 of file pdf-parser.cpp.

References restoreState().

◆ opSave()

void PdfParser::opSave ( Object  args[],
int  numArgs 
)
private

Definition at line 608 of file pdf-parser.cpp.

References saveState().

◆ opSetCacheDevice()

void PdfParser::opSetCacheDevice ( Object  args[],
int  numArgs 
)
private

Referenced by doShowText().

◆ opSetCharSpacing()

void PdfParser::opSetCharSpacing ( Object  args[],
int  numArgs 
)
private

Definition at line 2024 of file pdf-parser.cpp.

References state.

◆ opSetCharWidth()

void PdfParser::opSetCharWidth ( Object  args[],
int  numArgs 
)
private

Referenced by doShowText().

◆ opSetDash()

void PdfParser::opSetDash ( Object  args[],
int  numArgs 
)
private

◆ opSetExtGState()

void PdfParser::opSetExtGState ( Object  args[],
int  numArgs 
)
private

Definition at line 694 of file pdf-parser.cpp.

References doSoftMask(), getPos(), mode, printCommands, res, and state.

◆ opSetFillCMYKColor()

void PdfParser::opSetFillCMYKColor ( Object  args[],
int  numArgs 
)
private

◆ opSetFillColor()

void PdfParser::opSetFillColor ( Object  args[],
int  numArgs 
)
private

◆ opSetFillColorN()

void PdfParser::opSetFillColorN ( Object  args[],
int  numArgs 
)
private

◆ opSetFillColorSpace()

void PdfParser::opSetFillColorSpace ( Object  args[],
int  numArgs 
)
private

◆ opSetFillGray()

void PdfParser::opSetFillGray ( Object  args[],
int  numArgs 
)
private

◆ opSetFillRGBColor()

void PdfParser::opSetFillRGBColor ( Object  args[],
int  numArgs 
)
private

◆ opSetFlat()

void PdfParser::opSetFlat ( Object  args[],
int  numArgs 
)
private

Definition at line 656 of file pdf-parser.cpp.

References state.

◆ opSetFont()

void PdfParser::opSetFont ( Object  args[],
int  numArgs 
)
private

Definition at line 2030 of file pdf-parser.cpp.

References fontChanged, printCommands, res, and state.

◆ opSetHorizScaling()

void PdfParser::opSetHorizScaling ( Object  args[],
int  numArgs 
)
private

◆ opSetLineCap()

void PdfParser::opSetLineCap ( Object  args[],
int  numArgs 
)
private

◆ opSetLineJoin()

void PdfParser::opSetLineJoin ( Object  args[],
int  numArgs 
)
private

◆ opSetLineWidth()

void PdfParser::opSetLineWidth ( Object  args[],
int  numArgs 
)
private

◆ opSetMiterLimit()

void PdfParser::opSetMiterLimit ( Object  args[],
int  numArgs 
)
private

◆ opSetRenderingIntent()

void PdfParser::opSetRenderingIntent ( Object  args[],
int  numArgs 
)
private

Definition at line 936 of file pdf-parser.cpp.

◆ opSetStrokeCMYKColor()

void PdfParser::opSetStrokeCMYKColor ( Object  args[],
int  numArgs 
)
private

◆ opSetStrokeColor()

void PdfParser::opSetStrokeColor ( Object  args[],
int  numArgs 
)
private

◆ opSetStrokeColorN()

void PdfParser::opSetStrokeColorN ( Object  args[],
int  numArgs 
)
private

◆ opSetStrokeColorSpace()

void PdfParser::opSetStrokeColorSpace ( Object  args[],
int  numArgs 
)
private

◆ opSetStrokeGray()

void PdfParser::opSetStrokeGray ( Object  args[],
int  numArgs 
)
private

◆ opSetStrokeRGBColor()

void PdfParser::opSetStrokeRGBColor ( Object  args[],
int  numArgs 
)
private

◆ opSetTextLeading()

void PdfParser::opSetTextLeading ( Object  args[],
int  numArgs 
)
private

Definition at line 2061 of file pdf-parser.cpp.

References state.

◆ opSetTextMatrix()

void PdfParser::opSetTextMatrix ( Object  args[],
int  numArgs 
)
private

◆ opSetTextRender()

void PdfParser::opSetTextRender ( Object  args[],
int  numArgs 
)
private

◆ opSetTextRise()

void PdfParser::opSetTextRise ( Object  args[],
int  numArgs 
)
private

Definition at line 2075 of file pdf-parser.cpp.

References state.

◆ opSetWordSpacing()

void PdfParser::opSetWordSpacing ( Object  args[],
int  numArgs 
)
private

Definition at line 2081 of file pdf-parser.cpp.

References state.

◆ opShFill()

void PdfParser::opShFill ( Object  args[],
int  numArgs 
)
private

◆ opShowSpaceText()

void PdfParser::opShowSpaceText ( Object  args[],
int  numArgs 
)
private

◆ opShowText()

void PdfParser::opShowText ( Object  args[],
int  numArgs 
)
private

Definition at line 2173 of file pdf-parser.cpp.

References doShowText(), doUpdateFont(), getPos(), getString(), and state.

◆ opStroke()

void PdfParser::opStroke ( Object  args[],
int  numArgs 
)
private

◆ opTextMove()

void PdfParser::opTextMove ( Object  args[],
int  numArgs 
)
private

◆ opTextMoveSet()

void PdfParser::opTextMoveSet ( Object  args[],
int  numArgs 
)
private

◆ opTextNextLine()

void PdfParser::opTextNextLine ( Object  args[],
int  numArgs 
)
private

◆ opXObject()

void PdfParser::opXObject ( Object  args[],
int  numArgs 
)
private

Referenced by doShowText().

◆ parse()

void PdfParser::parse ( Object *  obj,
GBool  topLevel = gTrue 
)

Definition at line 377 of file pdf-parser.cpp.

References go(), parser, and xref.

Referenced by Inkscape::Extension::Internal::SvgBuilder::_createTilingPattern(), and doShowText().

◆ popOperator()

OpHistoryEntry * PdfParser::popOperator ( )
private

◆ popResources()

void PdfParser::popResources ( )
private

Referenced by doShowText(), and ~PdfParser().

◆ pushOperator()

void PdfParser::pushOperator ( const char *  name)
private

◆ pushResources()

void PdfParser::pushResources ( Dict *  resDict)
private

Referenced by doShowText().

◆ restoreState()

void PdfParser::restoreState ( )

◆ saveState()

void PdfParser::saveState ( )

◆ setApproximationPrecision()

void PdfParser::setApproximationPrecision ( int  shadingType,
double  colorDelta,
int  maxDepth 
)

Referenced by doShowText().

◆ setDefaultApproximationPrecision()

void PdfParser::setDefaultApproximationPrecision ( )
private

Referenced by doShowText(), PdfParser(), and PdfParser().

Member Data Documentation

◆ _font_engine

std::shared_ptr<CairoFontEngine> PdfParser::_font_engine
private

Definition at line 149 of file pdf-parser.h.

Referenced by getFontEngine().

◆ _pdf_doc

std::shared_ptr<PDFDoc> PdfParser::_pdf_doc
private

Definition at line 148 of file pdf-parser.h.

Referenced by doShowText(), and doUpdateFont().

◆ baseMatrix

Geom::Affine PdfParser::baseMatrix
private

Definition at line 161 of file pdf-parser.h.

Referenced by doShadingPatternFillFallback(), doShowText(), PdfParser(), and PdfParser().

◆ builder

◆ clip

GfxClipType PdfParser::clip
private

Definition at line 159 of file pdf-parser.h.

Referenced by doEndPath(), opClip(), and opEOClip().

◆ colorDeltas

int PdfParser::colorDeltas[pdfNumShadingTypes]
private

Definition at line 169 of file pdf-parser.h.

Referenced by doFunctionShFill1(), doShowText(), fillPatch(), and gouraudFillTriangle().

◆ colorSpacesCache

std::map<std::string, std::unique_ptr<GfxColorSpace> > PdfParser::colorSpacesCache
private

Caches color spaces by name.

Definition at line 177 of file pdf-parser.h.

Referenced by lookupColorSpaceCopy().

◆ fontChanged

GBool PdfParser::fontChanged
private

◆ formDepth

int PdfParser::formDepth
private

Definition at line 163 of file pdf-parser.h.

Referenced by doShowText(), doSoftMask(), lookupColorSpaceCopy(), PdfParser(), and PdfParser().

◆ ignoreUndef

int PdfParser::ignoreUndef
private

Definition at line 160 of file pdf-parser.h.

Referenced by doShowText(), and execOp().

◆ maxDepths

int PdfParser::maxDepths[pdfNumShadingTypes]
private

Definition at line 172 of file pdf-parser.h.

Referenced by doFunctionShFill1(), doShowText(), fillPatch(), and gouraudFillTriangle().

◆ operatorHistory

OpHistoryEntry* PdfParser::operatorHistory
private

Definition at line 174 of file pdf-parser.h.

Referenced by getPreviousOperator(), pushOperator(), and ~PdfParser().

◆ opTab

PdfOperator PdfParser::opTab
staticprivate

Definition at line 80 of file pdf-parser.h.

Referenced by findOp().

◆ parser

Parser* PdfParser::parser
private

Definition at line 165 of file pdf-parser.h.

Referenced by doShowText(), getPos(), go(), and parse().

◆ printCommands

GBool PdfParser::printCommands
private

Definition at line 154 of file pdf-parser.h.

Referenced by doShowText(), go(), opSetExtGState(), and opSetFont().

◆ res

GfxResources* PdfParser::res
private

◆ state

◆ subPage

GBool PdfParser::subPage
private

Definition at line 153 of file pdf-parser.h.

Referenced by doUpdateFont(), opSetHorizScaling(), opSetTextMatrix(), and ~PdfParser().

◆ xref

XRef* PdfParser::xref
private

Definition at line 151 of file pdf-parser.h.

Referenced by doShowText(), doUpdateFont(), and parse().


The documentation for this class was generated from the following files: