Skip to content

toniop99/hugo-adobe-pdf-api-shortcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Hugo Adobe pdf api shortcode


Table of Contents


Intro

Hugo shortcode for use PDF Embed API from Adobe

For more info you can check the api docu

Install

  1. Clone the repo https://github.com/toniop99/hugo-adobe-pdf-api-shortcode

  1. Copy ./layouts/shortcodes/pdf.html to ./layouts/shortcodes in your Hugo project.

  1. Add adobe sdk to ypur page script html (scripts.html or footer.html)
    <script type="text/javascript" src="https://documentservices.adobe.com/view-sdk/viewer.js"></script>
  1. Create an api on adobe developer page

    • Create an account
    • Create a project
    • Copy the API KEY (CLIENT ID) to your config.yaml params.

    ClientId on config.yaml

How to use

In your Hugo website place the following shortcode in any of the markdown pages.

    {{< pdf fileName="test" url="/files/resume.pdf" type="IN_LINE" >}}

Parameters

  • url (required) : The relative location of the file.
  • fileName (optional): Name of the file. Default to url provided.
  • type (optional)<FULL_WINDOW, SIZED_CONTAINER, IN_LINE OR LIGHT_BOX>: How the pdf will be shown. Default to IN_LINE More info on Adobe API Doc

Examples

IN LINE

IN_LINE

LightBox

LIGHT_BOX

About

Shortcode to use pdf embed api from Adobe

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages