| 33 | You can install using pip in your Trac project's directory (and/or virtualenv) with: |
| 34 | {{{#!sh |
| 35 | pip install https://trac-hacks.org/browser/pdfpreviewplugin/1.0?format=zip |
| 36 | }}} |
| 37 | |
| 38 | After installing, enable the plugin with the following changes to your trac.ini file: |
| 39 | {{{#!ini |
| 40 | |
| 41 | [components] |
| 42 | tracpdfpreview.pdfpreview.* = enabled |
| 43 | |
| 44 | }}} |
| 45 | |
| 46 | Add `application/pdf` to your `mimeviewer.mime_map` setting. The following example appends it to the default mime_map setting that comes with Trac: |
| 47 | |
| 48 | {{{#!ini |
| 49 | |
| 50 | [mimeviewer] |
| 51 | mime_map = text/x-dylan:dylan,text/x-idl:ice,text/x-ada:ads:adb,application/pdf |
| 52 | |
| 53 | }}} |
| 54 | |