# Add an option to turn off the display of "File content preview" or can set not to display content in a certain format

**URL:** <https://tagspaces.discourse.group/t/add-an-option-to-turn-off-the-display-of-file-content-preview-or-can-set-not-to-display-content-in-a-certain-format/273>\
**Category:** Feature requests\
**Created:** [February 6, 2024, 6:51am UTC](https://tagspaces.discourse.group/t/add-an-option-to-turn-off-the-display-of-file-content-preview-or-can-set-not-to-display-content-in-a-certain-format/273 "2024-02-06T06:51:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ihungle](https://avatars.discourse-cdn.com/v4/letter/i/58956e/32.png) [@ihungle](https://tagspaces.discourse.group/u/ihungle)\
**Post date:** [February 6, 2024, 6:51am UTC](https://tagspaces.discourse.group/t/add-an-option-to-turn-off-the-display-of-file-content-preview-or-can-set-not-to-display-content-in-a-certain-format/273/1 "2024-02-06T06:51:56Z")

</div>

新增一个可以关闭"File content preview"显示的选项，因为有些大文件，软件会强制去显示他的内容，会导致软件直接卡死。

---

<div class="post-metadata">

**Author:** ![ilian](https://yyz2.discourse-cdn.com/free1/user_avatar/tagspaces.discourse.group/ilian/32/6_2.png) [@ilian](https://tagspaces.discourse.group/u/ilian)\
**Post date:** [February 6, 2024, 7:02am UTC](https://tagspaces.discourse.group/t/add-an-option-to-turn-off-the-display-of-file-content-preview-or-can-set-not-to-display-content-in-a-certain-format/273/2 "2024-02-06T07:02:30Z")

</div>

You should just remove the extension of the file type you do not want to be previewed from the settings, as shown in the following screenshot:

 ![image](https://global.discourse-cdn.com/free1/uploads/tagspaces/original/1X/2961175b07f57fd5983a139485926d47e9365531.png)

---

<div class="post-metadata">

**Author:** ![nihal.vtnd](https://yyz2.discourse-cdn.com/free1/user_avatar/tagspaces.discourse.group/nihal.vtnd/32/208_2.png) [@nihal.vtnd](https://tagspaces.discourse.group/u/nihal.vtnd)\
**Post date:** [June 14, 2025, 10:10am UTC](https://tagspaces.discourse.group/t/add-an-option-to-turn-off-the-display-of-file-content-preview-or-can-set-not-to-display-content-in-a-certain-format/273/3 "2025-06-14T10:10:03Z")

</div>

Deleting pdf (or any other type) in the Settings \> File Types panel only lasts until the next launch. That’s probably because the app scans the viewer plug-ins and re-adds any extensions they support, so the pdf entry (and the content preview) reappear immediately.

After spending hours wrestling with `extconfig.js` with no success, I tried a simpler fix: patch the pdf-viewer extension itself.

If you want to view the Details + Description of a file without the pdf preview (in the right panel), here’s what worked for me:

By the way, I have no experience with HTML. I used GPT o3 to generate a patch for the existing `index.html` file.

* * *

How to disable TagSpaces’ built-in pdf content preview (macOS 15.1, Tagspaces pro 6.4.9)

1. Quit Tagspaces completely.

2. Install Homebrew (skip if you already have it).

3. In Terminal, run:

4. Go to the folder `/Applications/TagSpaces.app/Contents/Resources`, you’ll find the file `app.asar`. Unpack it so that Electron loads files from `app/` instead of the packed archive:

5. Navigate to the pdf-viewer’s `index.html` file. I found it in the following location.

6. Backup `index.html` so you can revert the changes later.

7. Open `index.html` in TextEdit. The file content starts like this:

8. Within `index.html`, between the 3rd and 4th lines ( after `<head>` and before `<meta charset="utf-8" />` ), paste the following block:

9. This will impose a limit on the size of the pdf file before loading it for preview. You may set `MB_LIMIT` to a positive number if you’d like to preview small pdfs but skip large ones.

10. Save the changes to `index.html`.

11. Restart Tagspaces and click on a pdf. The preview pane in the right panel should now appear blank. It will show only Details + Description for the file.

Hope this saves someone else from a five-hour rabbit hole!
