Embedded Google Docs Viewer

Drupal Versions
For Installation

In Drupal 8, this module works on Field fields and enables an online viewers to display the following document files on the web page, including:

  • Adobe Acrobat .pdf
  • Microsoft Word .doc/.docx
  • Microsoft Excel .xls/.xlsx
  • Microsoft PowerPoint .ppt/.pptx files



Follow normal module installation procedure.


Files to be displayed using this module must be accessible on the open web.  The Drupal system must not be behind a firewall, and must be reachable by normal web users.  The files must be stored as public.

The viewer is set to the following default in Drupal 8:

  • width: 80%
  • margin: 10% on left and right
  • height:  400px
  • border:  1px solid black

If these settings are not satisfactory, they need to be modified in CSS, which is located @ /module/gdoc_field/css/gdoc_field.css.


  1. Use the Field field in target content type.  Add one if not available.
  2. Under Manage Display, set the Format of the Field field to Embedded Google Documents Viewer.


  • By default, the viewer's width is 80% with 10% margin on left and right.  Height is 400px by default, with a 1px solid black border.  If this is not satisfactory, modification of CSS at the module is needed.  Refer to Configuration tab above for details.

The viewer cannot display the following:

  • graphic files, such as png, jpg, gif
  • open document format downloaded from google docs
  • file too large


Embedded Google Docs Viewer

Embedded Google Docs Viewer

File field format can be set as Embedded Google Documentss Viewer
gdoc_field.css under /modules/gdoc_field/css
Excel Files displayed under viewer on web page
Excel Files displayed under viewer on web page (with controls)
PowerPoint file displayed under viewer on web page
Based on Need