Embed with dmxbind won't work

Hello Wapplers,

I’m trying to display PDF preview as a embedded html component and unfortunately it won’t work with dmxbind options. I was trying what @Teodor suggested in this topic but it won’t work.

In code bellow PDF file won’t show: <div class="col-12"><embed type="application/pdf" width="100%" height="600px" dmx-bind:src="'pdf/Q2021-1.pdf'"></div>

But if I change to html tag everything works as expected: <div class="col-12"><embed src="pdf/Q2021-1.pdf" type="application/pdf" width="100%" height="600px"></div>

So my general idea is to dynamically display PDF and take data from DMX variable.

I would be grateful for any solution or workaround provided.

I was managed to achieve this to include embeded code under conditional region which condition when variable has value.

<dmx-value id="var1" dmx-bind:value="'Q2021-1.pdf'"></dmx-value>
<div id="conditional1" is="dmx-if" dmx-bind:condition="var1.value">
	<embed dmx-bind:src="'pdf/' + var1.value" type="application/pdf" width="100%" height="600px">
</div>
1 Like