Ignition can display and store PDF files from data stored in databases.
Displaying PDF files from the database
Ignition can render the PDF inside the PDF viewer component. The PDF viewer component is included with the Reporting Components. To view PDF files in the Client, your Ignition server must have this module. Once the module is installed, you can load the bytes from the database into the PDF viewer component with the following script which is enacted on a drop-down component property event handler.
Uploading PDF files to the database
Ignition can upload PDF documents to a database. Imagine the user selecting a button, a file browser pops up, the user selects the PDF file, presses enter and the file gets uploaded into the database. The following script demonstrates how this might work:
Storing Files in a Database
In a database, each column is a certain datatype. The datatype where you can store PDF bytes is a LONGBLOB datatype, therefore to insert the PDF file's bytes to a column the column's datatype must be a LONGBLOB.
- No labels