7 #ifndef PDF_CONTENT_READER_H
8 #define PDF_CONTENT_READER_H
10 #include "PdfXObject.h"
11 #include "PdfCanvas.h"
13 #include "PdfDictionary.h"
14 #include "PdfVariantStack.h"
15 #include "PdfPostScriptTokenizer.h"
50 PdfVariantStack Stack;
56 std::shared_ptr<const PdfXObject> XObject;
73 struct PODOFO_API PdfContentReaderArgs final
102 bool tryHandleOperator(
PdfContent& content,
bool& eof);
104 bool tryReadInlineImgDict(
PdfContent& content);
106 bool tryReadInlineImgData(
charbuff& data);
110 void handleWarnings();
112 bool isCalledRecursively(
const PdfObject* xobj);
125 std::shared_ptr<const PdfXObject> Form;
126 std::shared_ptr<InputStreamDevice> Device;
131 std::vector<Input> m_inputs;
132 PdfContentReaderArgs m_args;
133 std::shared_ptr<charbuff> m_buffer;
135 bool m_readingInlineImgData;
A interface that provides the necessary features for a painter to draw onto a PdfObject.
Definition: PdfCanvas.h:28
Reader class to read content streams.
Definition: PdfContentStreamReader.h:82
The PDF dictionary data type of PoDoFo (inherits from PdfDataContainer, the base class for such repre...
Definition: PdfDictionary.h:82
This class represents a PdfName.
Definition: PdfName.h:24
This class represents a PDF indirect Object in memory.
Definition: PdfObject.h:35
This class is a parser for general PostScript content in PDF documents.
Definition: PdfPostScriptTokenizer.h:30
A variant data type which supports all data types supported by the PDF standard.
Definition: PdfVariant.h:33
Convenient type for char array storage and/or buffer with std::string compatibility.
Definition: basetypes.h:38
Alternative to std::optional that supports reference (but not pointer) types.
Definition: nullable.h:29
SPDX-FileCopyrightText: (C) 2022 Francesco Pretto ceztko@gmail.com SPDX-License-Identifier: LGPL-2....
Definition: basetypes.h:16
PdfContentReaderFlags
Definition: PdfContentStreamReader.h:60
@ SkipFollowFormXObjects
Don't follow Form XObject.
@ SkipHandleNonFormXObjects
Don't handle non Form XObjects (PdfImage, PdfXObjectPostScript). Doesn't influence traversing of Form...
PdfContentWarnings
Definition: PdfContentStreamReader.h:34
@ MissingEndImage
Missing end inline image EI operator.
@ RecursiveXObject
Recursive XObject call detected. Applies to DoXObject.
@ InvalidOperator
Unknown operator or insufficient operand count. Applies to Operator.
@ InvalidXObject
Invalid or not found XObject.
@ InvalidImageDictionaryContent
Found invalid content while reading inline image dictionary. Applies to ImageDictionary.
@ SpuriousStackContent
Operand count for the operator are more than necessary.
@ Name
Name datatype. Names are used as keys in dictionary to reference values.
PdfContentType
Type of the content read from a content stream.
Definition: PdfContentStreamReader.h:22
@ ImageData
Raw inline image data found between ID and EI tags (see PDF ref section 4.8.6)
@ UnexpectedKeyword
An unexpected keyword that can be a custom operator or invalid PostScript content
@ DoXObject
Issued when a Do operator is found and it is handled by the reader. NOTE: for Form XObjects BeginForm...
@ EndFormXObject
Issued when a Form XObject has just been followed.
@ ImageDictionary
Inline image dictionary.
@ BeginFormXObject
Issued when a Form XObject is being followed.
@ Operator
The token is a PDF operator.
PdfOperator
List of PDF stream content operators.
Definition: PdfDeclarations.h:690
@ None
Do not add a default appearrance.
PdfPostScriptTokenType
An enum describing the type of a read token.
Definition: PdfPostScriptTokenizer.h:19
@ Keyword
The token is a PDF keyword.
@ Variant
The token is a PDF variant. A variant is usually a parameter to a keyword.
std::function< bool(const PdfDictionary &imageDict, InputStreamDevice &device)> PdfInlineImageHandler
Custom handler for inline images.
Definition: PdfContentStreamReader.h:71
Content as read from content streams.
Definition: PdfContentStreamReader.h:47