Preview PDF files


This is a preview plugin for PDF files, which are added as an attachment to the Trac wiki page or ticket page.

It uses PDF.js, a general-purpose, web standards-based platform for parsing and rendering PDFs and is licensed under Apache 2.0.

Bugs/Feature Requests

Existing bugs and feature requests for PdfPreviewPlugin are here.

If you have any issues, create a new ticket.


3 / 4


Download the zipped source from here.


You can check out PdfPreviewPlugin from here using Subversion, or browse the source with Trac.


General instructions on installing Trac plugins can be found on the TracPlugins page.

You can install using pip in your Trac project's directory (and/or virtualenv) with:

pip install

After installing, enable the plugin with the following changes to your trac.ini file:

tracpdfpreview.pdfpreview.* = enabled

Add application/pdf to your mimeviewer.mime_map setting. The following example appends it to the default mime_map setting that comes with Trac:

mime_map = text/x-dylan:dylan,text/x-idl:ice,text/x-ada:ads:adb,application/pdf

Recent Changes

15904 by tkob-trac on 2016-10-03 13:30:23
Fix package_data. A patch by jun66j5. refs #12887
15791 by tkob-trac on 2016-09-02 14:54:01
Remove unused code. patch by rjollos. refs #12857
15738 by tkob-trac on 2016-08-29 12:25:29
Fix incomplete quey, closes #12857


Author: tkob-trac
Maintainer: tkob-trac

Last modified 3 years ago Last modified on Jan 3, 2021, 8:06:26 PM