Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: live627 on October 31, 2008, 08:43:51 AM

Title: PDF Tag
Post by: live627 on October 31, 2008, 08:43:51 AM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1468)

PDF Tag

Version: 1.2 Date 2011-07-17
Compatibility: SMF 1.1.14  & SMF 2.0


Showing PDF Files in Posts with using [pdf] [/pdf] tag


Tips From FaSan -> http://www.simplemachines.org/community/index.php?topic=35851.0

Just  packaged & attached PDF-Button in BBC-codes




You may get support or submit questions and comments in the modification's support thread at the SMF site.




Changelog:

v1.2 - 17 July 2011

o Added support for SMF 2.0 Gold.

v1.1 - 31 October 2008

o Added support for SMF 2.0 BETA 4.

v1.0 - 15 October 2008

o Initial release. (SMF 1.1.6 Compatible)

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi36.tinypic.com%2Fzwz22x.jpg&hash=861bdcca39629ed712b18119c22daf1f548ba2e6)
Title: Re: PDF Tag
Post by: genieuk on October 31, 2008, 08:54:18 AM
Very nice, thanks,

Is it suppose to look like this thou:, not sure it meant to be but it seems to restrict the width.

Mathew

Title: Re: PDF Tag
Post by: weightman on October 31, 2008, 10:33:58 AM
Nice mod. I adjusted the width and height to make the embeds larger by increasing their values in subs.php.
Title: Re: PDF Tag
Post by: genieuk on October 31, 2008, 12:02:25 PM
Quote from: weightman on October 31, 2008, 10:33:58 AM
Nice mod. I adjusted the width and height to make the embeds larger by increasing their values in subs.php.

Do you mind telling me what size you used? i dont want to make it to big so it is to large and ruins the look of theme if to wide etc.

Thank you,
Mathew
Title: Re: PDF Tag
Post by: General_Naga on October 31, 2008, 12:04:11 PM
I really like this idea. Any plans for a SMF 2.0 version?
Title: Re: PDF Tag
Post by: weightman on October 31, 2008, 12:12:21 PM
QuoteDo you mind telling me what size you used? i dont want to make it to big so it is to large and ruins the look of theme if to wide etc.

The width I used might not be optimal for your site since my forum is wrapped inside a bridged CMS. If you make the width too large it shouldn't wreck your pages. Instead the pdf should just get cut off. Then, you can just decrease the number til it fits. The height should work fine. I have it set to display the full first page.

<embed type="application/pdf" src="$1" width="775" height="975" />
Title: Re: PDF Tag
Post by: Kermit on October 31, 2008, 12:23:10 PM
Quote from: General_Naga on October 31, 2008, 12:04:11 PM
I really like this idea. Any plans for a SMF 2.0 version?

Yep,it will be shortly available for SMF 2.0 too
Title: Re: PDF Tag
Post by: edi67 on October 31, 2008, 02:39:33 PM
excellent
Title: Re: PDF Tag
Post by: General_Naga on October 31, 2008, 02:48:28 PM
Great news - I look forward to it :)
Title: Re: PDF Tag
Post by: Kermit on October 31, 2008, 03:12:47 PM
Quote from: General_Naga on October 31, 2008, 02:48:28 PM
Great news - I look forward to it :)

Now it's SMF 2.0 Beta 4 compatible

http://custom.simplemachines.org/mods/index.php?action=download;mod=1468;id=74019
Title: Re: PDF Tag
Post by: edi67 on October 31, 2008, 03:59:51 PM
Quote from: weightman on October 31, 2008, 12:12:21 PM
QuoteDo you mind telling me what size you used? i dont want to make it to big so it is to large and ruins the look of theme if to wide etc.

The width I used might not be optimal for your site since my forum is wrapped inside a bridged CMS. If you make the width too large it shouldn't wreck your pages. Instead the pdf should just get cut off. Then, you can just decrease the number til it fits. The height should work fine. I have it set to display the full first page.

<embed type="application/pdf" src="$1" width="775" height="975" />

this could be one good addiction for new version to  be able to change the size od document pdf in topic ;)
Title: Re: PDF Tag
Post by: Kermit on October 31, 2008, 04:05:55 PM
Quote from: edi67 on October 31, 2008, 03:59:51 PM
Quote from: weightman on October 31, 2008, 12:12:21 PM
QuoteDo you mind telling me what size you used? i dont want to make it to big so it is to large and ruins the look of theme if to wide etc.

The width I used might not be optimal for your site since my forum is wrapped inside a bridged CMS. If you make the width too large it shouldn't wreck your pages. Instead the pdf should just get cut off. Then, you can just decrease the number til it fits. The height should work fine. I have it set to display the full first page.

<embed type="application/pdf" src="$1" width="775" height="975" />

this could be one good addiction for new version to  be able to change the size od document pdf in topic ;)


Good idea,i will add this in the new version
  ;)
Title: Re: PDF Tag
Post by: Nibogo on November 01, 2008, 10:19:21 AM
Modifications.spanish.php:

$txt['pdf'] = 'A&ntilde;adir PDF';

Modifications.spanish_latin.php:

$txt['pdf'] = 'A&ntilde;adir PDF';

Modifications.spanish-utf8.php:

$txt['pdf'] = 'A&ntilde;adir PDF';

Modifications.spanish_latin-utf8.php:
 
  $txt['pdf'] = 'A&ntilde;adir PDF';

Thanks for the mod
Title: Re: PDF Tag
Post by: Mick. on November 26, 2008, 05:49:36 PM
Very cool Thanx!

http://www.chevyavalancheclub.com/index.php/topic,2191.0.html
Title: Re: PDF Tag
Post by: mforum on January 21, 2009, 02:39:51 PM
can be done something so it doesn`t  load whole pdf at once and every time you refresh page ?
is a really big problem with files larger than 6 mb and especially with 30 mb files, IE loads it but a grey window is showing instead of the document, you have to refresh to load it again to show it normally ......
Title: Re: PDF Tag
Post by: ke4obt on February 19, 2009, 01:25:39 PM
Hey All,
could someone tell me how to use this bbcode please, sence I'm not real sure how to place the pdf file into the tags.
cut and paste or is it to be attached some how?

Thanks Lots,
TTYL Flip
Title: Re: PDF Tag
Post by: Kermit on February 19, 2009, 03:51:46 PM
Quote from: ke4obt on February 19, 2009, 01:25:39 PM
Hey All,
could someone tell me how to use this bbcode please, sence I'm not real sure how to place the pdf file into the tags.
cut and paste or is it to be attached some how?

Thanks Lots,
TTYL Flip


[pdf]url of your pdf[/pdf]
Title: Re: PDF Tag
Post by: ke4obt on February 19, 2009, 04:18:45 PM
Duncan,
thanks. My wife came and looked at the screenshot and then smacked me in the head. :)
My screen reader didn't read it for me since it was an image. So, had to use the wife's eyes - again.
Tried it out in a post and it worked perfectly!!

Thanks again.

TTYL,
Flip
Title: Re: PDF Tag
Post by: Rockas on February 25, 2009, 06:01:12 AM
resize on 2.0RC1... is it possible?

thank you :-)
Title: Re: PDF Tag
Post by: Kermit on February 25, 2009, 07:14:55 AM
Quote from: Rockas on February 25, 2009, 06:01:12 AM
resize on 2.0RC1... is it possible?

thank you :-)

I've already tried that with resizing,but unfortunately with no luck
Title: Re: PDF Tag
Post by: Kilgore Trout on June 17, 2009, 11:54:49 AM
I have installed this mod on a 2.0 RC-1 board.  I used the pdf_tag_1.1.zip file and uploaded the package and it said it installed successfully.  When I try to use the pdf tags and place a valid pdf file (on another site) I get a post that says "click here to download plugin"  When I click it it says no plugin is available.  Can someone help this poor newb get this working?  I am sure I have done something basic incorrectly and will look forward to hearing about it.  ;>)

KT
Title: Re: PDF Tag
Post by: Kilgore Trout on June 17, 2009, 09:13:40 PM
Solved it.  Realized that it was my browser that needed the plugin.  duh.  For anyone else who has this problem you can find the Mac plugin here:

http://plugindoc.mozdev.org/OSX.html#PDF
Title: ATTACHED PDF
Post by: Angelina Belle on June 22, 2009, 01:51:41 PM
I would like to embed an attached PDF.  This does not work well at all.

Here is an example of embedding an "unattached" PDF
http://rockhallsailingclub.org/smf/index.php?topic=58.0

Here is an example, using the same PDF file.  This time, though, I have attempted to attach it to a post and then embed it in the same post, using the PDF file.  SMF insists that the attached PDF file needs to be opened in a new window.  That really messes up the message window and the browser window with the empty object/embed window seems really unhappy, too.
http://rockhallsailingclub.org/smf/index.php?topic=76.0

Is there a solution to the problem?

Thanks
AB

Title: Re: PDF Tag
Post by: Kermit on June 22, 2009, 02:51:41 PM
Quote from: AngelinaBelle on June 22, 2009, 01:51:41 PM
I would like to embed an attached PDF.  This does not work well at all.

Here is an example of embedding an "unattached" PDF
http://rockhallsailingclub.org/smf/index.php?topic=58.0

Here is an example, using the same PDF file.  This time, though, I have attempted to attach it to a post and then embed it in the same post, using the PDF file.  SMF insists that the attached PDF file needs to be opened in a new window.  That really messes up the message window and the browser window with the empty object/embed window seems really unhappy, too.
http://rockhallsailingclub.org/smf/index.php?topic=76.0

Is there a solution to the problem?

Thanks
AB




PDF Tag mod has nothing to do with the attachment stuff,so i don't know what could be wrong with it
Title: Re: PDF Tag
Post by: Kilgore Trout on June 22, 2009, 02:56:51 PM
I have a problem with a mac/firefox os/browser combination.  The PDF file seems to open a ways down on the page and the width stays too narrow even if the width variable is changed in subs.php  Any ideas?  Thanks.
Title: Re: PDF Tag
Post by: Angelina Belle on June 22, 2009, 03:03:56 PM
Quote from: Duncan85 on June 22, 2009, 02:51:41 PM
PDF Tag mod has nothing to do with the attachment stuff,so i don't know what could be wrong with it

Thanks.  That tells me it might not be so simple to attach a PDF and then embed the PDF.  I'll go ask someplace else.
The PDF mod seems to be working great for what it was designed to do.
Thanks!
Title: Re: PDF Tag
Post by: akosiparusa on July 04, 2009, 10:50:59 AM
which file/template is the quick reply?
Title: Re: PDF Tag
Post by: SPerroud on July 04, 2009, 01:42:20 PM
Nice nice nice nice.
Thanks
Title: Re: PDF Tag
Post by: ttuu on July 14, 2009, 10:24:41 AM
i am using Foxit Reader and i see X in PDF place.
Title: Re: PDF Tag
Post by: searchgr on November 11, 2009, 09:24:06 AM
any update for rc2?
Title: Re: PDF Tag
Post by: Kermit on November 12, 2009, 05:11:40 AM
Quote from: searchgr on November 11, 2009, 09:24:06 AM
any update for rc2?


Already tried to update,but no luck,somehow the pdf thing doesn't work on RC2
Title: Re: PDF Tag
Post by: Mick. on January 28, 2010, 11:20:34 AM
I got it to work on RC2 a while back ;)


Open:
./Sources/Subs.php

Find:array(
'tag' => 'pre',
'before' => '<pre>',
'after' => '</pre>',
),


Add before:

// PDF [pdf]example.pdf[/pdf]
         array(
            'tag' => 'pdf',
            'type' => 'unparsed_content',
            'content' => ($context['browser']['is_ie'] && !$context['browser']['is_mac_ie'] ? '<object type="application/pdf" classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" data="$1" width="800" height="600"><param name="src" value="$1"><embed src="$1" width="500" height="400" /><noembed><a href="$1" target="_blank">$1</a></noembed></object>' : '<embed type="application/pdf" src="$1" width="500" height="400" /><noembed><a href="$1" target="_blank">$1</a></noembed>'),
            'validate' => create_function('&$tag, &$data, $disabled', '
               if (isset($disabled[\'url\']))
                  $tag[\'content\'] = \'$1\';'),
            'disabled_content' => '<a href="$1" target="_blank">$1</a>',
         ),


Open:
Subs-Editor.php

Find:
array(
'image' => 'quote',
'code' => 'quote',
'before' => '[quote]',
'after' => '[/quote]',
'description' => $txt['bbc_quote']
),


Add after:

array(
'image' => 'pdf',
'code' => 'pdf',
'before' => '[pdf]',
'after' => '[/pdf]',
'description' => $txt['Add_PDF']
)


Open:
./Themes/default/languages/Modifications.english.php

Find:
?>

Add before:
$txt['Add_PDF'] = 'Add PDF';

Make sure you grab the PDF image from the package here and load it into your theme's BBC folder.


Demo on RC2:
http://www.chevyavalancheclub.com/index.php?action=articles;sa=view;article=47

It works in the forums as well in the Articles mod.
Title: Re: PDF Tag
Post by: Angelina Belle on April 09, 2010, 08:59:58 PM
Thanks for posting that. You saved me thinking through and debugging the edit to Subs-Editor
Title: Re: PDF Tag
Post by: Yahmez on April 20, 2010, 09:35:40 AM
Quote from: Duncan85 on November 12, 2009, 05:11:40 AM
Quote from: searchgr on November 11, 2009, 09:24:06 AM
any update for rc2?


Already tried to update,but no luck,somehow the pdf thing doesn't work on RC2

Here is a version for rc3
I'll remove it if you object to my posting it.
Title: Re: PDF Tag
Post by: Kermit on April 21, 2010, 02:42:29 AM
Quote from: ҰΛĥmΞڃ on April 20, 2010, 09:35:40 AM
Quote from: Duncan85 on November 12, 2009, 05:11:40 AM
Quote from: searchgr on November 11, 2009, 09:24:06 AM
any update for rc2?


Already tried to update,but no luck,somehow the pdf thing doesn't work on RC2

Here is a version for rc3
I'll remove it if you object to my posting it.


I have no,thanks for updating,when i have time,i will look into your package and add on modification page  ;)
Title: Re: PDF Tag
Post by: dmacleo on May 07, 2010, 05:50:01 PM
Quote
Here is a version for rc3
I'll remove it if you object to my posting it.
thank you very much !
Title: Re: PDF Tag
Post by: NoFeaR / NFSMW on September 20, 2010, 05:09:06 AM
i get an error with this saying. File does not begin with %PDF
Title: Re: PDF Tag
Post by: NoFeaR / NFSMW on October 16, 2010, 06:34:37 AM
How do i set it for Auto width.
Title: Re: PDF Tag
Post by: PLAYBOY on June 19, 2011, 12:54:12 PM
Doesnt install on 2.0!
Title: Re: PDF Tag
Post by: PLAYBOY on June 25, 2011, 04:33:46 PM
I realy need this mod. I have so many pdfs i have put in the messages with this mod but now i i upgraded it to 2.0 and you cant see any of the pdfs.
Please! When Is this gonna be updated for 2.0?
Title: Re: PDF Tag
Post by: npiccoli on July 12, 2011, 06:43:01 PM
Would it be possible for you to update this to work with SMF 2.0 Gold please?
Title: Re: PDF Tag
Post by: Kermit on July 13, 2011, 02:11:14 AM
Quote from: npiccoli on July 12, 2011, 06:43:01 PM
Would it be possible for you to update this to work with SMF 2.0 Gold please?

http://www.simplemachines.org/community/index.php?topic=271504.msg2592280#msg2592280

Did you try the package from here ?
Title: Re: PDF Tag
Post by: Inti31 on July 13, 2011, 02:59:34 AM
i just checked the code and modified it for 2.0 Gold (I installed it sucessful in my testforum)

Is this what you need? if yes, see attached file... - Nevertheless - all honours to Duncan85 - as i said - i just modifed it for 2.0 Gold only

http://aida32-inventory.netboom.de/smf/index.php?topic=211.msg1721#msg1721

cheers Inti31
Title: Re: PDF Tag
Post by: npiccoli on July 13, 2011, 01:22:35 PM
Quote from: Inti31 on July 13, 2011, 02:59:34 AM
i just checked the code and modified it for 2.0 Gold (I installed it sucessful in my testforum)

Is this what you need? if yes, see attached file... - Nevertheless - all honours to Duncan85 - as i said - i just modifed it for 2.0 Gold only

http://aida32-inventory.netboom.de/smf/index.php?topic=211.msg1721#msg1721

cheers Inti31

Thank you! The modification installed, but now I need a PDF file to test the modification with. I'll find one somewhere, I wish this computer had Microsoft Office 2007 so I could easily create a PDF. Oh well, thanks!
Title: Re: PDF Tag
Post by: Inti31 on July 13, 2011, 01:28:26 PM
Does it work for you? Did you test it? Please let me  (us) know... cheers Inti31
Title: Re: PDF Tag
Post by: npiccoli on July 13, 2011, 02:56:27 PM
Quote from: Inti31 on July 13, 2011, 01:28:26 PM
Does it work for you? Did you test it? Please let me  (us) know... cheers Inti31

It is working as it should, thanks again!
Title: Re: PDF Tag
Post by: Kermit on July 13, 2011, 03:00:32 PM
Thanks for it Inti31 ;)
Title: Re: PDF Tag
Post by: PLAYBOY on July 16, 2011, 10:55:06 PM
I got it installed in 2.0 but i get this error in my error log



8: Undefined index: pdf

Dosya: /home/site/public_html/forum/Sources/Subs-Editor.php
Line: 1589
Title: Re: PDF Tag
Post by: Kermit on July 17, 2011, 01:41:31 AM
Quote from: PLAYBOY on July 16, 2011, 10:55:06 PM
I got it installed in 2.0 but i get this error in my error log



8: Undefined index: pdf

Dosya: /home/site/public_html/forum/Sources/Subs-Editor.php
Line: 1589

I didn't get such error on fresh installation,better check your language files
Title: Re: PDF Tag
Post by: PLAYBOY on July 17, 2011, 01:48:42 AM
 What am i gonna look for in which language file?
Title: Re: PDF Tag
Post by: Kermit on July 17, 2011, 02:26:12 AM
Quote from: PLAYBOY on July 17, 2011, 01:48:42 AM
What am i gonna look for in which language file?

Modifications.english.php
Title: Re: PDF Tag
Post by: PLAYBOY on July 17, 2011, 02:33:23 AM
Quote from: Kermit on July 17, 2011, 02:26:12 AM


Modifications.english.php

and what am i checking in this file? because i dont see anything wrong in my language files...
Title: Re: PDF Tag
Post by: Kermit on July 17, 2011, 03:25:07 AM
I can just say,check the coding of modification manually,if all is correct,then i don't know what could be the problem
Title: Re: PDF Tag
Post by: Inti31 on July 17, 2011, 05:46:21 AM
Are you using an utf-8?

then you have to enter manually the string  in this file: "Modifications.english-utf8.php" - or whatever language is you prefered one. The package does have only german-utf8 and simple English included.

$txt['pdf'] = 'add PDF';

So if you have a French forum you need to enter the code string in "Modifications.french-utf8.php" / "Modifications.french.php". and you need add the translation for "add PDF"
Title: Re: PDF Tag
Post by: PLAYBOY on July 17, 2011, 05:56:44 AM
Quote from: Inti31 on July 17, 2011, 05:46:21 AM
Are you using an utf-8?

then you have to enter manually the string  in this file: "Modifications.english-utf8.php" - or whatever language is you prefered one. The package does have only german-utf8 and simple English included.

$txt['pdf'] = 'add PDF';

So if you have a French forum you need to enter the code string in "Modifications.french-utf8.php" / "Modifications.french.php". and you need add the translation for "add PDF"

I just did. I ll let you know if the error occurs again.
Thx.
Title: Re: PDF Tag
Post by: Apllicmz on December 03, 2011, 06:54:39 AM
Good work
when update dont forget

<file name="$languagedir/Modifications.portuguese_pt.php" error="skip">

        <operation>
         <search position="end" />
            <add><![CDATA[
$txt['pdf'] = 'Adicionar PDF';]]></add>
        </operation>
       </file>
        <file name="$languagedir/Modifications.portuguese_pt-utf8.php" error="skip">

        <operation>
         <search position="end" />
            <add><![CDATA[
$txt['pdf'] = 'Adicionar PDF';]]></add>
        </operation>
       </file>
       <file name="$languagedir/Modifications.portuguese_brazilian.php" error="skip">

        <operation>
         <search position="end" />
            <add><![CDATA[
$txt['pdf'] = 'Adicionar PDF';]]></add>
        </operation>
       </file>
        <file name="$languagedir/Modifications.portuguese_brazilian-utf8.php" error="skip">

        <operation>
         <search position="end" />
            <add><![CDATA[
$txt['pdf'] = 'Adicionar PDF';]]></add>
        </operation>
       </file>

Title: Re: PDF Tag
Post by: thebouncer2004 on January 04, 2012, 09:13:57 AM
I just upgraded my site from SMF 1.07 to 2.02 and I lost PDF Tag as a result. Previously PDF tag was working flawlessly. Now after I installed it in 2.02 I get the dreaded "File does not begin with '%PDF'" error message and I do not know what to do.

I went through the instructions I have seen for the code that should be modified for PDF Tag and it all seems to be correct. Not sure what else I can do. Any help would be appreciated as this just caused major problems on my forum as we use embedded PDF's
Title: Re: PDF Tag
Post by: thebouncer2004 on January 05, 2012, 09:33:07 PM
Ok this is really odd. I just discovered this.... It will give the error message when I post the PDF message and view the post, but if I hit REPLY the PDF shows up fine with no error. Anyone have any ideas why it would do this. It was working fine before upgrading to SMF 2.0 from 1.17
Title: Re: PDF Tag
Post by: r2d2-trader on February 01, 2012, 05:09:15 PM
great mod - works fine with Firefox - but when using IE i have run into problems. May someone is having an idea?

Here is the link: hxxp://www.fxtester.de/3562/erlaeuterungen-zum-forex-artikel/

thx Rob

Title: Re: PDF Tag
Post by: Baloch on July 22, 2012, 04:45:27 AM
Is it working with latest versions of SMF?
Title: Re: PDF Tag
Post by: PLAYBOY on July 23, 2012, 12:23:02 AM
Yes
Title: Re: PDF Tag
Post by: PLAYBOY on December 06, 2012, 04:10:17 AM
Regular members dont see the pdfs. It shows them like they are broken images. Just an X on the boxes. Can somebody please help me?

Also is there anyway to adjust the size of the boxes for pdfs? or maybe it would be a nice feature for the next version.

Thanks.
Title: Re: PDF Tag
Post by: Aoife on January 17, 2013, 07:13:05 AM
Quote from: r2d2-trader on February 01, 2012, 05:09:15 PM
great mod - works fine with Firefox - but when using IE i have run into problems. May someone is having an idea?

I'm having the same issue in SMF 2.0.3 - works fine in FF but not in IE10 (shows the frame of the box but just an X in the upper left corner).


FOLLOW UP:  IE10 32-bit will display the pdf but not 64-bit. So if you insist on using IE, be sure it's the 32-bit version. Otherwise just use FF or Chrome, etc.






Title: Re: PDF Tag
Post by: Chen Zhen on January 18, 2013, 02:12:14 PM
Quote from: aoife on January 17, 2013, 07:13:05 AM
Quote from: r2d2-trader on February 01, 2012, 05:09:15 PM
great mod - works fine with Firefox - but when using IE i have run into problems. May someone is having an idea?

I'm having the same issue in SMF 2.0.3 - works fine in FF but not in IE10 (shows the frame of the box but just an X in the upper left corner).


FOLLOW UP:  IE10 32-bit will display the pdf but not 64-bit. So if you insist on using IE, be sure it's the 32-bit version. Otherwise just use FF or Chrome, etc.

aoife,

pdf file types will open in IE10 (64 bit) (via Adobe Reader) with a simple adjustment. This is assuming that you have Adobe Reader installed on your computer.

Open your IE10 64bit browser & navigate to the following:
Tools -> Internet Options -> Programs -> Set Programs -> Associate a file type or protocol with a program

.. it may take a moment to load all the varios file types. Scroll down to pdf file type & double click.. Opt Adobe Reader as the program to open those files, click OK & then click CLOSE.

After the above setting change you should be able to view pdf documents using the IE10 64bit browser (which uses Adobe Reader to view them/it).
Title: Re: PDF Tag
Post by: Aoife on January 18, 2013, 02:33:48 PM
Quote from: -Underdog- on January 18, 2013, 02:12:14 PM
Quote from: aoife on January 17, 2013, 07:13:05 AM
Quote from: r2d2-trader on February 01, 2012, 05:09:15 PM
great mod - works fine with Firefox - but when using IE i have run into problems. May someone is having an idea?

I'm having the same issue in SMF 2.0.3 - works fine in FF but not in IE10 (shows the frame of the box but just an X in the upper left corner).


FOLLOW UP:  IE10 32-bit will display the pdf but not 64-bit. So if you insist on using IE, be sure it's the 32-bit version. Otherwise just use FF or Chrome, etc.

aoife,

pdf file types will open in IE10 (64 bit) (via Adobe Reader) with a simple adjustment. This is assuming that you have Adobe Reader installed on your computer.

Open your IE10 64bit browser & navigate to the following:
Tools -> Internet Options -> Programs -> Set Programs -> Associate a file type or protocol with a program

.. it may take a moment to load all the varios file types. Scroll down to pdf file type & double click.. Opt Adobe Reader as the program to open those files, click OK & then click CLOSE.

After the above setting change you should be able to view pdf documents using the IE10 64bit browser (which uses Adobe Reader to view them/it).

Thank you for the suggestion. I use Adobe Acrobat X and don't have Reader installed on my machines. The .pdf files are associated with Acrobat already - I redid the association and it still does not work with 64-bit. However, it works fine using IE10 32-bit; IE is not my default browser. I was simply looking for a solution for folks that are using the forums and who do use Internet Explorer - it's a solution I found on the Acrobat site.


Title: Re: PDF Tag
Post by: Ataru Moroboshi on July 29, 2014, 07:55:12 AM
Is there any way to embed an attached PDF?
Title: Re: PDF Tag
Post by: 0Connors on March 19, 2015, 11:39:07 AM
Hi all,

Firstly i will say thank you for the mod !

Then i have a question : How i can change zoom of the PDF file for have the perfect scale ?

Example on my website : http://pafteam.com/forum/index.php?topic=5761.0

Thank you,
Title: Re: PDF Tag
Post by: MrMike on July 01, 2016, 01:24:08 PM
I don't know about setting the zoom, but you can set the widow size by modifying the code in Subs.php as follows:

// PDF [pdf]example.pdf[/pdf]
         array(
            'tag' => 'pdf',
            'type' => 'unparsed_content',
            'content' => ($context['browser']['is_ie'] && !$context['browser']['is_mac_ie'] ? '<object type="application/pdf" classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" data="$1" width="800" height="600"><param name="src" value="$1"><embed src="$1" width="800" height="600" /><noembed><a href="$1" target="_blank">$1</a></noembed></object>' : '<embed type="application/pdf" src="$1" width="800" height="600" /><noembed><a href="$1" target="_blank">$1</a></noembed>'),
            'validate' => create_function('&$tag, &$data, $disabled', '
               if (isset($disabled[\'url\']))
                  $tag[\'content\'] = \'$1\';'),
            'disabled_content' => '<a href="$1" target="_blank">$1</a>',
         ),
Title: Re: PDF Tag
Post by: Randem on October 26, 2019, 12:59:27 AM
Aloha, is this MOD still supported? We are updating all our sites and the create_function code needs to be updated in this mod for PHP 7.2. If the MOD is not supported I will make the changes going forward for our sites.
Title: Re: PDF Tag
Post by: aegersz on April 14, 2021, 05:33:48 PM
This mod has a couple of shortcomings as you need the pdf to be located on your system and even then, it will only work on the desktop and not Android cellphones. It also has a 500px by 400px frame.

I have built a 1.3 version for a larger frame using 800x1000 pixels but decided to use this instead HTML code instead:

[html]<embed src="https://website/example.pdf" width="800px" height="1000px" />[/html]




For Android (cell phones) this link needs to be taken but works well for any online pdf:

Click on https://docs.google.com/viewerng/viewer?url=https://website/example.pdf
Title: Re: PDF Tag
Post by: shadav on April 15, 2021, 12:14:18 AM
Quote from: aegersz on April 14, 2021, 05:33:48 PM
This mod has a couple of shortcomings as you need the pdf to be located on your system and even then, it will only work on the desktop and not Android cellphones. It also has a 500px by 400px frame.

I have built a 1.3 version for a larger frame using 800x1000 pixels but decided to use this instead HTML code instead:

[html]<embed src="https://website/example.pdf" width="800px" height="1000px" />[/html]




For Android (cell phones) this link needs to be taken but works well for any online pdf:

Click on https://docs.google.com/viewerng/viewer?url=https://website/example.pdf
please do not upload mods without the mod authors consent
Title: Re: PDF Tag
Post by: aegersz on April 15, 2021, 06:41:14 AM
Oh sorry about that - I didn't see any copyright so I thought it was ok.

It won't happen again.
Title: Re: PDF Tag
Post by: shadav on April 15, 2021, 11:39:26 AM
there's more or less a blanket copyright here on smf....rule of thumb it's not ok to upload the entire mod without the mod authors ok...but you can put in a post instructions on how to update the mod for others use.

:laugh: no worries, I've been slapped myself for doing that as well  :P