diff options
author | daill <ck.daill@gmail.com> | 2018-04-20 21:28:40 +0200 |
---|---|---|
committer | Kurt Jung <kurt.w.jung@gmail.com> | 2018-04-20 15:28:40 -0400 |
commit | 0298ebb7bb539ad17daadce86bedbdfd56c2bcd4 (patch) | |
tree | 468213b03bc137a2014d34651b5101187cbebe6e | |
parent | 892fe1b63b9a9f0b7bcdcdcdeb96cb6fe0d0a2bb (diff) |
EOF error when using reader (#176)
While you're using a reader for i.e. an image you'll receive an EOF from go's io package which leads to pdf creation error
-rw-r--r-- | fpdf.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2990,7 +2990,7 @@ func (f *Fpdf) parsepng(r io.Reader, readdpi bool) (info *ImageInfoType) { func (f *Fpdf) readBeInt32(r io.Reader) (val int32) { err := binary.Read(r, binary.BigEndian, &val) - if err != nil { + if err != nil && err != io.EOF { f.err = err } return |