{"id":1546,"date":"2026-10-12T12:00:00","date_gmt":"2026-10-12T12:00:00","guid":{"rendered":"https:\/\/mantrabrain.com\/blog\/?p=1546"},"modified":"2026-10-10T13:06:30","modified_gmt":"2026-10-10T13:06:30","slug":"how-to-display-pdf-files-wordpress","status":"publish","type":"post","link":"https:\/\/mantrabrain.com\/blog\/how-to-display-pdf-files-wordpress\/","title":{"rendered":"How to Display PDF Files in WordPress: 4 Practical Methods"},"content":{"rendered":"<p><em>Disclosure: MantraBrain is associated with MatrixAddons, the maker of Document Engine. We explain where the free plugin works well and where the paid add-on is needed.<\/em><\/p>\n<p>Need to show a PDF on a WordPress page? The right method depends on whether you&#8217;re publishing one menu or managing a whole collection of forms, reports and guides. Here are four practical approaches, with the trade-offs explained.<\/p>\n<h2>Method 1: Link directly to a PDF<\/h2>\n<p>Upload the PDF to <strong>Media \u2192 Add New Media File<\/strong>, copy its file URL and add a text or button link to a page. This is fast and works for occasional downloads. The downside is that visitors must leave the page or open another tab, and a long list of links is difficult to browse.<\/p>\n<h2>Method 2: Use the WordPress File block<\/h2>\n<p>In the block editor, add a <strong>File<\/strong> block, choose a PDF and configure the download button. Depending on your WordPress setup, the block may also show an embedded PDF preview. This is a sensible choice for a single PDF on a landing page.<\/p>\n<h2>Method 3: Embed a PDF with a dedicated viewer<\/h2>\n<p>A PDF viewer provides navigation controls and a more consistent reading experience. Check whether the viewer uses third-party services, how it behaves on mobile and whether text is selectable. For public documents, a lightweight viewer may be all you need.<\/p>\n<h2>Method 4: Use a document library with built-in PDF previews<\/h2>\n<p>When you have multiple PDFs, consider <strong>Document Engine<\/strong>. The free plugin adds a document content type, a searchable library with table\/grid\/folder layouts and a PDF.js viewer hosted on your own website. Create documents under <strong>Documents \u2192 Add New<\/strong>, then place the <strong>Document Library<\/strong> block on a page. Visitors can filter documents and preview PDFs rather than hunting through individual links.<\/p>\n<h2>Which method should you choose?<\/h2>\n<table>\n<thead>\n<tr>\n<th>Situation<\/th>\n<th>Suggested approach<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>One brochure or menu<\/td>\n<td>Direct link or File block<\/td>\n<\/tr>\n<tr>\n<td>One long PDF to read on-page<\/td>\n<td>Dedicated viewer<\/td>\n<\/tr>\n<tr>\n<td>Many public reports or forms<\/td>\n<td>Document library<\/td>\n<\/tr>\n<tr>\n<td>Private policies and controlled sharing<\/td>\n<td>Document library with Pro access controls<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>How to display a PDF using Document Engine<\/h2>\n<ol>\n<li>Install and activate Document Engine.<\/li>\n<li>Create a document and attach your PDF.<\/li>\n<li>Publish it and open its document page to test the viewer.<\/li>\n<li>For a collection, create a page with the Document Library block.<\/li>\n<li>Choose the layout and enable the filters your audience needs.<\/li>\n<\/ol>\n<h2>When Document Engine Pro is worth considering<\/h2>\n<p>Public PDF viewing is available in the free version. Pro is designed for situations requiring role-based restrictions, protected storage, expiring links, audit logs, stamped copies or secure view-only options. Remember that hiding download or print controls alone is not a substitute for access control.<\/p>\n<h2>Accessibility and performance tips<\/h2>\n<p>Use meaningful link text, provide a descriptive page title, compress oversized PDFs and test keyboard navigation. A viewer does not automatically make a scanned or untagged PDF accessible; prepare accessible source documents when possible.<\/p>\n<h2>Frequently asked questions<\/h2>\n<h3>Can I display a PDF without a plugin?<\/h3>\n<p>Yes. Use a direct link or the WordPress File block.<\/p>\n<h3>Can visitors search within a displayed PDF?<\/h3>\n<p>Document Engine&#8217;s built-in viewer includes search within the opened PDF. Library-wide file-content search is a Pro feature.<\/p>\n<h3>Do I need Pro for a public PDF library?<\/h3>\n<p>No. The free version includes libraries, filters and PDF previews.<\/p>\n<h2>Method 4: Exact shortcode examples<\/h2>\n<p>To embed one document library with PDF-only results, use:<\/p>\n<pre><code>[document_engine_library file_types=\"pdf\" layout=\"grid\" filters=\"category,type\"]<\/code><\/pre>\n<p>To embed a viewer directly, Document Engine documents <code>[document_engine_viewer]<\/code> with a document ID, Media Library file ID, or URL, plus controls for height, zoom and toolbar options. Use the <a href=\"https:\/\/matrixaddons.com\/plugins\/document-engine\/docs\/\" target=\"_blank\" rel=\"noopener\">official shortcode reference<\/a> to choose the appropriate parameters for your page.<\/p>\n<h2>Decision checklist before publishing a PDF<\/h2>\n<ul>\n<li><strong>Reader goal:<\/strong> Is the PDF primarily for reading, printing or downloading?<\/li>\n<li><strong>Mobile:<\/strong> Does the preview remain usable on a narrow screen?<\/li>\n<li><strong>Privacy:<\/strong> Should the URL work for visitors who are logged out?<\/li>\n<li><strong>Search:<\/strong> Do users need to search this file or an entire collection?<\/li>\n<li><strong>Accessibility:<\/strong> Does the PDF contain selectable, tagged text and a useful title?<\/li>\n<\/ul>\n<p><strong>Try it:<\/strong> <a href=\"https:\/\/matrixaddons.com\/plugins\/document-engine\/\" target=\"_blank\" rel=\"noopener\">Get Document Engine free or explore Document Engine Pro<\/a>. For the exact settings, consult the <a href=\"https:\/\/matrixaddons.com\/plugins\/document-engine\/docs\/\" target=\"_blank\" rel=\"noopener\">official setup documentation<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Compare four ways to display PDFs in WordPress, from simple links and the File block to a searchable PDF library.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[161],"tags":[],"class_list":["post-1546","post","type-post","status-publish","format-standard","hentry","category-document-management"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":8}},"_links":{"self":[{"href":"https:\/\/mantrabrain.com\/blog\/wp-json\/wp\/v2\/posts\/1546","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mantrabrain.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mantrabrain.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mantrabrain.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mantrabrain.com\/blog\/wp-json\/wp\/v2\/comments?post=1546"}],"version-history":[{"count":2,"href":"https:\/\/mantrabrain.com\/blog\/wp-json\/wp\/v2\/posts\/1546\/revisions"}],"predecessor-version":[{"id":1556,"href":"https:\/\/mantrabrain.com\/blog\/wp-json\/wp\/v2\/posts\/1546\/revisions\/1556"}],"wp:attachment":[{"href":"https:\/\/mantrabrain.com\/blog\/wp-json\/wp\/v2\/media?parent=1546"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mantrabrain.com\/blog\/wp-json\/wp\/v2\/categories?post=1546"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mantrabrain.com\/blog\/wp-json\/wp\/v2\/tags?post=1546"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}