翻譯|使用教程|編輯:黃竹雯|2019-04-29 13:13:50.000|閱讀 321 次
概述:TFORMer SDK能夠自動化打印和導出規范報表和標簽。介于各版本的編程接口,TFORMer SDK可輕松地集成到您的應用程序。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
TFORMer能提供專業的打印方案,用于大多數應用程序中,如:報告,標簽,郵件,商業窗體等等。TFORMer能滿足您的標簽應用程序, 條形碼,和其他報表以及窗體打印的需要。
TFORMer SDK能夠自動化打印和導出規范報表和標簽。介于各版本的編程接口,TFORMer SDK可輕松地集成到您的應用程序。
TFORMer V7.5.20 +
使用標準的EXE安裝程序,可以公開下載。您可以使用特定功能選項選擇要安裝的功能 - 例如,如果您只想安裝.NET組件并以安靜模式運行tfprint,請按以下方式運行安裝:
TFORMer_SDK.exe / quiet FeatTemplates = 0 FeatCmdLine = 1 FeatDLL = 0 FeatCOM = 0 FeatNET = 1 FeatJava = 0 FeatQuickPrint = 0 FeatDocu = 0
可選:添加參數InstallFolder = C:\ MyInstallDir以安裝到特定目錄中。您還可以使用InstallVCRuntime = 0禁止安裝VC ++ Runtime
Ps:安裝程序包含32位和64位組件,這些組件根據目標Windows版本自動選擇。默認情況下,安裝程序從Microsoft下載Visual C ++ Redistributable,如果目標系統上不存在,則安裝它?;蛘?,如果沒有下載連接,您可以將vc_redist.x86.exe和vc_redist.x64.exe(必須是V14.0.24215!)復制到設置路徑中。
存儲庫中的數據字段
Repository repository = new Repository ("C:\\Path\\Labels.tfr", false, false); Project project = repository.GetProject("BarcodeLabels"); FormLayout formlayout = project.GetFormLayout("Label1"); // iterate through all DataFields in the project for (DataField field = project.FirstDataField; field != null; field = field.Next) { // check if the DataField is used in the FormLayout DataFieldUsage usage = formlayout.GetDataFieldUsage(field.Name); if (usage == DataFieldUsage.Normal) { // DataField used in the FormLayout } }
TFF中的數據字段
// create a Repository-instance using a stand-alone FormLayout Repository repo = new Repository("C:\\Path\\Label.tff", false, false); // retrieves the global project Project project = repo.GlobalProject; // retrieves the one and only FormLayout (stand-alone form) FormLayout formlayout = project.FirstFormLayout; // retrieving the data fields: // use the same code as with the repository (see above)
TFORMer .NET
// record set data source DataSourceRecordSet recordSet = new DataSourceRecordSet(); Record record = new Record(); record.NumberOfCopies = 10; recordSet.Records.Add(record); // CSV, ODBC and other data sources DataSourceCsv dsCsv = new DataSourceCsv(csvFile, ',', '"'); Job printJob = new TECIT.TFORMer.Job(); printJob.DataSource = dsCsv; printJob.RecordCopyDataField = "Copies";
以下示例代碼顯示如何將CSV導入與TFF布局文件中定義的CSV數據源一起使用(使用TFORMer Designer)。
TFORMer Java API
// create new job job = new Job(); File file = new File ("c:\\Temp\\MyTemplate.tff"); job.setRepositoryName(file.getAbsolutePath()); // Select the Data Source named 'ImportFromCSV' (defined in the Form Layout) JobDataDataSource jobData = new JobDataDataSource ("ImportFromCSV"); // Set the Data Source Parameter named 'parFilePath' jobData.setParameterValues ("parFilePath", "C:\\Temp\\myImportFile.csv"); // Set the output format: // e.g. EPrinterType.PDFFile, EPrinterType.ZPLFile, EPrinterType.ImagePng job.setPrinterType(EPrinterType.PDFFile); // Output file name job.setOutputName(System.getProperty("user.dir") + File.separator + "MyLabel.PDF"); System.out.println("Printing to " + job.getOutputName()); // Generate Output job.setJobData(jobData); job.print();
PS:使用布局中定義的數據源的優點:數據源定義可能包含導入字段和布局字段之間的映射,此外,您還可以添加計算字段(按需)??蛇x的數據源參數使您可以靈活地進行編程或命令行交互。
這是因為DLL讀取了Default Settings“高級”選項卡中的找到的內容,Designer會Printing Preferences在“常規”選項卡中讀取找到的內容。
解決方案:調整General Settings打印機驅動程序,使其具有與Default SettingsTFORMer SDK 相同的值,反之亦然。
以上是TFORMer SDK常見的問答,希望對你有所幫助。如果你在使用的過程中遇到其他困擾,可在下方評論區留言,或進入資源列表查看更多教程。
TFORMer SDK現已加入慧都平臺,在線訂購享獨家優惠!>>立即咨詢購買
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn