Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteThe quickest way to show a PDF inside a WordPress page is the built-in File block: upload the document, choose the embed option, and publish. You do not need a plugin for a basic inline viewer. A dedicated block is worthwhile when you need controls such as fullscreen, print, analytics, custom dimensions, or a JavaScript fallback.
Antihost offers managed WordPress hosting with free migration, one-click staging and a 14-day free trial.
This guide explains each practical approach, what visitors will see, which files must be publicly reachable, and how to provide a reliable download and accessible alternative.
As an Amazon Associate I earn from qualifying purchases.
Choose the right WordPress PDF viewer method
Use the comparison below before uploading anything. The important differences are not just appearance; they include whether another service receives the document, whether a viewer can open a protected file, and what happens when JavaScript or a hosted service is unavailable.
| Method | Setup | File reachability | Viewer features | Fallback and privacy |
|---|---|---|---|---|
| WordPress File block | Fastest; no plugin | The normal WordPress media URL works | Inline viewing plus optional download link or button | Served from your site; add a text link for devices that cannot render the embed |
| Adobe-based Gutenberg block | Install the block and add a free Adobe PDF Embed API key | The document must be available to the viewer integration | Inline view, download, print, fullscreen and Google Analytics event tracking | Richer controls; availability depends on the API integration |
| PDF.js Gutenberg block | Install the free block | Uses the PDF in your WordPress installation | Responsive viewer with configurable width, height and alignment | Provides a download link when JavaScript is disabled |
| Hosted iframe or Google Docs Viewer | Insert a viewer block or iframe URL | PDF must have a world-reachable URL | Convenient embedded display; mobile rendering can use Google Docs Viewer | Google Docs Viewer can fail intermittently and may need a reload; avoid for confidential files |
| Self-hosted viewer plugin | Install the plugin, then insert a block or shortcode from the Media Library | Uses your site-hosted PDF | In-page reading without requiring an Adobe Acrobat or third-party account | Keeps documents under your site’s control instead of sending them to an outside viewer service |
Embed a PDF with WordPress’s native File block
The native block is the sensible default for a brochure, game manual, patch-notes PDF, rules document or other file that does not need advanced tracking. It avoids plugin maintenance and gives you a normal media URL that can also be linked directly.
#1 Best Overall
Step-by-step
- In the WordPress dashboard, open Media → Add New and upload the PDF. You can skip this step if the file is already in the Media Library.
- Open the page or post where the document should appear. A dedicated page is usually preferable when the PDF needs a stable, shareable URL.
- Click the block inserter, search for File, and add the block.
- Choose Upload or Media Library, then select the PDF.
- In the block settings, enable the inline embed option when it is available. WordPress can also show a download link or button instead of, or beneath, the viewer.
- Use the block’s alignment and width controls to keep the document within the page content area. Avoid forcing a fixed width that creates horizontal scrolling on phones.
- Add a visible text link below the viewer, such as Download the PDF. Link the words directly to the media file rather than relying only on an icon or button.
- Preview the page at desktop and mobile widths, publish, and test the PDF URL while logged out.
Replacing a PDF without changing the page address
When a document is likely to be revised, put the File block on a page rather than linking the raw upload from many places. You can then replace the underlying PDF in the Media Library or update the block while keeping the page’s stable URL for readers and bookmarks. Check the published page after every replacement because a changed filename or media item can create a different URL.
What the native method does not provide
The File block is intentionally simple. It does not give you the same dedicated controls, analytics events or layout settings as specialized viewers. If readers need print and fullscreen controls, a branded toolbar, or a predictable fallback when JavaScript is off, use one of the plugin methods below.
Use an Adobe-based Gutenberg PDF viewer
The WordPress.org Pdf Embed plugin is a Gutenberg block built on Adobe’s official PDF Embed API. Its documented controls include inline viewing, download, print, fullscreen and Google Analytics event tracking. A free Adobe PDF Embed API key is required, so this option adds an account-and-key step that the native block does not.
Rank #2
Installation and configuration
- In WordPress, open Plugins → Add New and search for Pdf Embed. Install and activate the plugin from its listing.
- Create the free Adobe PDF Embed API key required by the plugin and copy it into the plugin’s settings. Treat the key as configuration data; do not paste it into the visible page content.
- Edit the target page, open the block inserter and add the plugin’s PDF viewer block.
- Select the PDF from the Media Library or provide the file the block requests.
- Choose whether visitors can download, print or open fullscreen. If your site uses Google Analytics and you need document-interaction events, enable the documented tracking option and verify that your analytics setup receives them.
- Set the viewer dimensions and preview at several screen widths. A toolbar that fits on desktop can wrap or become difficult to use on a narrow phone.
- Publish, then test in a logged-out browser and on a device that has not previously cached the file.
When this route makes sense
Choose this block when the reader experience matters more than the fewest installation steps. Print, download and fullscreen can be exposed as deliberate controls instead of being left to the browser’s built-in PDF handling. Analytics events can also show whether visitors open or interact with a document, provided your analytics implementation is configured correctly.
Use a PDF.js Gutenberg viewer
PDF Viewer Block for Gutenberg is described as a free, responsive block based on Mozilla’s PDF.js library. Editors can configure width, height and alignment. If JavaScript is disabled, the block provides a download-link fallback, which is useful for accessibility, locked-down browsers and assistive technologies that do not execute the viewer code.
Setup steps
- Open Plugins → Add New, search for PDF Viewer Block for Gutenberg, install it and activate it.
- Edit the page or post and insert the plugin’s PDF block from the Gutenberg inserter.
- Select the PDF from the Media Library.
- Set a responsive width rather than a value that exceeds the content column. Adjust the height so a reader can see enough of each page without creating an excessively long scroll area.
- Choose the alignment that matches the surrounding content, then save and preview.
- Test with JavaScript disabled or blocked. Confirm that the download link appears and leads to the actual PDF.
- Place your own visible download link beneath the viewer as a second, obvious route to the file.
Why the fallback matters
A viewer that works only when JavaScript executes can leave a blank region for some visitors. PDF.js’s documented download fallback gives those users a functional path. Your additional text link also helps people who prefer to save the file, use a dedicated PDF application, or access the document on a device with limited browser support.
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #3
Embed a publicly reachable PDF with an iframe or Google Docs Viewer
An iframe-based plugin can place a PDF viewer on a page from a URL. The documented Embed PDF Viewer plugin accepts a world-reachable PDF URL and uses Google Docs Viewer for mobile. This is a convenience solution, not a private-document system.
Procedure
- Upload the PDF to a location that can be reached from the public internet without a login, HTTP basic authentication or an IP allow-list.
- Copy the complete HTTPS URL to the PDF.
- Install and activate the iframe viewer plugin, then add its block or shortcode to the page.
- Paste the PDF URL into the plugin’s field and set the available dimensions.
- Preview on desktop and mobile. Confirm that the viewer loads while logged out and from a different network.
- Keep a normal download link below the iframe.
Limitations and privacy implications
A world-reachable URL is a hard requirement. A file that opens only for logged-in members, a private staging site or a network-restricted address cannot be assumed to work in a hosted viewer. The plugin’s known-issues documentation notes that Google Docs Viewer can occasionally fail to load and may require a reload. Because the document is being handed to an external viewing service, do not use this route for material that should remain confidential or under exclusive control of your site.
Use a self-hosted PDF viewer plugin
PDF Embedder documents both Gutenberg-block and shortcode insertion from the WordPress Media Library. Its listing says visitors can read PDFs in-page without an Adobe Acrobat or third-party account and distinguishes this approach from iframe, Google viewer and other hosted services that send documents to servers outside the site owner’s control.
Rank #4
Block insertion
- Install and activate the PDF viewer plugin.
- Edit the page and insert its PDF block.
- Select the document from the Media Library.
- Configure the available width, height and toolbar settings.
- Add a text download link, preview on mobile and publish.
Shortcode insertion
Use the shortcode method when the same document must be inserted into a classic-editor area, a widget location that accepts shortcodes, or a reusable layout. Insert the plugin’s documented shortcode and select the Media Library PDF according to its settings. Do not invent shortcode attributes: use the syntax shown in the plugin’s current editor help, then verify the rendered result while logged out.
Make the embedded document usable and accessible
- Provide a download link. Put a plainly worded link such as “Download the PDF” below every viewer. This is a fallback for failed embeds, disabled JavaScript and readers who want an offline copy.
- Use descriptive surrounding text. State what the document contains, its version or date, and approximate file size when that information is important to the decision to open it.
- Do not hide the document’s purpose in an icon. A screen-reader user should be able to identify the link without interpreting a download symbol.
- Check keyboard operation. Tab through the viewer controls and verify that focus is visible and the download route can be reached without a mouse.
- Check mobile orientation. PDFs are usually page-shaped, so allow horizontal space for the viewer while preventing the whole page from overflowing.
- Offer HTML for essential information. If the PDF contains the only copy of critical instructions, provide the key content in page HTML as well; an embedded file should not be the sole path to an important message.
- Use meaningful file names. Replace names such as
final2.pdfwith a title that remains understandable when downloaded.
Privacy, access and caching checks
An embedded viewer does not automatically change the access rules of the PDF. If the media URL is public, anyone who obtains it may be able to open the file directly even if the viewer is placed on an obscure page. Conversely, a viewer that relies on an external service may not be able to pass your site’s login state to that service.
- Decide whether the PDF is public before choosing an iframe or hosted viewer.
- Open the published page in a private browser window and test the direct file link.
- After replacing a PDF, clear any page or content-delivery cache that could continue serving the previous file.
- Check both the page URL and the raw PDF URL after a replacement; a working page does not prove that every old bookmark now points to the new document.
- Do not treat an API key, shortcode or viewer setting as an access-control mechanism.
Troubleshoot a PDF embed that fails
| Symptom | Likely cause | What to check |
|---|---|---|
| Blank space where the viewer should be | JavaScript is blocked, the script failed, or a hosted viewer cannot reach the file | Open the direct PDF URL, test the PDF.js download fallback, and inspect the page in a logged-out browser |
| Hosted viewer keeps loading | The URL is not world-reachable, the server blocks the request, or the hosted service is temporarily unavailable | Test from another network; remove login and IP restrictions only if the file is intended to be public; otherwise switch to a site-hosted viewer |
| Google Docs Viewer does not load on mobile | Intermittent Google Docs Viewer failure | Reload once, then use the direct download link or choose a self-hosted method |
| Readers cannot print or download | The selected viewer hides those controls | Enable the controls in the Adobe-based block or add a prominent direct download link |
| Viewer is too wide on a phone | A fixed width exceeds the content column | Use the block’s responsive width setting and test portrait orientation |
| Updated PDF still shows old pages | Browser, page or CDN cache | Clear the relevant cache, verify the media item, and test in a private window |
| Shortcode appears as text | The content area does not process shortcodes or the syntax is incorrect | Use the plugin’s block, place the shortcode in a shortcode-enabled area, and copy the documented syntax exactly |
A practical decision guide
Choose the File block when
You need an inline PDF quickly, want to avoid plugin maintenance, and are satisfied with basic embed and download behavior.
Best Value
Choose the Adobe-based block when
You need print, download, fullscreen or documented Google Analytics events in a dedicated viewer and can manage the required free API key.
Choose PDF.js when
You want a free responsive block with width, height and alignment controls plus a documented download fallback when JavaScript is disabled.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Choose an iframe or Google Docs Viewer when
The PDF is deliberately public, convenience matters, and you accept an occasional hosted-viewer failure. Keep a direct download link visible.
Choose a self-hosted plugin when
You want in-page reading without requiring an Adobe or third-party account and prefer the document to remain under your site’s control.
Quick Recap
Final pre-publish checklist
- The PDF opens from the Media Library and has a descriptive filename.
- The chosen viewer is inserted in the correct page or post.
- Width and height work in both desktop and mobile layouts.
- Download and print controls match your intended reader experience.
- A visible text download link sits below the viewer.
- The page and direct PDF URL work while logged out.
- Hosted viewers have been tested from outside your authenticated network.
- You have checked keyboard access, JavaScript-disabled behavior and the replacement workflow.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




