Entry boxes transform to PDF

Sorry for the vague subject.

I have a view that looks like a form, with entry boxes and whatnot, that should be filled up by user.

Once all are filled up.

Are we able to assemble these data into PDF file?

You forgot to tag Vision or Perspective.

You would take the data collected and pass it to a report designed to look like the desired paper output. The reporting module is the only PDF generating tool in Ignition.

(No need to tag for UI--this answer is true for both Vision and Perspective.)

1 Like

Perfect. Sounds like a Plan.
Thank you. And have a great day.

I now got my data presented on the report.
Now its time to print into PDF.

On the Report->Schedule->Action, you can schedule to Save As PDF on directory.

Million dollar question: is there a way in Perspective to Trigger to Save the report PDF at will on the specific directory?

You mean in the client computer where the browser is running? No, that would be something malware wants to do, and browsers don't allow that.

The closest you can come is to use a button script that runs system.report.execute() to get the PDF bytes, and then calls system.perspective.download() to hand them to the browser. You can suggest a file name, but not a target folder.

1 Like

I would want at least to save on Gateways Local directory.
The PDF storage was meant to be a repository.
Does this mean we can save it on Ignitions Local webserver:
C:\Program Files\Inductive Automation\Ignition\webserver\webapps\main
In the long run would like to save PDF on a webserver where clients can search PDF and View them. - is this something WebDev can do?

No need to store PDF on client's Computer -- on PDF Viewer on Perspective, there is a download button.

Serving any files from webapps/main is buggy and unsupported and will get you chastised by IA (justifiably).

WebDev can serve pretty much anything. I recommend you not serve any directory listings through it--show Perspective tables with file links.

If you have the option to store these PDFs as blobs in a database, you can use my free Blob Server module to deliver to a PDF Viewer.

I am not there yet, but love this.!

On Second thought, I am tackling this now.
You just gave me two options: Use WebDev as Repository, vs Use blob storage in Database.

I am new to both, will do both for proof of concept and educational purpose.

Let me research how to store blob on database.
and Also research how to get started with WebDev.

The last time I chose not to store the pdf itself, but the parameters for the report.
Then I just called the report with those parameters and re-generated it.

1 Like

Very cool! That is a great insight.
Only use perspective as viewer.

You are right, it is proper to start with this(parameter storing, retrieval and presentation), for this proof of concept. Since the underlying data the one drives the pdf.

Printing to PDF and storing it, is just a medium for transport..

Big Thanks.

Where can I download this module? I can't find it.

Here:

Most recent version is in comment #46.

1 Like

I made it work.. lol..

I should try your "get data from another view" tool.

Thank you!

"Upload to Web Dev" - This is the alternate option.

Comeon.. how do you upload to webdev mounted folder?
I search the whole forum, can't find one.

You just write the uploaded files bytes to the target folder. Stick information about the upload in some database or other reference so you can generate links to the files in tables or image components.