Skip to content

Fix output suffix handling when loading presets - #505

Open
LadaN62 wants to merge 1 commit into
intoolswetrust:masterfrom
LadaN62:fix-output-suffix-presets
Open

LadaN62 wants to merge 1 commit into
intoolswetrust:masterfrom
LadaN62:fix-output-suffix-presets

Conversation

@LadaN62

@LadaN62 LadaN62 commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Fixes output filename handling when switching between presets with different suffixes.

A derived output filename could previously be interpreted as an explicitly selected filename after loading another preset. As a result, the output filename was no longer recomputed with the newly loaded suffix, and suffixes could accumulate, for example:

document_EM.pdf -> document_EM_DL.pdf

instead of:

document_EM.pdf -> document_DL.pdf

The change keeps automatically derived output names in derived mode when a preset is loaded, while preserving explicitly selected output filenames.

It also clears persisted output-file state when starting a new application session, so the first opened document does not inherit a stale output filename from the previous session.

Verification

  • Opening a PDF starts with the expected derived output name.
  • Loading a preset with _EM applies _EM.
  • Switching to a preset with _DL replaces _EM with _DL instead of accumulating suffixes.
  • Toggling "Append suffix to filename" updates the derived output filename.
  • Explicitly entered output filenames remain preserved.
  • mvn -pl distribution -am -DskipTests clean package: BUILD SUCCESS.
  • mvn clean install: 5 DSS test failures. The same 5 failures reproduce unchanged on a clean, unmodified upstream/master checkout at commit 6c9623d.

Documentation

No documentation change is needed. website/docs/JSignPdf.adoc already describes the intended behavior: the output suffix is stored in presets and is used to derive the output filename unless an explicit output file is selected.

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.

1 participant