Created
August 23, 2024 23:04
-
-
Save conholdate-gists/6df525df02c1474d027bf3340e549b73 to your computer and use it in GitHub Desktop.
Add Checkbox in PDF using C# | Insert check boxes in PDF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using (GroupDocs.Annotation.Annotator annotator = new GroupDocs.Annotation.Annotator("input.pdf")) | |
{ | |
GroupDocs.Annotation.Models.FormatSpecificComponents.Pdf.CheckBoxComponent checkbox = new GroupDocs.Annotation.Models.FormatSpecificComponents.Pdf.CheckBoxComponent | |
{ | |
Checked = true, | |
Box = new GroupDocs.Annotation.Models.Rectangle(100, 100, 100, 100), | |
PenColor = 65535, | |
Style = GroupDocs.Annotation.Models.BoxStyle.Star, | |
Replies = new List<GroupDocs.Annotation.Models.Reply> | |
{ | |
new GroupDocs.Annotation.Models.Reply | |
{ | |
Comment = "First comment", | |
RepliedOn = DateTime.Now | |
}, | |
new GroupDocs.Annotation.Models.Reply | |
{ | |
Comment = "Second comment", | |
RepliedOn = DateTime.Now | |
} | |
} | |
}; | |
annotator.Add(checkbox); | |
annotator.Save("checkbox.pdf"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment