Skip to content

Create a libreoffice build extension to allow docx/pptx to PDF conversion #1361

Open

Description

@ericallam

Papermark is using Trigger.dev v3 but they have to resort to calling out to a separate service (gotenberg.dev) they are running on fly.io to do docx/pptx to PDF conversion (you can see the code here).

It would be great if they could remove the gotenburg.dev call and do the conversion right there in their Trigger.dev task. For that, we will need a Build extension that adds the libreoffice system packages and anything else that is necessary for the conversion (fonts, etc.), and then this package could be used: libreoffice

The extension should try to be as lightweight as possible (e.g. don't install X11). Is it possible to run LibreOffice in "headless" mode?

Whoever creates this extension should make sure and test it inside a new references project in the repo, and run against a local version of trigger.dev. You can copy the hello-world reference project to get something running quickly.

Activity

  1. amuwal commented on Oct 16, 2024

    @amuwal
    Contributor

    hi @ericallam , can i work on this.
    thanks

    and, can i do this for installing libreoffice on the image?

    apt-get install -y \
        libreoffice \
        --no-install-recommends
    

    it's either that or:

    apt-get install -y \
        libreoffice-writer \
        libreoffice-calc \
        libreoffice-impress \
        fonts-liberation \
        --no-install-recommends \
    

    both of these work for pdf conversion but the latter might give out errors for some niche edge cases.

    p.s.
    libreoffice can indeed run in headless mode like thils:
    libreoffice --headless --convert-to pdf filename.docx
    but the libreoffice-convert library is doing the same underhood. (reference)

    thanks again

  2. CuboYe commented on Mar 3, 2026

    @CuboYe

    /attempt #1361\nI’m implementing a lightweight LibreOffice build extension (headless) plus a reference project test against local trigger.dev.

  3. added a commit that references this issue on Mar 3, 2026
    a0a263a
  4. CuboYe commented on Mar 19, 2026

    @CuboYe

    /claim 1361

    Claiming territory for a scoped fix attempt now. If maintainer preference differs, I can adapt quickly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions