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 B PdfObject
Dur PdfObject Dur PdfObject
Trans PdfObject Trans PdfObject
//Annots PdfObject
AA PdfObject AA PdfObject
Metadata PdfObject Metadata PdfObject
PieceInfo PdfObject PieceInfo PdfObject
@ -51,7 +50,7 @@ type PdfPage struct {
PresSteps PdfObject PresSteps PdfObject
UserUnit PdfObject UserUnit PdfObject
VP PdfObject VP PdfObject
//Annotations
Annotations []*PdfAnnotation Annotations []*PdfAnnotation
// Primitive container. // Primitive container.

View File

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