I have a pdfjsviewer block. There is a button on the screen
When I click on that button, I should view the pdf document using pdfjsviewer on new tab. Can I know the solution?
Hi,
On button action you can add JS like this. This redirects to Screen1 in a new tab. If your screen has input parameter then that need to append those parameters too so that it makes a URL.
Hi Gayathri,
Please do check this link with the similar use case,
https://www.outsystems.com/forums/discussion/73748/pdf-preview-in-a-new-window-reactive/
Hope this helps!
Hi Gayathri,you can use this javascript
var pdf_newTab = window.open("");
pdf_newTab.document.write(
"
encodeURI($parameters.BinaryData) + "'>"
);
Here , application/pdf is the mimetype . You can change it according to your file type if your file is .png or .jpeg etc . If it is an image it will be image/png .
Attaching Sample OML.Let me know if it works for you!Regards,Shalaka
Hi @Gayathri Gali ,
You can use html attribute- target="_blank in property section of button.
Thanks,
Arun