Return to Snippet

Revision: 27495
at June 11, 2010 08:41 by gd6d

Initial Code
 * Code modified by: Street.Walker [at] masedi [dot] net
 * Simple embedding PDF, Presentation file to blog post with Google view.
 * ex:
 * or:
 * embed it with HTML iFrame: <iframe src="" style="width:600px; height:500px;" frameborder="0"></iframe>
 * Source from:
 * implementation for WordPress: use shortcodes
 * usage: [embedpdf width="600px" height="500px"][/embedpdf]
 * adopted from:
 * Copy the code and paste it to your functions.php file under your active theme
 function viewpdf($attr, $url) {
    return '<iframe src="' . $url . '&embedded=true" style="width:' .$attr['width']. '; height:' .$attr['height']. ';" frameborder="0">Your browser should support iFrame to view this PDF document</iframe>';
add_shortcode('embedpdf', 'viewpdf');

Initial URL

Initial Description

Initial Title
Wordpress shortcode : Simple embedding PDF

Initial Tags

Initial Language