Bug 377456 - Please add "eraser"
Summary: Please add "eraser"
Status: RESOLVED WORKSFORME
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: 1.6.2
Platform: Fedora RPMs Linux
: NOR wishlist
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-10 12:07 UTC by yousifjkadom
Modified: 2020-04-29 08:29 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
screenshot showing "Erasers" icons that I added (32.16 KB, image/png)
2019-12-23 12:06 UTC, yousifjkadom
Details

Note You need to log in before you can comment on or make changes to this bug.
Description yousifjkadom 2017-03-10 12:07:15 UTC
Hi. 

Currently Okular lake very important feature: "eraser" which allow to erase contents of pages of PDF (any original content). Annotations that added by Okular already can be removed by right click any of them then click "delete". I mean by "eraser" is eraser able to delete any contents including original (non Okular-based annotation contents).

"Eraser" should has setting can be reached by right click over it's icon. This eraser setting should allow user to select:

- shape of eraser whether circular or square,
- size of eraser. It should be available in 3 sizes: small, medium, & larg.
- color of eraser. It should be white by default, but give user other options like black, yellow, & other colours ..... .

"Eraser" operation should be secure erasing (what called "reduction") by which when user erase something it will never remain hidden under the hod.

"Eraser" when activated it's boarders should be visible by thin boarder so that user can see it's area of operation. I mention this due to that some applications like Xournal (on Fedora) it's eraser has no such visible boarder !

More importantly using this eraser should never result in increase size of PDF file. Okular already has this golden feature (not result in increase size of PDF file by annotation, so please keep it & do not break it).

Best.
Comment 1 Luigi Toscano 2017-03-10 12:48:24 UTC
Okular is not an editor (annotations are a bit different), so this is unlikely to happen.
Comment 2 yousifjkadom 2019-12-23 12:02:49 UTC
Hi. I re-installed Okular on my system today from Fedora repositories. It is version: 1.6.2

I noticed that there are 2 icons can be added to Okular toolbars: 
"Configure Toolbars | Main Toolbar <okular_part> | then added "Eraser" & "Erase Drownings"

But I can not use them ! When I trying any of them no thing happened & I can not erase any thing !

Please is this bug ? Do you add this feature (eraser) ? How to use them & where ?
Comment 3 yousifjkadom 2019-12-23 12:06:50 UTC
Created attachment 124668 [details]
screenshot showing "Erasers"  icons that I added
Comment 4 Yuri Chornoivan 2019-12-23 14:59:18 UTC
(In reply to yousifjkadom from comment #2)
> Hi. I re-installed Okular on my system today from Fedora repositories. It is
> version: 1.6.2
> 
> I noticed that there are 2 icons can be added to Okular toolbars: 
> "Configure Toolbars | Main Toolbar <okular_part> | then added "Eraser" &
> "Erase Drawings"

There is no sense to add them in the default mode. They are for presentations.

> Please is this bug ? Do you add this feature (eraser) ? How to use them &
> where ?

No.

Yes.

Press Ctrl+Shift+P to switch on the Presentation mode. Move the pointer to the top to open the drop-down toolbar. Tap on the color swatch. Draw something. Open the toolbar again. Tap on the Eraser. Erase the drawing. Press Esc to switch the Presentation mode off.

In other words, you can only erase what you have drawn, not the content of the original document.
Comment 5 Nate Graham 2019-12-23 22:30:51 UTC
So in other words this works as intended. Okular is not an image manipulation app, so it doesn't make sense for you to be able to erase its contents. However you can add an opaque annotation to cover up content (for example to redact sensitive text) which is different and already supported.
Comment 6 yousifjkadom 2019-12-24 12:43:32 UTC
@Nate Graham
Dear I have 2 issues with this:

1) I tried the Presentation mode & examine the action of erasers on it. But there is a problem (regardless eraser): the issue is that ALL drawings that I making during presentation mode, ALL of them will disappearing just by exit the presentation mode even if I did not use eraser ! So, is this a bug ? If yes, then inform me so that I will open a new bug.

2) you said "However you can add an opaque annotation to cover up content (for example to redact sensitive text) which is different and already supported."

This is totally not a reduction at all ! If I follow this & cover what I like to erase by opaque annotation such as free hand or highlight, then such annotation(s) will appear in "Annotation" section of left side bar & any one can remove them & by this unhide the underlining text or picture. So, what you suggested is NEVER be possible to considered a reduction (secure eraser).

For point (2) I asked you to re-open this issue, unless there is a hidden option for reduction that I do not know about it & in the last case please inform me by such reduction option & where it found within Okular ! If Okular really contain a reduction option then it is something very great. But by reduction there must no any possibility to discovered the reduced text or image at all & by no any way someone can remove the reduction.
Comment 7 Yuri Chornoivan 2019-12-24 14:49:38 UTC
(In reply to yousifjkadom from comment #6)
> @Nate Graham
> Dear I have 2 issues with this:
> 
> 1) I tried the Presentation mode & examine the action of erasers on it. But
> there is a problem (regardless eraser): the issue is that ALL drawings that
> I making during presentation mode, ALL of them will disappearing just by
> exit the presentation mode even if I did not use eraser ! So, is this a bug
> ? If yes, then inform me so that I will open a new bug.

No, it's not a bug. Just a useful tool for presentation. You show things, you draw arrows, underline things, erase them if needed, then finish your presentation. And voila. You are ready for another one with the untouched original slides.

> 2) you said "However you can add an opaque annotation to cover up content
> (for example to redact sensitive text) which is different and already
> supported."
> 
> This is totally not a reduction at all ! If I follow this & cover what I
> like to erase by opaque annotation such as free hand or highlight, then such
> annotation(s) will appear in "Annotation" section of left side bar & any one
> can remove them & by this unhide the underlining text or picture. So, what
> you suggested is NEVER be possible to considered a reduction (secure eraser).

Just use "File -> Print (Ctrl+P)", choose PDF printer, go to "Options -> PDF options", and check the "Convert to bitmap" item if you want to hide something and do not allow to edit it anymore. No need to get the things overcomplicated.

> For point (2) I asked you to re-open this issue, unless there is a hidden
> option for reduction that I do not know about it & in the last case please
> inform me by such reduction option & where it found within Okular ! If
> Okular really contain a reduction option then it is something very great.
> But by reduction there must no any possibility to discovered the reduced
> text or image at all & by no any way someone can remove the reduction.

Please give us your use case. As it was stated above, Okular is a document viewer/annotation tool and not an editor. If you want to edit PDF just use Inkscape or LibreOffice Draw.
Comment 8 yousifjkadom 2019-12-24 17:10:51 UTC
@Yuri Chornoivan

So, "reduction" is hidden capability of Okular ! But there are the following:

1) there is no "Convert to bitmap" option in my Okular (version 1.6.2). So, is this package building error from packager or it is feature in newer version ? If it is new option in higher version then I can not decides till test it because I'm afraid that "Convert to bitmap" will result in lowering the resolution of PDF or remove OCR from it or convert it from format (text based) PDF into scanned like PDF. Can you explain more about this?

2) currently reduction process is of many steps. To make it easer, you need to add the following:

a- you should add a new annotation tool in the form of "Brash". In the setting of "Brash" there should be the following:

- shape of Brash (circle or rectangle or square)
- color
- size (should be by default medium)

This is needed because currently user need to select "Free hand write" then set annotation, then change it's size to be fit with size of area to be reduced ... & due to no circle or square shape the annotation currently set over exact area precisely ....

b- you should added new icon to be equal to [File -> Print (Ctrl+P)", choose PDF printer, go to "Options -> PDF options", and check the "Convert to bitmap"] so that clicking this icon will lead to achieve all these steps in one click process. Let we call this new suggested icon "Flatten the document". 
This suggested icon you can make it not in toolbar by default & allow advanced users to add them.

Please if you accept my suggestion allow me to open new issue "Improve eraser options".

Regarding Inkscape & LibreOffice Draw, Inkscape have grave limitation that it support edit only single page ! You have to edit page then save it then re-insert it to original PDF & certainly you should delete original page, & this should be repeated with all pages you like to edit !
Regarding LibreOffice Draw, it is not a PDF editor at all. It convert PDF into vector image then working on it. Just after converting PDF into vector image it will be no further a PDF editor. This is the talk of LO team with me within issues that I opened about this.
Comment 9 Yuri Chornoivan 2019-12-24 17:20:53 UTC
(In reply to yousifjkadom from comment #8)
> @Yuri Chornoivan
> 
> So, "reduction" is hidden capability of Okular ! But there are the following:
> 
> 1) there is no "Convert to bitmap" option in my Okular (version 1.6.2). So,
> is this package building error from packager or it is feature in newer
> version ?

Sorry. It is actually "Force rasterization". My wrong reverse translation.
Comment 10 yousifjkadom 2019-12-24 18:35:40 UTC
@Yuri Chornoivan

I tried it. Very bad ! It created output PDF of 48 MB from just original 417 KB PDF ! The original PDF was searchable formatted (text based) PDF while output PDF is scanned like but with SAME resolution so that from outside look it is same of original PDF.

However, may be useful for other users, & for that I re-suggest on you what I mentioned in point (2) in my previous comment. 

Sadly, It seem that no way to have open source efficient PDF editor on Linux natively work .....
Comment 11 yousifjkadom 2020-04-29 08:29:28 UTC
Hi. Please see this issue that I opened it yesterday:
https://bugs.kde.org/show_bug.cgi?id=420726