NexT

Theme for Hexo

PDF

Settings

NexT config file
pdf:
enable: true
# Default height
height: 500px

Usage

{% pdf url [height] %}
  • url : The URL (Absolute path) of the PDF file.
  • [height] : Optional parameter. Height of the PDF display element, e.g. 800px.

The loading of pdf.js or pdf file might be blocked by CORS policy. If you want to load resources from another website, make sure the Access-Control-Allow-Origin header is set correctly. See also Access-Control-Allow-Origin - HTTP | MDN.

Examples

{% pdf https://example.com/sample.pdf %}
{% pdf /path/to/your/file.pdf 600px %}
0%