[GH-ISSUE #2849] [langchain]: clarify langchain.unstructured Requirements: libreoffice or libreoffice-core? #2690

Closed
opened 2026-06-05 17:26:18 -04:00 by yindo · 1 comment
Owner

Originally created by @colinbjohnson on GitHub (Feb 28, 2026).
Original GitHub issue: https://github.com/langchain-ai/docs/issues/2849

Type of issue

question

Language

Python

Description

I believe that when using langchain.unstructured that libreoffice-core is sufficient for most (if not all) processing needs on Linux/Docker whereas the documentation says libreoffice. This can be found here: https://docs.langchain.com/oss/python/integrations/providers/unstructured#installation-and-setup

It would be good to clarify when/why:

  • libreoffice is needed
  • libreoffice-core is needed

A quick sanity check on "is this an improvement"? A comparison of a debian:trixie Docker image built with either libreoffice or libreoffice-core installed:

  • libreoffice:
    • image size: 932MB
    • build-time: 306.9s
    • vulnerabilities: Total: 780 (UNKNOWN: 2, LOW: 413, MEDIUM: 196, HIGH: 137, CRITICAL: 32)
  • libreoffice-core:
    • image size: 571MB
    • build-time: 218.6s
    • vulnerabilities: Total: 706 (UNKNOWN: 2, LOW: 348, MEDIUM: 190, HIGH: 134, CRITICAL: 32)
  • debian:trixie (as a comparison):
    • vulnerabilities: Total: 76 (UNKNOWN: 0, LOW: 59, MEDIUM: 15, HIGH: 2, CRITICAL: 0)

A judgement call but the build speed is faster, the image sizes are smaller and the vulnerability count is lower.

Originally created by @colinbjohnson on GitHub (Feb 28, 2026). Original GitHub issue: https://github.com/langchain-ai/docs/issues/2849 ### Type of issue question ### Language Python ### Description I _believe_ that when using langchain.unstructured that `libreoffice-core` is sufficient for most (if not all) processing needs on Linux/Docker whereas the documentation says `libreoffice`. This can be found here: https://docs.langchain.com/oss/python/integrations/providers/unstructured#installation-and-setup It would be good to clarify when/why: * `libreoffice` is needed * `libreoffice-core` is needed A quick sanity check on "is this an improvement"? A comparison of a `debian:trixie` Docker image built with either `libreoffice` or `libreoffice-core` installed: * `libreoffice`: * image size: 932MB * build-time: 306.9s * vulnerabilities: `Total: 780 (UNKNOWN: 2, LOW: 413, MEDIUM: 196, HIGH: 137, CRITICAL: 32)` * `libreoffice-core`: * image size: 571MB * build-time: 218.6s * vulnerabilities: `Total: 706 (UNKNOWN: 2, LOW: 348, MEDIUM: 190, HIGH: 134, CRITICAL: 32)` * `debian:trixie` (as a comparison): * vulnerabilities: `Total: 76 (UNKNOWN: 0, LOW: 59, MEDIUM: 15, HIGH: 2, CRITICAL: 0)` A judgement call but the build speed is faster, the image sizes are smaller and the vulnerability count is lower.
yindo added the langchainexternal labels 2026-06-05 17:26:18 -04:00
yindo closed this issue 2026-06-05 17:26:18 -04:00
Author
Owner

@xXMrNidaXx commented on GitHub (Feb 28, 2026):

TL;DR: libreoffice-core is sufficient for document processing; libreoffice adds GUI components you do not need in a server/Docker context.

Here's the breakdown:

What libreoffice-core Includes:

  • Writer document processing (.docx, .odt, .doc)
  • Calc spreadsheet processing (.xlsx, .ods, .xls)
  • Impress presentation processing (.pptx, .odp, .ppt)
  • PDF export functionality
  • All file format filters
  • soffice headless mode binary

What full libreoffice Adds:

  • GUI (GTK/Qt integration, window manager support)
  • Desktop integration (file associations, icons)
  • Help files and documentation
  • Spell checkers, thesaurus
  • Additional optional components (Base, Draw, Math)

For Unstructured/LangChain Use:

Since unstructured invokes LibreOffice in headless mode (soffice --headless --convert-to), you only need the conversion engine — not the GUI.

Recommended Dockerfile:

RUN apt-get update && apt-get install -y --no-install-recommends \
    libreoffice-core \
    libreoffice-writer \
    libreoffice-calc \
    libreoffice-impress \
    && rm -rf /var/lib/apt/lists/*

If you're only processing .docx files, you can slim down further to just libreoffice-core + libreoffice-writer.

Edge Cases Requiring Full libreoffice:

  • Processing .odg (Draw) or .odf (Math formula) files
  • Certain legacy .doc files with embedded OLE objects that need Draw for rendering
  • Files with complex embedded charts requiring full Calc integration

For 95%+ of document processing use cases in LangChain/Unstructured, libreoffice-core + specific component packages is the right choice. Your image size and vulnerability analysis strongly supports this.

Happy to submit a PR updating the docs if maintainers confirm this approach.

<!-- gh-comment-id:3976634312 --> @xXMrNidaXx commented on GitHub (Feb 28, 2026): **TL;DR: `libreoffice-core` is sufficient for document processing; `libreoffice` adds GUI components you do not need in a server/Docker context.** Here's the breakdown: ### What `libreoffice-core` Includes: - Writer document processing (`.docx`, `.odt`, `.doc`) - Calc spreadsheet processing (`.xlsx`, `.ods`, `.xls`) - Impress presentation processing (`.pptx`, `.odp`, `.ppt`) - PDF export functionality - All file format filters - `soffice` headless mode binary ### What full `libreoffice` Adds: - GUI (GTK/Qt integration, window manager support) - Desktop integration (file associations, icons) - Help files and documentation - Spell checkers, thesaurus - Additional optional components (Base, Draw, Math) ### For Unstructured/LangChain Use: Since `unstructured` invokes LibreOffice in headless mode (`soffice --headless --convert-to`), you only need the conversion engine — not the GUI. **Recommended Dockerfile:** ```dockerfile RUN apt-get update && apt-get install -y --no-install-recommends \ libreoffice-core \ libreoffice-writer \ libreoffice-calc \ libreoffice-impress \ && rm -rf /var/lib/apt/lists/* ``` If you're **only** processing `.docx` files, you can slim down further to just `libreoffice-core` + `libreoffice-writer`. **Edge Cases Requiring Full `libreoffice`:** - Processing `.odg` (Draw) or `.odf` (Math formula) files - Certain legacy `.doc` files with embedded OLE objects that need Draw for rendering - Files with complex embedded charts requiring full Calc integration For 95%+ of document processing use cases in LangChain/Unstructured, `libreoffice-core` + specific component packages is the right choice. Your image size and vulnerability analysis strongly supports this. Happy to submit a PR updating the docs if maintainers confirm this approach.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/docs#2690