-
-
Notifications
You must be signed in to change notification settings - Fork 579
Closed
Labels
Description
Hi,
I am using pdfcpu (latest version from GitHub cloned) on a Mac to fill a PDF with some textboxes (later via API in an application).
If I add content to one of the fields, pdfcpu crashes:
writing out.pdf...
unexpected panic attack: runtime error: slice bounds out of range [1:0]
exit status 1
The slice in question is in this line and selecting a fontID. When I provide a default value like
fontID = "Helv"
if len(da[i-2]) > 1 {
fontID = da[i-2][1:]
}
the pdf is filled successfully.
It would be great if pdfcpu would either give a better error message (like PDF is corrupt with no fontID) or have a default behavior (with warning).
Thanks for this awesome project!