I try to use .dll library in VBA to create pdf from csv-data using MS Excell. Because I need cyrilic symbols I try to load TTF or AFM font (TrueType1 or Type1):
Dim font_name As String
Dim font As Long
' Type 1
font_name = HPDF_LoadType1FontFromFile(ByVal pdf, ByVal "D:\libharu\arial.afm", ByVal "D:\libharu\arial.pfb")
' or TTF1
'font_name = HPDF_LoadTTFontFromFile(pdf, ByVal "c:\windows\fonts\arial.ttf", HPDF_TRUE)
font = HPDF_GetFont(pdf, ByVal font_name, "CP1251")
Thees cause an error (7) Out of memory. What I do wrong?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I try to use .dll library in VBA to create pdf from csv-data using MS Excell. Because I need cyrilic symbols I try to load TTF or AFM font (TrueType1 or Type1):
Dim font_name As String
Dim font As Long
' Type 1
font_name = HPDF_LoadType1FontFromFile(ByVal pdf, ByVal "D:\libharu\arial.afm", ByVal "D:\libharu\arial.pfb")
' or TTF1
'font_name = HPDF_LoadTTFontFromFile(pdf, ByVal "c:\windows\fonts\arial.ttf", HPDF_TRUE)
font = HPDF_GetFont(pdf, ByVal font_name, "CP1251")
Thees cause an error (7) Out of memory. What I do wrong?