PDF Integration

Started by RealCop228, July 13, 2010, 06:57:22 PM

Previous topic - Next topic

RealCop228

Hello! I would like to know how to integrate a PDF file into my SMF 2.0 RC3 forum. I have taken a look at this mod; http://custom.simplemachines.org/mods/index.php?mod=1468. But, it makes the PDF file too small. So, any suggestions?

ɔɔɔɔɔɔuɥoɾ

If that mod has only that problem, it seems there is an easy fix

Subs.php


// 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>',
         ),



Look at the code in red


SMF 2.0 RC5

   
Webhost to New Webhost file transfer service, PM me - Fast transfers

RealCop228

Wow, I should have seen that! Thanks!

YogiBear

A workaround is to upload the pdf file as an attachment. Ability Office is very good for converting text to pdf and costs a fraction of Microsoft's boated works suite.

SMF v2.1.4  Mods : Snow & Garland v1.4, Simple Image Upload v2.0.0,  PHP  v.8.1

Advertisement: