Obj type3GlyphStream = font.GetType3GlyphStream(charData.char_code);
if (type3GlyphStream != null) {
using (var reader = new ElementReader()) {
reader.Begin(type3GlyphStream);
Element el;
while ((el = reader.Next()) != null) {
// fails while iterating
}
reader.End();
}
The problem is that you Type3 content stream is referencing resources (e.g. R13 ExtGState) that is stored in the parent page resource dictionary (i.e. not within Type3 resource dictionary). To fix this you can pass page resource dictionary as the second param to ElementReader.Begin(). For example:
ElementReader.Begin(type3GlyphStream, parent_page.GetResourceDict());