fpdf2
fpdf2 copied to clipboard
ink_annotation([]) raises an unclear min() error
FPDF.ink_annotation([]) raises ValueError: min() iterable argument is empty instead of a clear validation error.
Repro:
from fpdf import FPDF
pdf = FPDF()
pdf.add_page()
pdf.ink_annotation([])
Current: ValueError: min() iterable argument is empty
Expected: a clear ValueError saying that coords must contain at least one point.
I can open a PR with the validation and a test if that works.