Dynamic PDF Viewer

Hi,

I'm currently using the HTML5 Tool to show PDFs in my app using the following Content:

<iframe width="100%" height="100%" src="https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" name="iframe_a"></iframe>

I want to be able to change the PDF shown from a variable, so I can show different PDFs depending on what the user clicks,

Is this possible?

Hi @Matthew_Osment,

Yes, you can! Use a page property to store the PDF url and set the iframe like this

<iframe width="100%" height="100%" [src]="pdfUrlProperty | safe"></iframe>

Also you may want to hide the HTML component until the pdfUrlProperty is set. Just set the Visible property of the HTML component to pdfUrlProperty.

I am attaching a sample application.
pdf-example.zip (5.5 KB)