1515package main
1616
1717import (
18- "fmt"
1918 "log"
2019 "os"
2120
@@ -67,7 +66,7 @@ func main() {
6766 form := model .NewPdfAcroForm ()
6867 fields := core .MakeArray ()
6968
70- // Create text fields and it's label
69+ // Create text fields and its label
7170 for idx , fdef := range textFieldsDef {
7271 opt := annotator.TextFieldOptions {}
7372 textf , err := annotator .NewTextField (page , fdef .Name , fdef .Rect , opt )
@@ -97,7 +96,7 @@ func main() {
9796
9897 k , err := p .GenerateKDict ()
9998 if err != nil {
100- fmt . Errorf ("Error: %v" , err )
99+ log . Fatalf ("Error: %v" , err )
101100 }
102101
103102 k .Alt = core .MakeString (fdef .Tooltip ) // Set alternative text for the label.
@@ -137,7 +136,7 @@ func main() {
137136 }
138137}
139138
140- // Add Submit button that will submit all fields value .
139+ // Add Submit button that will submit all field values .
141140func addSubmitButton (page * model.PdfPage , form * model.PdfAcroForm ) error {
142141 optSubmit := annotator.FormSubmitActionOptions {
143142 Url : "https://unidoc.io" ,
@@ -163,7 +162,7 @@ func addSubmitButton(page *model.PdfPage, form *model.PdfAcroForm) error {
163162 return nil
164163}
165164
166- // Add Reset button that would reset the specified fields to it's default value.
165+ // Add Reset button that would reset the specified fields to its default value.
167166func addResetButton (page * model.PdfPage , form * model.PdfAcroForm , fields * core.PdfObjectArray ) error {
168167 optReset := annotator.FormResetActionOptions {
169168 Rectangle : draw.Rectangle {
0 commit comments