![]() |
BBCode: Embed PDF Files (No JavaScript/No iFrames) (BB Code)
1 Attachment(s)
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. Demo: http://www.juot.net/forums/showthread.php?t=46803 Add a new BBCode Title: Embed PDF BB Code Tag Name: pdf Replacement: Code:
<div align="center"> (I suggest using your own example if possible.) Use Option: No Button Image: (optional) https://vborg.vbsupport.ru/attachmen...1&d=1281727232 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. Screenshot Attached: https://vborg.vbsupport.ru/attachmen...1&d=1281727562 |
After placing the pdf file - thread not scrolling (Mozilla 3.6.8)
|
If the mouse pointer is over the PDF it may try and scroll the PDF and not the page, that would be 'normal' behavior when there's a 'window' inside a 'window' - try using the browser's "slide bar" at the right of the page or the arrow keys and see if you can get it to scroll...
Also, are you able to scroll the page on my demo site? Can you give me a link to your site where I can see the problem? |
I have to click once, outside of the pdf window, to get the thread to scroll again.
That's using Chrome, btw |
That's normal behavior, abqtj.
Thanks for this, I'll try it out. |
I clicked on the demo you provided, Adobe appeared to be starting up, then I got a popup that said:
box title: Acrobat Plug-In text: This operation is not allowed option to click: OK I want to install this code, but not if that's going to happen to my pdfs ;) Any idea why that happened? |
I would guess there is something wrong with your pdf plugin, maybe an old version or maybe some option you chose when installing?
I would re-download the latest version from: http://www.adobe.com/products/reader/ Also what browser/OS were you using? |
Firefox 3.5.11 / Windows XP
I'll try updating adobe reader. |
not working for me...keeps looking for additional plug ins.
|
Did you install the pdf plugin from: http://www.adobe.com/products/reader/
What browser/OS are you using? |
installed
thank you bro good work |
How would I use this BBcode for a PDF file that I have uploaded myself into vB? ie via the paperclip file attachment in a post.
Some PDFs are confidential and I dont want to just upload them into public.html/root/folder, but keep them in the attachments manager that deals with access rights, etc. PS. I store attachments in the filesystem not the database (if it makes a difference). |
If you right click on the link to your attached file and get the URL to said file, then put that URL between the PDF BB Code tags, that should work.
|
Great job mate, Working well on mine. thankssss
|
great job, installed and working!
|
Do you have any idea if there's a way to just show the PDF only and the the Adobe Reader frame around it? I'm trying to use it to show miniature PDF's but when I shrink it down the only thing I see is the adobe reader frame.
Is my question clear? If not I'll post some images of before and after. Thanks. |
Quote:
Instead of this: Code:
<embed src="{param}" type="application/pdf" width="700" height="900"> Code:
<embed src="{param}#toolbar=0&navpanes=0&scrollbar=0" type="application/pdf" width="700" height="900"> |
strangest thing is i havent any menu from Adobe and i use the standard mod..
|
I'd imagine the menu depends on the version of adobe reader you have installed. (Or maybe it's not even adobe reader, this would work with other pdf viewers besides adobe that work with your web browser.)
|
<a href="https://support.mozilla.com/ru/questions/806638" target="_blank">https://support.mozilla.com/ru/questions/806638</a>
|
It doesnt work.
http://img828.imageshack.us/img828/3489/pdf1u.jpg and when i click at link http://img98.imageshack.us/img98/3510/pdf2.jpg |
Looks like something might be wrong with the replacement code you copied.
Also could be an error in the URL you specified between the [pdf] tags. I suggest deleting the code and trying again. |
That is a good mod for making e-books and offering free downloads, for SEO
|
Could you expound on the install for us "non coders". Where do you put this code? Do you have to add it for every pdf or just once ? Sorry. Realize it's probably a dumb question but I need help.
|
Quote:
You will copy all of the info in the first post to the corresponding box in the "Ass a New BB Code" page. When done hit SAVE and the BB Code will be active. |
Quote:
My url is www.blackfinowners.com. What would I add instead of "ju" ? Thanks. |
You can use the exact example... qapla.com is hosting a test PDF file.
If you want to use your own example you will first have to upload a pdf file to your server and put the full address to it in the example perhaps something like: http://www.blackfinowners.com/pdf/testpdf.pdf "ju" is just the directory on my qapla.com domain where this particular test pdf is located. |
Everything seems installed fine. The preview pix on the acp look correct.
Will this thing work retroactively? What I mean is will .pdf attachments previously uploaded be displayed ? If the answer is yes, then I guess It's not working correctly for me. |
It is a BB Code- it will work wherever the bbcode was entered correctly, before or after it was installed.
Can you post here whatever you have in one of your posts that isn't working. |
Quote:
http://www.blackfinowners.com/forums...=8990#post8990 |
Simply attaching a PDF file to a post isn't going to make it appear on the page.
You need to put the URL to the attachment inside the PDF tag. Like this: Code:
[pdf]http://www.blackfinowners.com/forums/attachment.php?attachmentid=2031&d=1309265800[/pdf] |
Hi,
I am using it with VB4.1.7 I followed you instruction but after I post, it just shows me [pdf]http://www.qapla.com/ju/PDFOpenParameters.pdf[/pdf] instead of the windowed PDF document... Any suggestion..... Appreciations.... |
That would mean you either didn't set the field BB Code Tag Name: correctly- it should just be pdf
Or you set "Use Option" to "Yes", it must be set to "No." |
Thanks, it was "Use Option" ....
|
Quote:
Me too Please can you see the problem Thank s |
Quote:
|
Quote:
|
Please post the bbcode you are using, exactly, here. (the path to the pdf)
|
My apologies, the bbcode is correct and appears to be working perfectly in firefox. But I switched to chrome a while ago, and there the attachments won't show up.
edit: PDF files that are hosted on the site - uploaded to a folder through ftp - do work on chrome. |
Thanks for the update. Please mark this mod as installed if you are using it.
|
All times are GMT. The time now is 05:24 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|