summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/fpdf_parser_utility.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/parser/fpdf_parser_utility.h')
-rw-r--r--core/fpdfapi/parser/fpdf_parser_utility.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/fpdfapi/parser/fpdf_parser_utility.h b/core/fpdfapi/parser/fpdf_parser_utility.h
index eb8442ac68..5e764ad07b 100644
--- a/core/fpdfapi/parser/fpdf_parser_utility.h
+++ b/core/fpdfapi/parser/fpdf_parser_utility.h
@@ -34,7 +34,13 @@ inline bool PDFCharIsLineEnding(uint8_t c) {
return c == '\r' || c == '\n';
}
+constexpr int32_t kInvalidHeaderOffset = -1;
+
+// On success, return a positive offset value to the PDF header.. If the header
+// cannot be found, or if there is an error reading from |pFile|, then return
+// |kInvalidHeaderOffset|.
int32_t GetHeaderOffset(const CFX_RetainPtr<IFX_SeekableReadStream>& pFile);
+
int32_t GetDirectInteger(CPDF_Dictionary* pDict, const CFX_ByteString& key);
CFX_ByteTextBuf& operator<<(CFX_ByteTextBuf& buf, const CPDF_Object* pObj);