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.
However... I changed the width to: width="100%". Looks even nicer using a %. This way the pdf view window is the full size of the post. In my case I used this inside of a vbadvanced bb code page with no wrapper.
However... I changed the width to: width="100%". Looks even nicer using a %. This way the pdf view window is the full size of the post. In my case I used this inside of a vbadvanced bb code page with no wrapper.
Thanks!
Thanks for the suggestion, I personally prefer the smaller box but whatever works for you is good.
Quote:
Originally Posted by SublimeBoa
Simple to install, user friendly and works nicely.
Your scroll wheel will detect where you have clicked on the page. So if you clicked on the pdf scroll bar your scroll wheel will move that bar instead of the pages bar. Click on a portion of the page and it will detect the pages scroll bar instead.
There is a small problem with the BB Code. Popup menus in VB will open under the embedded PDF. (see attached screenshot)
I believe the same way that flash can be made to open under menus... the PDF can be made to as well by adding a line of code that makes it "transparent".
UPDATE: Using a transparent or opaque mode will not work with a PDF because the adobe plugin doesn't currently support them for PDFs yet. I hope another solution to this issue can be found...
yotsume- I can confirm I do have this bug too, thanks... I guess the work around for now is to leave some empty lines before embedding the PDF, though for me it's not nearly as big an issue because of my choice to have a fixed width and most of the menus still very visible. This doesn't seem like it would be a problem if a pdf was posted in anyplace but the top of the first post.