# blockenberg/2.0.7/blocks/pdf-embed/frontend.js

Blockenberg — 600+ Advanced Gutenberg Blocks &amp; AI Agent for WordPress Block Editor, version 2.0.7. 20 lines.

- Page: https://pluginprobe.com/plugins/blockenberg/2.0.7/code/blocks/pdf-embed/frontend.js
- Raw: https://pluginprobe.com/plugins/blockenberg/2.0.7/raw/blocks/pdf-embed/frontend.js
- Modified: 2026-03-06T12:32:40+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/blockenberg/2.0.7/code/blocks/pdf-embed/frontend.js#L10-L20`.

```javascript
/* PDF Embed – frontend.js
   The PDF viewer is a native <iframe> — no JavaScript is required.
   This file is reserved for future enhancements (e.g., lazy-load iframes,
   PDF.js integration, or responsive height adjustments). */
(function () {
    'use strict';

    /* Optional: make iframes respect aspect ratio on resize */
    function resizePdfViewers() {
        document.querySelectorAll('.bkbg-pdf-viewer').forEach(function (viewer) {
            var iframe = viewer.querySelector('.bkbg-pdf-iframe');
            if (!iframe) return;
            /* height is set via inline style — no action needed
               unless the user wants responsive height in the future */
        });
    }

    document.addEventListener('DOMContentLoaded', resizePdfViewers);
})();

```
