On Thu, 2020-03-19 at 17:26 +0100, Michal Sudolsky wrote: > Is text extraction considered rendering?
Hi, no, text extracting is not considered rendering, it's not that far from it, but it's just reading. I've been missing this in the context you gave. > This is actually not about > missing widths. PdfMemDocument::GetFont throws exception on such > font: > > PODOFO_RAISE_ERROR_INFO( ePdfError_NoObject, "Font object defines > neither Widths, nor MissingWidth values!" ); > > So if such font is used on some page podofo text extractor would > throw (I did not check whether mentioned pdf uses this font on page, > but it uses it with acroforms). Podofo refuses to "load" such font > which is needed to decode text which uses this font. I see. It sounds like one more place where PoDoFo is too strict. Would it suffice to relax the throw here (maybe following the strict parsing option) and let the caller decide whether missing widths are any problem or not? It can cause trouble later, probably, on places where PoDoFo itself would need to access them for some reason, but that can be covered better than just refusing to load the whole document, right? > Of course almost everything what is podofo doing wrong can be fixed > using podofo low level api and do these things better. Anyone can > create own better PdfMemDocument based on rest of project. But this > will not fix podofo text extractor tool for example. Right. I didn't mean my rant to go that far, I'm sorry if it sounded like that. The higher API should work as much as possible, there's no doubt for it, the same as the higher API should not block the lower API usage (which happens here). If you can, I'm fine to commit any patches for this you might propose. I'm slightly behind my "schedule", I didn't have time to look on the pending changes (Francesco, your and some others; (I track your pending recent patches, they seem easy to just commit, I'll comment on them after the giant change)) the last week due to some personal reasons, and even I didn't promise an exact date, I still feel like I failed here. I may check the patches semi-soon, unless someone else will be quicker. Thank you for your patience. Bye, zyx _______________________________________________ Podofo-users mailing list Podofo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/podofo-users