Embed a PDF in WordPress

Collapse

Unconfigured Ad Widget

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Rex Maughan
    Senior Member
    • Mar 2022
    • 110

    Embed a PDF in WordPress

    How to Embed a PDF in WordPress With and Without a Plugin
  • wisly.k
    Member
    • May 2022
    • 99

    #2
    Embedding a PDF file into your WordPress post allows your viewers to open, view, and subsequently download and print the content of their interest.


    Embed a PDF in WordPress using a plugin

    Step 1: Log into your WordPress dashboard.
    Step 2: Navigate to Plugins > Add New Plugin.
    Step 3: Search for the PDF embedder plugin.
    Step 4: Click on Install Now and Activate it.




    Step 5: Now navigate to Settings > PDF Embedder.

    You'll discover a variety of customizable settings to suit your preferences. Alternatively, you can keep the default configurations and save the changes by selecting the "Save Changes" button at the bottom.

    Step 6: Open the page or post where you intend to embed your PDF file. Click the “+” icon and search for “PDF Embedder.”





    Select the PDF block, as shown in the picture. A block with the text "Click here to open media library to select PDF" will appear. Click on it to upload a PDF file or choose from your media library if it's already available, then click "Select."

    The PDF file will be added as an embed, though the block editor won't show the functionality. Save the changes, preview them, and see the PDF file in the visitor view.

    With these steps, you've successfully embedded your PDF file using the plugin in WordPress.





    Embed a PDF in WordPress without a plugin

    Method - 1: Using WordPress Media Library

    To embed a PDF file, you must first upload it to your WordPress site.

    Step 1: Sign in to the WordPress dashboard.
    Step 2: Navigate to the Media > Library and upload the PDF file.





    Step 3: After successfully uploading the file, copy its URL from the File URL section.





    Step 4: Now, navigate to the post or page where you wish to embed the PDF file.

    Copy the code provided below and paste it into the custom HTML block. To create the custom HTML block, click on the "+" icon and search for the custom HTML block.




    Replace the URL path in the code with the file URL you copied earlier.

    The code sourced from Google Docs enables us to embed and view the PDF file in your WordPress without requiring a download. It will display the PDF file in an iframe with a width of 660px and a height of 480px, which you can adjust to meet your specific requirements.

    Method - 2: Using Google Drive

    Step 1: Log into your Google Drive.
    Step 2: Inside Google Drive, locate the file and click on the three dots in the upper right corner. Choose "Open in a new tab" from the dropdown.




    Step 3: Find the "Embed item" option in the newly opened tab. Once opened, you'll see an iframe code.





    Step 4: Copy the code, return to your WordPress editor, click the "+" icon, and search for a custom HTML block.



    Step 5: Paste the code you copied from Google Drive into the custom HTML block.

    Now you are done. Adjust the height and width attributes in the code to customize the dimensions of your embedded PDF file.


    Comment

    Working...
    X