Generating an URL access for a PDF stored in an entity

Hello everyone,

I'm having a problem integrating the pdfJS Viewer plugin, since it requires an URL for the file to display and my file is stored in a Entity with attributes Name(Text), Content(Binary).

Is there a way to generate the acess URL to pass to the pdfJS Viewer?

Best Regards,



Hi Filipe,

Just create a page, and in the preparation, finish it with a Download node, passing as the content your PDF binary. You can use input parameters to define which file to download.

Than you can use this URL with the component.



Could you clarify exactly what you mean

"Than you can use this URL with the component."

Also why is a Download node required at the end?

1) I use HtmlToPdfConverter to get a binary (this required a URL).

2) How do I get this binary into URL field for the pdfJSViewer?

I have same question. I create the file pdf uploader and the file stored in database as binary data.  Then, i want to preview the pdf file that stored in the database with pdfJSViewer. It needs URL, and I don't know what should I fill?

The component can't show a PDF directly.
You need to have to give a URL where the PDF will be, so that the component will download the PDF.

So, create a page, in the preparation, get the PDF (from database or the convert) and provide the content to the Download Node at the end of the preparation.

Give the URL of this page to the component. 

When you show the page with the component, it will download the PDF.