Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Document Preview

Security covered Under active development 47 sites

This module allows you to preview various document formats, including PDFs, Microsoft Office files, and text files, directly on your website. It uses the Google Docs API to display these previews in either a simple box or a modal window.

Module for preview documents in different formats: pdf, doc, docx, xls, xlsx, ppt, pptx, txt.

Based on Google Docs API. Provides custom field formatter with 2 view types:
- Simplebox
- Modal window

TUTORIAL:

1. Install this module
2. Create a new media type (for example "File")
3. Set "Document Preview Formatter" for File field
4. Create a custom block type, add filed of your media media type
5. Add formats for your field: pdf, doc, docx, xls, xlsx, ppt, pptx, txt
6. Done. Add your block to the page or Layout Builder

Important! Google Docs API doesn't work on local environments!

Drupal 11 · not 10

Ask your assistant about Document Preview

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • field Drupal core
  • file Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Jun 2025
Latest release
3 months ago
Releases (12 mo)
1
Maintenance
Active

Releases

Version Type Core PHP Release date
2.0.0 Stable 11 Jul 14, 2026
1.1.0 Stable 10–11 Jun 12, 2025