【FAQ】TFORMer SDK热门技术问答精选合集(一)

TFORMer SDK能够自动化打印和导出规范 表和标签。介于各版本的编程接口,TFORMer SDK可轻松地集成到您的应用程序。

TFORMer能提供专业的打印方案,用于大多数应用程序中,如: 告,标签,邮件,商业窗体等等。TFORMer能满足您的标签应用程序, 条形码,和其他 表以及窗体打印的需要。

TFORMer SDK能够自动化打印和导出规范 表和标签。介于各版本的编程接口,TFORMer SDK可轻松地集成到您的应用程序。

最新版TFORMer SDK免费下载试用


 

TFORMer SDK常见问题解答(一)

 

Q1:如何静音设置TFORMer/strong>

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!)复制到设置路径中。

 

Q2:如何检索布局中使用的数据字段(TFORMer.NET API)/strong>

存储库中的数据字段

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 projectfor (DataField field = project.FirstDataField; field != null; field = field.Next){// check if the DataField is used in the FormLayoutDataFieldUsage usage = formlayout.GetDataFieldUsage(field.Name);  if (usage == DataFieldUsage.Normal)  {    // DataField used in the FormLayout  }}

TFF中的数据字段

// create a Repository-instance using a stand-alone FormLayoutRepository repo = new Repository("C:\Path\Label.tff", false, false);// retrieves the global projectProject 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)

 

Q3:如何调整记录集的份数/strong>

TFORMer .NET

// record set data sourceDataSourceRecordSet recordSet = new DataSourceRecordSet();Record record = new Record();record.NumberOfCopies = 10;recordSet.Records.Add(record);// CSV, ODBC and other data sourcesDataSourceCsv dsCsv = new DataSourceCsv(csvFile, ',', '"');Job printJob = new TECIT.TFORMer.Job();printJob.DataSource = dsCsv;printJob.RecordCopyDataField = "Copies"; 

 

Q4:如何通过程序代码导入CSV文件/strong>

以下示例代码显示如何将CSV导入与TFF布局文件中定义的CSV数据源一起使用(使用TFORMer Designer)。

TFORMer Java API

// create new jobjob = 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.ImagePngjob.setPrinterType(EPrinterType.PDFFile);// Output file namejob.setOutputName(System.getProperty("user.dir") + File.separator + "MyLabel.PDF");System.out.println("Printing to " + job.getOutputName());// Generate Output job.setJobData(jobData);job.print();

PS:使用布局中定义的数据源的优点:数据源定义可能包含导入字段和布局字段之间的映射,此外,您还可以添加计算字段(按需)。可选的数据源参数使您可以灵活地进行编程或命令行交互。

 

Q5:为什么TFORMer SDK的标签大小与Designer不同/strong>

这是因为DLL读取了Default Settings“高级”选项卡中的找到的内容,Designer会Printing Preferences在“常规”选项卡中读取找到的内容。

解决方案:调整General Settings打印机驱动程序,使其具有与Default SettingsTFORMer SDK 相同的值,反之亦然。


以上是TFORMer SDK常见的问答,希望对你有所帮助。如果你在使用的过程中遇到其他困扰,可在下方评论区留言,或进入资源列表查看更多教程。

TFORMer SDK现已加入平台,在线订购享独家优惠!>>立即咨询购买

标签:条码打印

声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

上一篇 2019年3月26日
下一篇 2019年3月26日

相关推荐

发表回复

登录后才能评论