diff --git a/remarks/conversion/drawing.py b/remarks/conversion/drawing.py index ec5e4f0..d67b419 100644 --- a/remarks/conversion/drawing.py +++ b/remarks/conversion/drawing.py @@ -164,6 +164,9 @@ def draw_annotations_on_pdf(data, page, inplace=False): # Scribbles else: + if seg_data == "Eraser": + # Overwrite eraser color to always be white. + seg_data['color-code'] = 2 for seg_points in seg_data["points"]: # https://pymupdf.readthedocs.io/en/latest/recipes-annotations.html#how-to-use-ink-annotations annot = page.add_ink_annot([seg_points]) diff --git a/remarks/conversion/parsing.py b/remarks/conversion/parsing.py index 2a04e03..ac717ca 100644 --- a/remarks/conversion/parsing.py +++ b/remarks/conversion/parsing.py @@ -57,7 +57,7 @@ def process_tool(pen, dims, w, opc): opc = 0.6 # cc = 3 elif tool == "Eraser": - w = 1280 * w * w - 4800 * w + 4510 + w = w * 6 * 2.3 # cc = 2 elif tool == "SharpPencil" or tool == "TiltPencil": w = 16 * w - 27