常见问题:TFORMer SDK
如何使用 Python 打印 TFORMer 报表?
如何使用 Python 打印 TFORMer 报表?
要使用 Python 打印 TFORMer 报表,可以参考以下示例脚本:
from ctypes import *
FormFile = "c:/pathto/formfile.tff"
DataFile = "c:/pathto/importdata.csv"
TF_dll = oledll.LoadLibrary("TFormer8.dll")
TF_dll.TFormer_LicenseMe("Your Licensee Name ", 4, 1,"Your Key" )
htform = TF_dll.TFormer_Init(0)
rm = TF_dll.TFormer_SetRepositoryName(htform, FormFile)
rm = TF_dll.TFormer_ResetData(htform)
rm = TF_dll.TFormer_SetTxtDataFile(htform, DataFile, c_char(","), c_char(" "))
rm = TF_dll.TFormer_SetCopies(htform,1)
rm = TF_dll.TFormer_SetStartPosition(htform, 1, 0)
rm = TF_dll.TFormer_SetPrinter(htform, "", 0)
rm = TF_dll.TFormer_PrintForm(htform)
print 'finished'