Multiple improvments :

* nextToken() can return comments if needed (used for %%EOF)
  * Handle object after %%EOF without line return
  * Handle trailer without xref
  * Handle parenthesis in string objects
  * Fix error on stream parsing (fallback to big chunk read)
This commit is contained in:
2021-09-28 14:35:45 +02:00
parent 7f2a84c10c
commit ea551b6f52
2 changed files with 89 additions and 44 deletions

View File

@@ -81,10 +81,10 @@ namespace uPDFParser
private:
void parseObject(std::string& token);
void parseStartXref();
void parseXref();
void parseTrailer();
bool parseXref();
bool parseTrailer();
std::string nextToken(bool exceptionOnEOF=true);
std::string nextToken(bool exceptionOnEOF=true, bool readComment=false);
DataType* parseType(std::string& token, Object* object, std::map<std::string, DataType*>& dict);
void parseDictionary(Object* object, std::map<std::string, DataType*>& dict);