A fix to take care of broken PDFs that have whitespaces after "stream" before the LF.
git-svn-id: svn://svn.code.sf.net/p/itextsharp/code/trunk@14 820d3149-562b-4f88-9aa4-a8e61a3485cfmaster
parent
f971851d24
commit
688cd64b13
|
@ -1521,7 +1521,11 @@ namespace iTextSharp.text.pdf {
|
|||
int pos = tokens.FilePointer;
|
||||
// be careful in the trailer. May not be a "next" token.
|
||||
if (tokens.NextToken() && tokens.StringValue.Equals("stream")) {
|
||||
int ch = tokens.Read();
|
||||
//skip whitespaces
|
||||
int ch;
|
||||
do {
|
||||
ch = tokens.Read();
|
||||
} while (ch == 32 || ch == 9 || ch == 0 || ch == 12);
|
||||
if (ch != '\n')
|
||||
ch = tokens.Read();
|
||||
if (ch != '\n')
|
||||
|
|
Loading…
Reference in New Issue