Learn how to modify the plugins behavior and make it work like you need.

Documentation Category: Tutorials

  • Can I write PHP code to change the shortcode parameters?

    You can set most settings in the Settings -> PDF Embedder page in WordPress. These apply to all embeds by default, but you can override the settings of individual embeds by manually adding shortcode parameters to the individual pdf-embedder shortcodes – see details here. It is also possible to override the global defaults by writing…

  • Hiding the embedder’s border or changing color/styles

    It should be possible to override the border color by adding something like this to your Theme’s styles: To hide the border, you would use: To change the color of the toolbar, you would use: To hide the toolbar, you could try: Change the colour of important toolbar buttons: Change the colour of links embedded…

  • Serving PDFs from Dropbox

    CORS is already enabled on some Dropbox domains, so it can be possible to embed PDFs directly from Dropbox, although only if your site is running under HTTPS. Try the following. Obtain the ‘share’ link from Dropbox (‘Copy Dropbox link’ from the right-click menu in your file browser). It should be something like this: You…

  • Hosting PDFs on other services such as Amazon S3 or a CDN

    By default, web browsers have security policies that do not allow Javascript code to fetch files from a different domain to the web page on which the code is already running. However, it is possible to configure Amazon S3 and other storage services to permit this, and then you’d just have to change the shortcode…

  • How to Center the PDF

    The default settings of the plugin will display your PDF at ‘maximum width’ to fit the area available to it. If you specify a fixed width for your PDFs that is smaller than the width available, you will probably find the PDF is left-justified within the main area of your web page. If you want…