PdfDisplay
pdfDisplay macro
- inline
- no
- content
- none
- parameters
- filename — the name of the attached PDF file to show
- mandatory
- document — the page the PDF is attached to
- default: the current page
- width — CSS width of the viewer
- default: 600px
- height — CSS height of the viewer
- default: 600px
- filename — the name of the attached PDF file to show
The pdf macro of the PDF Macro extension reads only the page it is used on, so it cannot show a file that lives elsewhere — as the restricted renditions do, kept on a separate page that is not public. This macro takes that page as a parameter and renders the same three things: the full screen link, the viewer, and a download link for a browser that cannot display a PDF.
Examples
The examples read demo.pdf, a one-page document attached to this page for the purpose.
{{pdfDisplay filename="demo.pdf" height="300px"/}}
{{pdfDisplay document="Macros.Presentation.PdfDisplay" filename="demo.pdf" width="60%" height="300px"/}}
Counterexamples
{{pdfDisplay filename="nosuch.pdf"/}}
{{pdfDisplay document="Publication.NoSuchPage" filename="demo.pdf"/}}