Usage

Once the plug-in is successfully installed and activated in WordPress (this is straightforward – see the installation instructions if needed), you can embed your document into either a page or a post using the syntax below. Use the Google Doc Embedder icon in the Visual editor, or the “GDE” button in the HTML editor, to automate some of these functions.

[ gview file="http://full-path.to/file.pdf" ]

! Note: Please remove extra spacing around brackets – this is for display purposes only.

The shortcode uses the following attributes. For information about setting defaults (so you don’t have to use most of these shortcode options), see the Settings page.

file= (required) The fully qualified URL pointing to the file you wish to embed.
width= (optional) Enter a number (in px) or a percent value to override the default width of the embedded document.
height= (optional) Enter a number (in px) or a percent value to override the default height of the embedded document.
save= (optional) Enter a value (1 to show, 0 to hide) to override the default display setting for the download link.
authonly= (optional) Add authonly="1" to only show the download link to logged-in users on an individual file. To set this as the default for all files, use the global setting.
cache= (optional) Add cache="0" to disable integrated document caching (useful only for frequently overwritten files).
lang= (optional) Enter a supported language’s ISO 639-1 Language Code to override the global Default Language setting. See Viewer Options for more information.
force= (optional) Add force="1" to override plug-in’s default error checking, passing all file issues on to the viewer. Recommended for troubleshooting purposes only.

CSS Styling

If you wish to use CSS to style the plug-in’s output, each element has its own class name you can add to your theme’s stylesheet:

.gde-frame – the embedded viewer itself
.gde-text – the download text
.gde-link – the download link

Note that the viewer itself is provided by Google and at this time its overall appearance cannot be changed, apart from minimal toolbar editing options available with the Enhanced Viewer option.

Written by k3 on September 23rd, 2009 at 7:17 pm