mirror of
https://github.com/unidoc/unipdf.git
synced 2025-04-24 13:48:49 +08:00
Merge pull request #252 from adrg/inline-image-stream-end
Add whitespace tolerance when searching for inline image EI operand
This commit is contained in:
commit
fdee057a6e
@ -411,6 +411,12 @@ func (csp *ContentStreamParser) ParseInlineImage() (*ContentStreamInlineImage, e
|
||||
skipBytes = []byte{}
|
||||
skipBytes = append(skipBytes, c)
|
||||
state = 1
|
||||
} else if c == 'E' {
|
||||
// Allow cases where EI is not preceded by whitespace.
|
||||
// The extra parsing after EI<ws> should be sufficient
|
||||
// in order to decide if the image stream ended.
|
||||
skipBytes = append(skipBytes, c)
|
||||
state = 2
|
||||
} else {
|
||||
im.stream = append(im.stream, c)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user