Documents in database

Hi Forum,

Is there as way to store and retrieve and display a document (pdf, doc etc) inside Ignition?

Thanks

Francisco

A simple example of this would require using the IA Labs PDF Viewer component that you can get from the module marketplace.

First you could store the byte data of your PDF files to a database. In mysql it would be a blob type column, in mssql server it would be a varbinary column. To display the pdfs in the pdf viewer you would query the byte data from the database and then call loadPDFBytes(byteData,pdfName) on the PDF viewer component passing it the byte data and a string for the pdf name.

You cannot do this with the pdf component that’s part of the reporting module.

You’re probably not going to be able to display .doc files as they likely require msword or something similar to view. But there are similar techniques for storing images in the db, and you could also display rtf text documents using the document viewer.

Hope this helps.

Thanks Dave !

Francisco