On lör, 2017-07-29 at 18:25 +0200, Albert Astals Cid wrote: > El dimarts, 4 de juliol de 2017, a les 12:07:19 CEST, Jan-Erik S va escriure: > > Hi! > > Here is a patch I made (against 0.54.0 - but it applies cleanly to > > 0.56.0) to handle pdfs that use unknown type names. > > Globalparams is bad, adding more stuff there is not wanted. > > Also can you please explain why we should do that and ideally attach a pdf > that needs it? > > Cheers, > Albert
I added the stuff to Globalparams to avoid changing default behaviour, but the last part of this patch (StructElement.cc) is needed to be able to handle broken PDF:s in a reasonable manner. The StructTree is needed to do that and the present strategy leads to it being unavailable. I am regretfully not at liberty to distribute the pdf that triggered this problem, but it is triggered by a pdf that use an unknown StructElem type name without providing a mapping to something known in RoleMap. The patch simply provides a default mapping to the known type Part in this situation (and produce an informative warning saying so). Regards, Jan-Erik _______________________________________________ poppler mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/poppler
