Accept tracked changes before conversion + jodconverter 4.4.9#3
Open
rychoo2 wants to merge 1 commit into
Open
Conversation
… 4.4.9 Adds an AcceptAllTrackedChangesFilter that applies all redlines in a Writer document (via the .uno:AcceptAllTrackedChanges dispatch) before it is exported, so converted PDFs show the clean "final" view instead of insertion/deletion markup. Non-text documents pass through untouched. The behaviour is controlled by: - a per-request `acceptTrackedChanges` parameter on both /lool/convert-to endpoints, and - a server default `jodconverter.accept-tracked-changes` (env JODCONVERTER_ACCEPT_TRACKED_CHANGES), defaulting to false so existing behaviour is unchanged. Also bumps jodconverter 4.4.7 -> 4.4.9 (LibreOffice-interop patch releases). Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the ability to accept all tracked changes (redlines) before converting a document, so exported PDFs show the clean "final" view rather than insertion/deletion markup. Also bumps jodconverter 4.4.7 → 4.4.9.
By default LibreOffice preserves tracked changes on export, so a docx with revisions can produce a PDF full of change markup. This adds a JODConverter
Filterthat dispatches.uno:AcceptAllTrackedChangeson the loaded document before it is stored.Changes
AcceptAllTrackedChangesFilter(new) — applies all redlines in-process via.uno:AcceptAllTrackedChanges. Guards onWrite.isText(...), so only Writer documents are touched; spreadsheets/presentations pass through untouched. Defensive null checks on context/controller/frame.ConverterController— the filter is wired into theLocalConverterbuilder only when enabled. Enablement is resolved as: per-requestacceptTrackedChangesparam if present, otherwise the server default.application.yml— newjodconverter.accept-tracked-changes(envJODCONVERTER_ACCEPT_TRACKED_CHANGES), default false.Versions.kt—jodConverter4.4.7 → 4.4.9.Behaviour / compatibility
false→ existing conversions are unchanged (non-breaking).POST /lool/convert-to/pdf?acceptTrackedChanges=true(works on both the param and/{format}path endpoints).JODCONVERTER_ACCEPT_TRACKED_CHANGES=trueon the converter container — no change needed in the compare service, which posts to a fixed URL.acceptTrackedChangesparam is ignored byParameterDecoder(doesn't start with itsl/lfd/s/sfdprefixes), so it is not mistaken for a load/store property.Test plan
./gradlew -x test :samples:spring-boot-rest:build) succeedsacceptTrackedChanges=true: markup is gone, revisions appliedJODCONVERTER_ACCEPT_TRACKED_CHANGES=truemakes it apply without the request paramNotes
Versions.ktand should merge cleanly.Made with Cursor