Skip to content

Commit

Permalink
Add func NewPdfAnnotationWidget() *PdfAnnotationWidget
Browse files Browse the repository at this point in the history
AnnotationWidget are usefull for adding Signature widgets
  • Loading branch information
eflorent2020 committed Jan 28, 2018
1 parent 91660d8 commit f3adc44
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pdf/model/annotations.go
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,15 @@ func NewPdfAnnotationRedact() *PdfAnnotationRedact {
return redactAnnotation
}

// Create a new annotation widget and initializes the underlying primitive.
func NewPdfAnnotationWidget() *PdfAnnotationWidget {
annotation := NewPdfAnnotation()
annotationWidget := &PdfAnnotationWidget{}
annotationWidget.PdfAnnotation = annotation
annotation.SetContext(annotationWidget)
return annotationWidget
}

// Used for PDF parsing. Loads a PDF annotation model from a PDF primitive dictionary object.
// Loads the common PDF annotation dictionary, and anything needed for the annotation subtype.
func (r *PdfReader) newPdfAnnotationFromIndirectObject(container *PdfIndirectObject) (*PdfAnnotation, error) {
Expand Down

0 comments on commit f3adc44

Please sign in to comment.