The error occured using jagPDF and some TTF font.
Below is my test code.
---------------------------------------------------------------
import jagpdf
doc = jagpdf.create_file("test.pdf")
doc.page_start(597.6, 848.68)
Font = doc.font_load( "file=gulim.ttf; size=20; enc=utf-8" )
doc.page().canvas().text_font(Font)
doc.page().canvas().text(100, 800, u'\uac00\ub098\ub2e4\ub77c')
doc.page_end()
doc.finalize()
---------------------------------------------------------------
Below is error Message.
---------------------------------------------------------------
Traceback (most recent call last):
File "D:\prj\secu\TestWork\dbgrandom\t.py", line 15, in <module>
doc.finalize()
File "C:\devtool\python25\Lib\site-packages\jagpdf.py", line 73, in finalize
def finalize(*args): return _jagpdf.Document_finalize(*args)
jagpdf.Exception: 04-2001a Checksum of TrueType font table failed.
---------------------------------------------------------------
Other than "gulim.ttf" don't make this error.
gulim.ttf is widely used as default font for Korean in Linux
distribution - debian, ubuntu, fedora.
Also, this works well with PIL, reportlab.
gulim.ttf can be obtained from
http://kldp.net/projects/baekmuk/download/1429?filename=baekmuk-ttf-2.2.tar.gz
develop environment : XP SP3, python 2.5.4, jagPDF 1.4.0
regards..
Hi,
I have already seen this problem with a couple of other fonts. My
assumption is that most applications simply ignore checksums in ttf. I
have already disabled checksum verification in the JagPDF development
branch[1] so the next version should work with these fonts.
Unfortunately, there is not much you can do about this problem right
now unless you are willing to build JagPDF from the latest source. A
provisional (untested) solution could be to run a Microsoft tool
called FastFont[2] on gulim.ttf - that could fix the checksums.
regards,
--
Jarda
[1] http://github.com/jgresula/jagpdf/commit/9f8659962bdc695c309f5709611e7d7505ab7562
[2] http://www.microsoft.com/typography/tools/tools.aspx