Description
Currently, it is not possible to save the selected boxes, such that they can be edited/removed afteewards.
Implementation
Internally, PyMuPDF use a two-step process of annotating and applying redactions.
Censor could safe and read drafted redactions using PyMuPDF. It may require to firstly read and delete the redactions from the document to then draw its content without the drafted redactions.
UI
Applying redactions should be still on Ctrl+S, as it should stay the default action for saving.
Outdated UI considerations
The UI could include an Adw.Splitbutton with items
Apply Redactions... v (default, now Save As...)
| Open Document... (maybe?, now not shown)
| Save Draft...
| Preview (maybe in future?)
The UI could have an additional entry in the current menu and a keyboard shortcut like Ctrl+D could be added:
- Open...
- Save
- Save As...
- Save Draft As...
- Keyboard Shortcuts
- About Censor
But, the menu gets maybe too overloaded with more saving options. Also #111 would add an entry, e.g.,
And, I can imagine another functionality of exporting or importing redactions in JSON format as implemented in PR 214, which may add other entries, e.g.,
- Export Redactions...
- Import Redactions...
➕ few buttons with simple actions according to KISS principle
➕ does not require extra dialog
➖ menu may become overloaded, or maybe I could hide the advanced options in a submenu?
The Gtk.FileDialog does not support adding choices, thus an extra dialog could be shown before saving with saving options (that might also include more, such as optional metadata removal, etc.). See https://discourse.gnome.org/t/gtk4-filedialog-with-choices-option/36577.
➕ less overloaded main menu
➕ extensible for new saving functions and advanced configuration
➖ extra dialog shown on every "first" saving, needs extra warning if redactions have not been applied.
## Description
Currently, it is not possible to save the selected boxes, such that they can be edited/removed afteewards.
## Implementation
Internally, PyMuPDF use a two-step process of annotating and applying redactions.
Censor could safe and read drafted redactions using PyMuPDF. It may require to firstly read and delete the redactions from the document to then draw its content without the drafted redactions.
## UI
Applying redactions should be still on <kbd>Ctrl</kbd>+<kbd>S</kbd>, as it should stay the default action for saving.
<details><summary>Outdated UI considerations</summary>
The UI could include an [Adw.Splitbutton](https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1-latest/class.SplitButton.html) with items
**Apply Redactions... v** (default, now **Save As...**)
| **Open Document...** (maybe?, now not shown)
| **Save Draft...**
| **Preview** (maybe in future?)
</details>
### Additional buttons in saving menu
The UI could have an additional entry in the current menu and a keyboard shortcut like <kbd>Ctrl</kbd>+<kbd>D</kbd> could be added:
* Open...
* Save
* Save As...
* **Save Draft As...**
* Keyboard Shortcuts
* About Censor
But, the menu gets maybe too overloaded with more saving options. Also #111 would add an entry, e.g.,
* **Save Rasterized As...**
And, I can imagine another functionality of exporting or importing redactions in JSON format as implemented in PR 214, which may add other entries, e.g.,
* **Export Redactions...**
* **Import Redactions...**
➕ few buttons with simple actions according to KISS principle
➕ does not require extra dialog
➖ menu may become overloaded, or maybe I could hide the advanced options in a submenu?
### Alternative with extra dialog
The Gtk.FileDialog does not support adding choices, thus an extra dialog could be shown before saving with saving options (that might also include more, such as optional metadata removal, etc.). See https://discourse.gnome.org/t/gtk4-filedialog-with-choices-option/36577.
➕ less overloaded main menu
➕ extensible for new saving functions and advanced configuration
➖ extra dialog shown on every "first" saving, needs extra warning if redactions have not been applied.