OL Learn

Create Preview PDF (plugin)

Hi,

I’ve made an simple form where the user can input text, after submitting this form it creates an outputfile.

What i’ve got so far:
Knipsel

no it’s not clear for me how to load this output on a webpage. This is only needed for one time.

thanks for your help.

kind regards,

Koen

really? No one knows? :bowing_man:

You are already setup the right way. The returned PDF should display in your browser, or pop-up a Save as…dialog box, depending of your browser configuration.

You have multiple options. Either you return the PDF from your current process directly to the browser (assuming it starts with a Nodejs or HTTP Server Input) or embed that PDF directly a web page. In case the process is triggerend differently will need to setup a separate process to serve the PDF.

In the first scenario you will need to set the Mime type of the server input to application/pdf and change step 6 to a Delete step. Visiting the URL of that process (e.g. http://localhost:9090/hello) will show the PDF in the browser window.

When you want to embed the PDF in a web page your could add the following to your web page template:
<embed src="http://localhost:9090/hello" width="500" height="375">

This will call the process that generates the PDF and shows the result in the embed element.

Hope this is of some help,

Erik