MediaPDF

^do( MediaPDF, filename )^

Type: Macro

Purpose: Embeds a scrollable PDF

The PDFView macro inserts a scrollable PDF file as an <object> element, or an error message in case the client’s browser cannot view the file.

Hover below to reveal BoxPress code

<object class="frame-90vh" data="^value($Text("dashUploadsDir"))^/$1" type="application/pdf" width="100%" height="100%">Your browser does not support PDF viewing. Please download the PDF to view it: <a href="^value($Text("dashUploadsDir"))^/$1">Download PDF</a>.</object>

PDF sample

This is the markup that is rendered below

^do(MediaPDF, "apple_memo.pdf")^

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Your browser does not support PDF viewing. Please download the PDF to view it: Download PDF.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.