RBA Cash Rate: 4.35% · 1AUD = 0.67 USD · Inflation: 4.1%  
Leading Digital Marketing Experts | 1300 235 433 | Aggregation Enquires Welcome | Book Appointment
Example Interest Rates: Home Loan Variable: 5.20% (5.24%*) • Home Loan Fixed: 5.48% (6.24%*) • Fixed: 5.48% (6.24%*) • Variable: 5.20% (5.24%*) • Investment IO: 5.78% (6.81%*) • Investment PI: 5.49% (6.32%*)

Embed a PDF Document into Your Website, or Link to the BM PDF Document Viewer

Embed a PDF Document into Your Website, or Link to the BM PDF Document Viewer

In the finance world you'll often have to embed PDF documents into your website. This article introduces some of the tools we make available that permit a user to access PDF resources inline, through BM's PDF Modal Viewer, or via a download. We'll also introduce a basic Elementor block that permits you to drag-and-drop any PDF uploaded to Yabber directly into your website.

Note: In the examples below you'll see us reference a Documents ID rather than a URL - this ensures that as you replace or update PDF documents in the version-controlled Yabber Document Manager your website always returns the most up-to-date document versions without any editing. However, both a document ID and full URL are supported.

While a number of PDF rendering options are introduced below, it's the BM PDF Viewer  that is almost always the preferred option of document delivery.

  BM PDF Viewer

Rendering the BM PDF Viewer is the preferred method of PDF delivery for our clients. Interactions are fully tracked, triggers are optionally applied, the interaction contributes towards our understanding of a user, and the viewer itself provides the user suitable tools for reviewing the PDF document (without confining themselves to a narrow post or page container). The PDF Viewer is launched with the link shortcode, so [link pdf="yabber-doc-id"]yabber-document-id[/link] returns the following link  (click it to launch the modal).

PDF Viewer

  Pictured: The PDF Viewer is a highly effecting way of rendering PDFs to a user. Tracking and associated marketing features apply to any PDF rendered in the viewer. The BM PDF Viewer is only available to documents uploaded to Yabber.

If you clicked the PDF modal link above we've recorded your interaction which has contributed towards our understanding of your browsing objectives, and that information is now feeding information to our website and Yabber that'll assist in resolving conditional content (or, at the very least, we're recording vital statistical data). As introduced shortly, we have the option of launching various triggers on the basis of a BM PDF Viewer interaction - something we don't get with a simple PDF embed.

If a user performs any action on your website and you don't know about it, your website simply isn't performing its intended function.

  PDF Embed Shortcode

Embedding a basic PDF is easy, and for those that don't use our more advanced tools, you may do so with the use of a simple iframe. In the following example we'll render a PDF with the shortcode of [pdf]https://api.beliefmed ... king-code.pdf[/pdf]. The result:

While we've used a shortcode function you could implement the solution yourself with a basic iframe as follows (or you may download a simple shortcode function towards the end of this article):

<iframe src="../pdf/document.pdf#page=2" width="100%" height="100%">This browser does not support PDFs. Please download the PDF to view it: <a href="../pdf/document.pdf">Download PDF</a></iframe>

  Adobe's Embed API

Adobe's Embed API permits the inclusion of a PDF into a customised container that presents itself based on attributes you define in the embed code. You may launch a modal, display the full document inline, or return the PDF in a scaled container (the latter being the usual default option).

Adobe's Embed API requires registration but the service itself is free. Basic statistics are recorded but the data doesn't contribute towards your marketing objectives in the same way as the BM PDF Viewer. The result:

The Client Key provided by Adobe is exposed in the embed code so a specific origin domain is attached to the application in Adobe's dashboard to prevent others from using your key. In the time we've used the tool it hasn't been entirely reliable, so any other option is probably more appropriate. The complexity of having to register a Client Key negates the appeal of the Adobe Viewer, and we'd argue that other tools are often easier to use, and the BM Viewer is a far more usable feature.

  Elementor PDF Block

An Elementor block is maintained to embed PDF documents into your page. Simply drag the BM PDF block onto your page, select the PDF as uploaded to Yabber, and assign an optional style. The PDF is then returned.

PDF Elementor Block

  Pictured: Our Elementor block, like all other blocks, is designed to fully integrate with Yabber. Imbedding documents and applying a specific style is simple a matter of two select menus.

As any document is updated or replaced in Yabber, the new document is automatically rendered onto your website - we believe that this is an essential feature. Certainly, for compliance-related documents such as your Credit Guide - rendered into a a PDF reader or provided via a link - should always return the most up-to-date document version.

When dragging a PDF Embed object onto your page you may select an optional profile that defines how the PDF container is rendered. These profiles are created in Yabber with an option to define a basic Embed profile or an Adobe Profile (the latter requires you enter a Client Key registered with Adobe).

PDF Embed Yabber

  Pictured: Creating a PDF Profile in Yabber. In most cases the form elements under the checkbox are hidden, and they're returned when you're creating an Embed Object with the Adobe Embed API.

The Review panel provide a facility to review and edit your PDF Profiles.

  PDF View Triggers

As noted earlier, the BM PDF Viewer is the preferred method of delivering PDFs to your users because it is fully tracked, and triggers are optionally applied. The data returned from any interaction - regardless of what it is - is better described in an article that introduces a true consumer understanding and conditional content in more detail. Broadly speaking, though, when a user clicks on a PDF modal they're telling us something about themselves that helps us better resolve their borrowing objective, and assists Yabber and your website in delivering more relevant information. In reality, and not unlike other very 'low-end' features such as basic tooltip triggers, PDF View triggers aren't the most widely used tool... but that doesn't mean that they won't be used, or can't be used for a specific purpose. For example, if we're sending a user on a defined excursion, the view of a PDF might trigger an email that'll send them somewhere else (remembering any education-based marketing experience is about "what comes next").

The trigger panel returned is an abbreviated version of the primary higher-end trigger system, meaning only limited and more relevant options apply.

PDF View Triggers

  Pictured: PDF Triggers work off the abbreviated trigger system with minimal options. Once a user clicks on the PDF Viewer the trigger will action. Note that the View trigger is different to the Download Trigger which provides for far more options. The download is considered a significant escalation, while the simple PDF View is considered low-value. The triggers is often used to send an email after a user views a Credit Guide.

The download of a document is considered a more significant escalation marker, and for this reason, far more trigger options apply when a user downloads a document or other resource.

  Standard Links and Download Features

Yabber supports downloads in a dozen different ways; from a standard link through to buttons and a download container. The download container was manufactured to meet the specs required for us, but brokers will often find purpose in using it. The result of [download id="yabber-doc-id"] returns the following:

Title: Australian Banking Code of Practice, May 2021
Description: The new Code is part of a significant reform agenda to improve banking services to better meet community standards and expectations. This is an uncontrolled copy and should not be relied upon for up-to-date information. more information on the ausbanking.org.au website.
  Download • Version 0.1, 1.1M, pdf, Category: Compliance

The title and description, style, and other data returned in the box is rendered on the basis of text used when you created the document in Yabber.

The basic download link is important because it also introduces tracking, triggers, and so on. Any user of our systems should avoid using direct links to any resource because it seriously negates the effectiveness of your website and marketing funnels. To this end, the shortcode of [link download="yabber-doc-id"]anchor-text[/link] returns a standard download link with all marketing features automatically integrated.

If you're including a PDF uploaded to Yabber you may also return the Change Log to your page. The change log is mandated for compliance purposes and Yabber supports this requirement by way of basic version control.

Download options are extensive and are outside the scope of this introduction.

  Download Shortcode

If you're not a client and would like a simple means of embedding a PDF, the shortcode below is easy to use and may be suitable. Usage is as per our example; simply wrap the [ pdf ] open and close tags around a PDF URL. The smarter solution is to use our complimentary BeliefMedia Core website plugin - it's packed with dozens of dynamic features for mortgage brokers (including the shortcode below).

 Embed a PDF Document into Your Website
function bm_core_embed_pdf($atts, $content = null) {
 $atts = shortcode_atts(array(
  'url' => '',
  'height' => '500',
  'width' => '100',
  'padding_top' => '40',
  'padding_right' => '0',
  'padding_bottom' => '40',
  'padding_left' => '0',
 ), $atts);
 /* PDF URL Required */
 if ($atts['url'] == '') return 'A PDF URL is required.';
 /* Vars */
 $width = (abs($atts['width']) <= 100) ? abs($atts['width']) . '%' : abs($atts['width']) . 'px';
 $height = rtrim($atts['height'], 'px') . 'px';
 /* Object, iFrame, and Download */
 return '<div style="margin: 0 auto; padding-top: ' . rtrim($atts['padding_top'], 'px') . 'px; padding-right: ' . rtrim($atts['padding_right'], 'px') . 'px; padding-bottom: ' . rtrim($atts['padding_bottom'], 'px') . 'px; padding-left: ' . rtrim($atts['padding_left'], 'px') . 'px;"><object data="' . $atts['url'] . '" type="application/pdf" width="' . $width . '" height="' . $height . '"><iframe src="' . $atts['url'] . '" width="' . $width . '" height="' . $height . '" style="border: none;">This browser does not support PDFs. Please download the PDF to view it: <a href="' . $url . '">Download PDF</a></iframe></object></div>';
add_shortcode('pdf', 'bm_core_embed_pdf');

Copy and paste the WordPress function into your theme's functions.php file or, if you sensibly have one installed, your custom functions plugin.

Title: Embed a PDF Document into Your Website
Description: Embed a PDF document into your website with shortcode. Use as follows: [pdf]https://yourUrl.com/doc.pdf[/pdf]. Limited shortcode attributes apply.
  Download • Version 0.1, 792.0B, zip, Category: WordPress Shortcodes

Basic attributes apply. Width is normally left as full-width, but you may alter the height by passing height="500" into the shortcode, where '500' is your preferred height in pixels.


In a recent article we said that "link aren't just links", and for the same reasons, PDF links aren't just PDF links. One of the bigger mistakes we see most businesses make is allowing the fractionalisation of their website, marketing, and business processes, when their entire operation should be interconnected to enable full automation for every system. Our product does away with this discombobulated mess and provides the only end-to-end and fully-integrated solution in the industry, of which PDF functionality is a very small part.

While generic statistical data provided by tools such as Google Analytics are okay, they're seriously lacking in terms of understanding what our website visitors and funnel participants are actually doing. The granular understating derived from website interactions and funnel pathways is what feeds us with the intelligence necessary to make informed decisions, and this information is essential if you're looking to introduce agility into your marketing operation.

  Featured Image: The Sydney Morning Herald Building, Corner of Pitt and Hunter St., Sydney, c1922. [ View Image ]

Download our 650-page guide on Finance Marketing. We'll show you exactly how we generate Billions in volume for our clients.

  E. Australia Standard Time [ UTC+10, Default ] [ CHECK TO CHANGE ]

  Want to have a chat?


Like this article?

Share on Facebook
Share on Twitter
Share on Linkdin
Share on Pinterest

Leave a comment