It is helpful to prepare your PDF document carefully in advance. Your PDF document should ideally be optimized for web use (as opposed to print) if possible, and under 10MB in size. This will provide quicker loading for your users.
It is also important to make sure that your PDF text is selectable, as in able to be highlighted with a curser, instead of a scan or image of text. This will allow visually impaired users to access your document with a screen reader and other tools.
Example of “selectable text” in a PDF:
When your document is prepared and ready to be added to your website, begin by putting your curser in the text area where you would like the PDF link to be added (but don’t type any text yet), then click the Add Media button.
The Media Library popup will give you two tab options: You can choose between Upload Files to add a new file, or Media Library to choose a PDF that has already been uploaded to your website.
Once you have added your new file by dragging and dropping or navigating to its location on your computer, or you have selected an existing file on your site, you will need to complete a few steps before adding the PDF to your page. First, you’ll replace the pre-filled PDF file name with your desired link text in the Title field.
Then scroll down in the same interface and ensure the “Attachment Display Settings” are set to Link To: Media File in the drop-down. Finally, click Insert into Page.
A new link will now be added to your PDF using the text you entered in the Title field.
You can continue to add additional content. Click Publish or Save Draft in the right WordPress menu to save your changes.
Setting the PDF to open in a new browser tab
It’s often preferred that the PDF opens up in a new browser tab, so the user can easily return to your web page afterwards. To set this, click on the PDF link and a box will pop up with additional options.
Click the pencil icon to open the gear icon, which shows the link editing options. Then check the box for “Open link in a new tab” and click Update in this box.
Linking images to PDFs
Images can also link to PDF documents and can create a more visible link than text. You can also use parts of this process to manually update PDF links or add other custom links to images.
If you haven’t already imported your PDF document, use Media > Add New in the WordPress dashboard to import your document to the Media Library first.
Then click on the PDF in the Media Library. In the Attachment Details interface, you will see a field labeled “URL.” This is the full url of your PDF. Placing your curser in this field, use the keyboard command of Command/CTRL-A (Mac/PC) to select the full link, then Command/CTRL-C to copy the link.
Next, navigate to the page you would like to edit and select or add your image that you want to link to the PDF. Click the image and a box will pop up for you to edit the image options.
Click on the pencil icon and the “Image Details” box will open. Under “Display Settings,” there is a “Link To” option. Choose “Custom URL” from the dropdown, and then paste the PDF url that you copied previously. Click Update, and your image will now link to your PDF.