Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Offical apps | Community apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Paperless-ngx
  3. Office conversion fails (LibreOffice / unoconv incompatibilities)

Office conversion fails (LibreOffice / unoconv incompatibilities)

Scheduled Pinned Locked Moved Paperless-ngx
1 Posts 1 Posters 37 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H
    H
    hackepeter
    wrote last edited by
    #1

    Importing Office documents (XLSX, DOCX, DOC) via API, Webinterface and Consume folder fails on my Cloudron Instance with Paperless.

    I found two compatibility issues in the Gotenberg/LibreOffice conversion process. Both could be resolved with a temporary workaround.

    I'm not sure whether this affects all installations or just mine.

    Environment

    Component Version
    Cloudron package 1.66.0
    Paperless-ngx 3.3.0
    LibreOffice 26.2.6.3
    unoconv 0.8.2
    Python 3.14.4

    1. LibreOffice 26.2 incompatibility

    Gotenberg returns HTTP 500 when converting Office documents.

    Debug logs:

    File "/usr/bin/unoconverter", line 1012, in convert
        inputurl = unohelper.absolutize(...)
    
    AttributeError: module 'unohelper' has no attribute 'absolutize'
    

    The installed /usr/bin/unoconverter contains three references to this function:

    1012: inputurl = unohelper.absolutize(...)
    1026: templateurl = unohelper.absolutize(...)
    1166: outputurl = unohelper.absolutize(...)
    

    This appears to be a known LibreOffice 26.2 incompatibility:

    https://bugs.debian.org/1143523

    Workaround: Map the missing function to uno.absolutize().

    After applying this fix, direct XLSX conversion via Gotenberg works (HTTP 200).

    However, importing XLSX through Paperless still fails.

    2. Unsupported unoconv argument

    Paperless sends these parameters to Gotenberg:

    pdfa: PDF/A-2b
    updateIndexes: false
    

    Gotenberg passes --disable-update-indexes to unoconv.

    Debug output:

    unoconv: option --disable-update-indexes not recognized,
    try unoconv -h for a list of all the options
    

    Result:

    exit status 255
    HTTP 500
    

    Workaround: Remove the unsupported argument before unoconv processes it.

    After applying this second fix, XLSX imports through Paperless work again.

    Temporary workaround

    Create /app/data/gotenberg-fix/sitecustomize.py:

    import uno
    import unohelper
    import sys
    
    unohelper.absolutize = uno.absolutize
    
    if "--disable-update-indexes" in sys.argv:
        sys.argv.remove("--disable-update-indexes")
    

    Make sure the file is readable by the cloudron user.

    Stop Gotenberg:

    supervisorctl stop gotenberg
    

    Start it manually with the patch:

    runuser -u cloudron -- env \
      HOME=/home/cloudron \
      PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
      PYTHONPATH=/app/data/gotenberg-fix \
      gotenberg --log-level=debug
    

    This works but is not persistent across restarts.

    The second patch also ignores the updateIndexes=false setting, so it's only a workaround.

    Test results

    Test Before After
    Gotenberg health HTTP 200 HTTP 200
    Direct XLSX conversion HTTP 500 HTTP 200
    XLSX import in Paperless Failed Works

    Direct LibreOffice conversion also works without the workaround.

    Suggested fix

    The Cloudron package likely needs two changes:

    • Update or patch unoconv to replace unohelper.absolutize() with uno.absolutize().
    • Fix the incompatibility between Gotenberg and unoconv regarding --disable-update-indexes.

    Questions

    • Can anyone reproduce this with Paperless-ngx package 1.66.0 on a fresh installation?
    • Are LibreOffice and unoconv versions identical across installations?
    • Could these two issues be addressed in the Cloudron package?

    I haven't tested a fresh installation. The workaround fixes XLSX imports on my existing installation.

    Related issue: https://forum.cloudron.io/topic/13545/gotenberg-permission-issue-and-large-log-volume

    1 Reply Last reply
    0

    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

    With your input, this post could be even better 💗

    Register Login
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Bookmarks
    • Search