|Developer Tools||Office Productivity Applications
In March this year, we released a version of XtremeDocumentStudio Delphi that added the ability to display data-aware form fields on the VCL document viewer control. Two new properties have been introduced to make this possible -
FieldMapping. You need to first connect
FieldDataSource to a data source on your computer. Then, you need to use
FieldMapping to map the names of the form fields in the PDF document to column names in the data source.
public property FieldDataSource: TDataSource; public function FieldMapping(FieldName: string): TgtFieldDataLink; virtual;
public: __property TDataSource FieldDataSource; public: virtual __fastcall TgtFieldDataLink FieldMapping(AnsiString FieldName);
TgtFieldDataLink type, you will be mostly interested in
ValueMappings properties. The former is for identifying the form field. The latter is a name-value pair that is used to set the value of the form field in the document and the actual value that is submitted when the former gets chosen by the end-user or code.
public property DataFieldName: string; public property ValueMappings: TDictionary;
public: __property AnsiString DataFieldName; public: __property TDictionary ValueMappings;
Here is an example of using this new feature.
TDataSourceneeds to be linked to a data set object. For simplicity, I have used a
TADODataSetto load values from an Access database (NorthWind). You can choose some other component for your data source.
gtDocumentViewer1.FieldDataSource := DataSource1; gtDocumentViewer1.FieldMapping('f1_1').DataFieldName := 'FirstName'; gtDocumentViewer1.LoadFromFile( 'C:\Users\egg\Documents\Gnostice\XtremeDocumentStudio Delphi'+ '\Demos\Delphi\VCL\7. Document Viewer - Data aware Interactive forms'+ '\Sample_tax_form.pdf');
Of course, this example does not exactly map the form fields to columns in the database. For that, you will need to create a specialized database "view" and then display it in the grid.
|Our .NET Developer Tools|
Multi-format document-processing component suite for .NET developers.
A .NET PDF component suite to create, edit, view, print, reorganize, encrypt, annotate, and bookmark PDF documents in .NET applications.
|Our Delphi/C++Builder developer tools|
Multi-format document-processing component suite for Delphi/C++Builder developers, covering both VCL and FireMonkey platforms.
A Delphi/C++Builder component suite for creating documents in over 20 formats and also export reports from popular Delphi reporting tools.
A Delphi/C++Builder component suite to edit, enhance, view, print, merge, split, encrypt, annotate, and bookmark PDF documents.
|Our Java developer tools|
Multi-format document-processing component suite for Java developers.
A Java PDF component suite to create, edit, view, print, reorganize, encrypt, annotate, bookmark PDF documents in Java applications.
|Our Platform-Agnostic Cloud and On-Premises APIs|
Cloud-hosted and On-Premises REST-based document-processing and document-viewing APIs
|Privacy | Legal | Feedback | Newsletter | Blog | Resellers||© 2002-2019 Gnostice Information Technologies Private Limited. All rights reserved.|