Viewer.js to pdf

Hi, I have an archive viewer.js, that is for to see the pdf in viewer without download it.
inside of archive is the next line where the file call to url:

var DEFAULT_URL = “1.pdf”

I want to pass the attachment for this see it. My question is: how to pass the file variable viewer.js?
the url could file location of attachment if this has an archive.

thanks

from http://viewerjs.org ??
If so then just follow the instructions on the website…

Thanks.
Do you have an example in SC?
I will like to see it, for understand how it functions the code…

I did download the file. You just need put this code in yor App. for you see an file tye PDF

<h2 id=“portable-document-format-pdf-”>Portable Document Format (.pdf)</h2>
<iframe src = “/viewerjs-0.5.8/ViewerJS/#/demo/CENTRODELVALLEACTUALIZADO.pdf” width=‘700’ height=‘500’ allowfullscreen webkitallowfullscreen></iframe>

I tested the viewerJS on Sc :
I copy the directory viewerjs in scriptcase root
I created a directory demo in scriptcase root with the file pdf CENTRODELVALLEACTUALIZADO.pdf
event Onappini

?>
<h2 id=“portable-document-format-pdf-”>Portable Document Format (.pdf)</h2>
<iframe src = “…/…/…/viewerjs-0.5.8/ViewerJS/#/demo/CENTRODELVALLEACTUALIZADO.pdf” width=‘350’ height=‘250’ allowfullscreen webkitallowfullscreen></iframe>
<?
And worked.

SC_ViewerJS.PNG

1 Like

Hi, its works!!!

But I want that on modal This archive opens , ACCORDING the archive name?

I think you can create a button type link modal and then create a new app (for viewerJS ) and opened.

yes I created a blank and grid.
I have to pass a global variable, but i don’t know…

Sorry ITS WORKS!!! Thanks all!!!

all if the file name with special characters is not shown