Skip to content

Commit

Permalink
Fix problem with MultiEncoder DecodeParms. Fixes #97.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gunnsteinn Hall authored and Gunnsteinn Hall committed Aug 9, 2017
1 parent 9e04cbd commit cc6883d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pdf/core/encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -1667,10 +1667,11 @@ func newMultiEncoderFromStream(streamObj *PdfObjectStream) (*MultiEncoder, error
arr, isArray := obj.(*PdfObjectArray)
if isArray {
for _, dictObj := range *arr {
dictObj = TraceToDirectObject(dictObj)
if dict, is := dictObj.(*PdfObjectDictionary); is {
decodeParamsArray = append(decodeParamsArray, dict)
} else {
decodeParamsArray = append(decodeParamsArray, nil)
decodeParamsArray = append(decodeParamsArray, MakeDict())
}
}
}
Expand Down Expand Up @@ -1713,7 +1714,7 @@ func newMultiEncoderFromStream(streamObj *PdfObjectStream) (*MultiEncoder, error
dParams = dict
}

common.Log.Trace("Next name: %s", *name)
common.Log.Trace("Next name: %s, dp: %v, dParams: %v", *name, dp, dParams)
if *name == StreamEncodingFilterNameFlate {
// XXX: need to separate out the DecodeParms..
encoder, err := newFlateEncoderFromStream(streamObj, dParams)
Expand Down

0 comments on commit cc6883d

Please sign in to comment.