Problem with copying text from purepdf-generated PDF

78 views
Skip to first unread message

jakub

unread,
Jul 20, 2012, 11:36:33 AM7/20/12
to purepdf...@googlegroups.com
Hello, I am trying to create PDF document in Czech language (with local characters like ěščřžýáíé... (CP1250)).
I have succesfully created PDF with all characters appearing correctly, using IDENTITY_H encoding:

var bf: BaseFont = BaseFont.createFont("Roboto-Regular.ttf", BaseFont.IDENTITY_H, BaseFont.EMBEDDED );

But problem is that when I try to select + copy (ctrl+c) some text from PDF and then paste it somewhere, I see just empty squares instead of characters.
So far I figured out that it has probably something to do with CMAPS, as seen in ChineseKoreanJapanese.as example.
I think that I have to add code similar this:

var map: ICMap = new CMap( new CMap.UniGB_UCS2_H() );
CMapResourceFactory.getInstance().registerCMap( BaseFont.UniGB_UCS2_H, map );

but with something else than  UniGB_UCS2_H - but what?
Thanks,
Jakub 


Reply all
Reply to author
Forward
0 new messages