Closed Bug 1789443 Opened 3 years ago Closed 2 years ago

Smooth the hand signature in FF pdf editor

Categories

(Firefox :: PDF Viewer, enhancement)

Firefox 104
enhancement

Tracking

()

RESOLVED FIXED
115 Branch

People

(Reporter: ngfield, Unassigned)

References

Details

Attachments

(1 file)

Steps to reproduce:

Hand signature in Firefox pdf-editor

Actual results:

The smoothing is set too aggressively and it degrades the signature.

Expected results:

Less aggressive smoothing - preserving all curves.
What a joy it was when I found out that my idea, which I published on Mozilla Ideas, had been heard.
How quickly it passed me by when I found out that it was practically unusable when you made the same mistake as the LibreOffice developers - I hope you'll do better than they did.

The Bugbug bot thinks this bug should belong to the 'Firefox::PDF Viewer' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → PDF Viewer

:Daniel, would you have some links to help me to understand the mistake the LibreOffice devs made ?

Flags: needinfo?(ngfield)

:calixte
Hi and thank for interrest.
The problem with the too agressive smoothing (something like anti-aliasing) in hand pen signature function is same as in LibreOffice Draw - I almost feel like the whole engine was taken from them.

Flags: needinfo?(ngfield)

I'm setting this as a NEW enhancement so that the engineering team could decide if they take into consideration changing this or not.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Hand signature in FF pdf editor → Smooth the hand signature in FF pdf editor

If I were to guess, this bug is basically asking for the maxError argument (currently set to 30) to be lowered slightly; see https://github.com/mozilla/pdf.js/blob/7e5008f0ff013cc2b8f2af10db7f007e7cafe0de/src/display/editor/ink.js#L414-L419

Here is a relevant threads from a Libre Office bug report I reported there years ago. But I don't know exactly what it means. What road is it on ..
https://bugs.documentfoundation.org/show_bug.cgi?id=94699
https://bugs.documentfoundation.org/show_bug.cgi?id=35092

This change is important - because so aggressively smoothing completely changes the shape and character of the signature's uniqueness, at which point it becomes semi-functional and meaningless.

(In reply to Jonas Jenwald [:Snuffleupagus] from comment #5)

If I were to guess, this bug is basically asking for the maxError argument (currently set to 30) to be lowered slightly; see https://github.com/mozilla/pdf.js/blob/7e5008f0ff013cc2b8f2af10db7f007e7cafe0de/src/display/editor/ink.js#L414-L419

Is this the section?

// Interpolate the path entered by the user with some
// Bezier's curves in order to have a smoother path and
// to reduce the data size used to draw it in the PDF.
let bezier;
if (this.currentPath.length !== 1) {
bezier = fitCurve(this.currentPath, 30, null);

Where can I find it in my FF to edit it?

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 115 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: