TCPDF icon indicating copy to clipboard operation
TCPDF copied to clipboard

Question: created pdf file font resources in the absence of ToUnicode map

Open tayei1997 opened this issue 11 months ago • 3 comments

Hello, I got a pdf file and through its Info I found your website and came here through the website. There seems to be no ToUnicode map in this pdf file, I would like to ask if I didn't find it or it's really not there. If not, then how do you do the font to CID conversion?

The documents are as follows: sample1.pdf

tayei1997 avatar Mar 13 '24 07:03 tayei1997

As discussed in the PoDoFo issue, the PDF is using the predefined CMap /Encoding /UniGB-UCS2-H, as enlisted in section "9.7.5.2 Predefined CMaps" of ISO 32000-2, which should resolve to an external ToUnicode map. I believe it's an old feature of PDF because now the recommend approach for PDF authoring is having all required the CMap(s) embedded in the PDF (subsetting allows to mantain them small).

ceztko avatar Mar 21 '24 10:03 ceztko

So what you are saying is that the way this file uses CMap is an older way? I have also tried to extract this file using poppler and again it ended in failure.

tayei1997 avatar Mar 21 '24 11:03 tayei1997

It's a supported PDF feature and it's not going to be deprecated, but PDF/A profiles prohibit from using it (PDA/1-B ISO 19005-1 "6.3.3.1 All CMaps used within a conforming file, except Identity-H and Identity-V, shall be embedded in that file as described in PDF Reference 5.6.4"), so if there are preservation concerns for the PDF it's not recommended to use it.

ceztko avatar Mar 21 '24 12:03 ceztko