[Podofo-users] PoDoFo fonts cmaps "override"

2019-11-03 Thread Pietro Paolini
Hi everybody, From time to time I come across PDFs whose fonts are broken and that I cannot paste from. I think this has to do with their cmaps and I am wondering if there is an example somewhere (if this is possible at all) where a document's font is amended, that is, its cmap is altered and

Re: [Podofo-users] PoDoFo fonts cmaps "override"

2019-11-04 Thread Clayton Wheeler
In general, what you'd need to do is to generate a new ToUnicode CMap; see section 9.10 of the PDF spec, there's an optional ToUnicode entry in the font dictionary. The tricky part is figuring out what the new CMap should contain, since that's going to be specific to the encoding problem you're enc

Re: [Podofo-users] PoDoFo fonts cmaps "override"

2019-11-04 Thread zyx
On Sun, 2019-11-03 at 22:40 +, Pietro Paolini wrote: > In PoDoFo terminology it seems that I'd need to create my own > PdfEncoding subclass and assign it to a font somehow, but I haven't > found any example. > > Is this possible at all ? Hi, what is the PoDoFo version you use, please?

Re: [Podofo-users] PoDoFo fonts cmaps "override"

2019-11-05 Thread Pietro Paolini
Hi zyx, I think I am one commit behind the server's trunk. I can't tell of any bug as the mechanics are not clear to me well enough to understand how I am supposed to do what I want to do. I will try the suggestion Clayton gave me (and thanks A LOT for that) and report back if I found any iss