Annotations fix

https://github.com/unidoc/unidoc/issues/41
This commit is contained in:
Gunnsteinn Hall 2017-04-21 12:08:58 +00:00
parent f36575d3e4
commit 57e576344c
2 changed files with 23 additions and 23 deletions

View File

@ -38,7 +38,6 @@ type PdfPage struct {
B PdfObject
Dur PdfObject
Trans PdfObject
//Annots PdfObject
AA PdfObject
Metadata PdfObject
PieceInfo PdfObject
@ -51,7 +50,7 @@ type PdfPage struct {
PresSteps PdfObject
UserUnit PdfObject
VP PdfObject
//Annotations
Annotations []*PdfAnnotation
// Primitive container.

View File

@ -462,11 +462,6 @@ func (this *PdfReader) loadForms() (*PdfAcroForm, error) {
common.Log.Trace("Has Acro forms")
// Load it.
acroForm, err := this.newPdfAcroFormFromDict(formsDict)
if err != nil {
return nil, err
}
// Ensure we have access to everything.
common.Log.Trace("Traverse the Acroforms structure")
err = this.traverseObjectData(formsDict)
@ -475,6 +470,12 @@ func (this *PdfReader) loadForms() (*PdfAcroForm, error) {
return nil, err
}
// Create the acro forms object.
acroForm, err := this.newPdfAcroFormFromDict(formsDict)
if err != nil {
return nil, err
}
return acroForm, nil
}