Skip to content

Conversation

@ohxh
Copy link
Owner

@ohxh ohxh commented Jan 15, 2026

Add a document conversion utility with a 60-second timeout to address previous 5-second timeout failures.

This utility was created as a reference in this repository because the actual document conversion code with the 5-second timeout is located in a different, inaccessible repository. The timeout for LibreOffice conversion has been increased from 5 seconds to 60 seconds (1 minute) to prevent premature timeouts for larger documents.


Slack Thread

Open in Cursor Open in Web


Note

Introduces a lightweight LibreOffice-based document-to-PDF conversion utility with a longer timeout and clear failure reporting.

  • Adds document_conversion.py with convert_to_pdf and convert_document_to_pdf
  • Uses headless LibreOffice (soffice/libreoffice) to convert and returns the output path
  • Sets conversion timeout to 60s; aggregates detailed errors for timeouts, missing binaries, and non-zero exits
  • Includes a simple CLI for manual invocation

Written by Cursor Bugbot for commit a6e7450. This will update automatically on new commits. Configure here.

Co-authored-by: oliver <oliver@meetelise.com>
@cursor
Copy link

cursor bot commented Jan 15, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@ohxh ohxh marked this pull request as ready for review January 15, 2026 22:39
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is being reviewed by Cursor Bugbot

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

except FileNotFoundError:
errors.append((cmd, "command not found"))
except Exception as e:
errors.append((cmd, str(e)))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Timeout may double when both commands are tried

Medium Severity

The timeout parameter applies per command attempt, not to the total operation. Since the loop tries both "soffice" and "libreoffice" sequentially, if the first command times out after 60 seconds, the second command will also be attempted with its own 60-second timeout. The actual maximum wait time could be 120 seconds, contradicting the documented 60-second timeout and the PR's stated intent.

Fix in Cursor Fix in Web

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants