PDFsharp & MigraDoc Foundation https://forum.pdfsharp.net/ |
|
Error when dict contains hexstring or nested dict + patch https://forum.pdfsharp.net/viewtopic.php?f=3&t=3449 |
Page 1 of 1 |
Author: | Gerben Vos [ Thu Sep 08, 2016 7:39 pm ] | ||||
Post subject: | Error when dict contains hexstring or nested dict + patch | ||||
PdfSharp does not do a full parse of dictionaries that occur in content streams, but instead just scans for the next '>' character. This fails if the dictionary contains nested dictionaries (delimited by << >>), or hexadecimal strings (delimited by < >). Depending on the exact syntax in the content stream, this can result in these error messages: - The given key was not present in the dictionary. (origami.pdf) - Unexpected character '0x003e' in content stream. (found in confidential client PDFs only, sorry) - Array within array... (SmoothShading.pdf) Resolved by implementing a more thorough scanning of the dictionary. It should really be fixed by doing a proper recursive parse instead of a scan, but that would require more drastic changes to the library. Patch attached.
|
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |