This is <embed> BB Code to embed a PDF file into your forum. The user needs a compatible PDF Reader such as Adobe's free PDF Reader. If they don't have one they will still see a link to view the PDF directly.
I am aware <embed> is not "proper" HTML but it works fine in all major browsers (IE/FF/Chrome/Opera/Safari) while <object> was not working for me in IE. If you prefer to keep to strict HTML guidelines and don't care about IE users then simply change the two instances of "embed" in the replacement code to "object".
This has been confirmed working in the latest releases of IE, FF, Chrome, Safari, and Opera.
I am also aware there are at least 2 other PDF BB Codes out there... I believe this implementation is better because one of them uses JavaScript and another uses an iFrame and relies on a 3rd party website (google) to display the PDF. My implementation uses no JavaScript and does not reply on any other websites.
Title: Embed PDF
BB Code Tag Name: pdf
Replacement:
Code:
<div align="center">
<p align="center">
<embed src="{param}" type="application/pdf" width="700" height="900">
<br />
<a href="{param}">Click here to view or download the file directly.</a>
<br />
</embed>
</p></div>
Example: [pdf]http://www.qapla.com/ju/PDFOpenParameters.pdf[/pdf]
(I suggest using your own example if possible.)
Use Option: No
Button Image: (optional)
Remove Tag If Empty: Yes
All Disable Options: Yes
Overall this tag acts a lot like the built in [img] tags.
Please mark as installed if you use this.
Check My Profile for other BB Code enhancements. They work on all versions.
yotsume has found a bug where VB drop down menus (like "thread tools") may get hidden behind the PDF if the menu overlaps the same screen space as the PDF. For now please leave some extra lines before embedding a PDF at the top of the first post if you need to use the drop down menus.
No, not with the BB Code... that is a setting that would have to be made by the software that created the PDF file- I don't know the specifics but I know you can set advanced PDF options in Adobe Acrobat so files are blocked from things live saving, editing, or printing.
No, not with the BB Code... that is a setting that would have to be made by the software that created the PDF file- I don't know the specifics but I know you can set advanced PDF options in Adobe Acrobat so files are blocked from things live saving, editing, or printing.
I did up the security in my PDF so you can not save it. However, once you embed the PDF with this code the save button becomes active again. So my way around this for my needs is to PW protect the PDF. This requires forum members to enter a PW to view the PDF.
Wow that sounds like a serious security flaw... did you by chance confirm if you could actually save the file if you clicked on the button? Maybe it wouldn't actually work?