本文目录

使用插件:Google Doc Embedder

官方下载地址:http://downloads.wordpress.org/plugin/google-document-embedder.zip

Lets you embed MS Office, PDF, and many other file types in a web page using the Google Docs Viewer (no Flash or PDF browser plug-ins required).

Installation:

  1. Upload the entire google-document-embedder folder to the /wp-content/plugins/ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. Done.

Upload the documents to your site using the media upload facility built into WordPress, via FTP, or link to documents on another (public) site. Use the Media Library or Google Doc Embedder button in the Visual editor to build the appropriate shortcode, or use the documentation.

For basic manual instructions, please see the FAQ. For advanced usage, see the web site.

Go to “GDE Settings” (under “Settings” in the admin panel) to change defaults, or override individually using the shortcode syntax in the FAQ.

USAGE: http://www.davistribe.org/gde/usage/

Once the plug-in is successfully installed and activated in WordPress (this is straightforward – see theinstallation instructions if needed), you can embed your document into either a page or a post using the syntax below. GDE integrates with the WordPress visual editor, and to a lesser degree the Media Library and HTML (text) editor, to automate many of these functions.

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

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. If many of your files start with the same root directory, you can set a File Base URL in your viewer profile and only enter the unique part of the filename here instead of the full URL.
width= (optional) Enter a number (in px) or a percent value to override the program’s default document width.
height= (optional) Enter a number (in px) or a percent value to override the profile’s default document height. Because of the way CSS works, you probably want to enter a pixel value here as a percentage may not function as you expect.
page= (optional) Specify a page number to begin viewing the embedded document.
profile= (optional) Enter the profile ID or name from the profile list for the settings you want to use for the document. If none is specified, the default profile is used.
save= (optional) Enter a value (1 to show, 0 to hide) to override the default display setting for the download link. Note that this setting is ignored on private documents.
cache= (optional) Add cache="0" to disable integrated document caching (useful only for frequently overwritten files).
authonly= (deprecated) Add authonly="1" to only show the download link to logged-in users on an individual file. This feature will be removed in a future version as it is now redundant; please set your download link preferences in your viewer profiles instead.
lang= (deprecated) Enter a supported language’s ISO 639-1 Language Code to override the global Default Language setting. This feature will be removed in a future version as it is now redundant; please set your language preferences in your viewer profiles instead.
force= (removed) This feature is no longer relevant or supported in GDE 2.5+. If needed, you can turn off error checking globally from the Advanced tab in GDE Settings.

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
.gde-error – inline error messages, if enabled (2.3+)

Just about every aspect of the viewer’s appearance can be modified to match your site if you are savvy with CSS and developer tools like Firebug. The Enhanced Viewer will let you easily change page background and border colors as well as modify or hide the toolbar. For full customization, you can provide your own CSS file. You can use the sample “dark” profile provided with the plugin to get started.

测试:

[gview file=”http://www.itp.uni-hannover.de/~giulini/papers/BlackHoleSeminar/Hawking_CMP_1975.pdf”]

[gview file=”http://tahoroom-tahoroom.stor.sinaapp.com/uploads/2012/12/1209.0065.pdf” profile=”3″ height=”700px” width=”1000px” save=”1″]

一条评论

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注