Hello there,
That’s correct, it does not work out of the box, and the reason for that is that our PDF Viewer needs to be able to evaluate the content width and height in order to render the PDF file.
Inside the Toggle module – it does not have access to that, because the module is collapsed.
If you make the default state of your Toggle module as “Open”, then it will work as expected.
In order to make it work, you can try to read this doc article: https://wp-pdf.com/kb/the-viewer-doesnt-display-at-all-or-at-wrong-size-when-inside-a-javascript-based-tab-or-ajax-page-transitions/
You will need to modify 'div.tab-title'
from that article to something specific to Divi, like 'div.et_pb_toggle_close'
.
Depending on Divi Toggle module implementation, you may also need to add some delay, but I would advise you to contact Divi support as they know their product much better.