mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-09-19 19:07:56 +08:00
handle missing whitespaces before the start of the object #88
This commit is contained in:
@@ -68,6 +68,7 @@
|
|||||||
{
|
{
|
||||||
inObject = false;
|
inObject = false;
|
||||||
endobjFound = true;
|
endobjFound = true;
|
||||||
|
loopProtection = 0;
|
||||||
|
|
||||||
for (int i = 0; i < "endobj".Length; i++)
|
for (int i = 0; i < "endobj".Length; i++)
|
||||||
{
|
{
|
||||||
@@ -133,14 +134,6 @@
|
|||||||
bytes.Seek(offset);
|
bytes.Seek(offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ReadHelper.IsWhitespace(bytes.CurrentByte))
|
|
||||||
{
|
|
||||||
if (bytes.CurrentByte != (byte)'j' && bytes.CurrentByte != (byte)'m')
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var obj = long.Parse(objectNumberBytes.ToString(), CultureInfo.InvariantCulture);
|
var obj = long.Parse(objectNumberBytes.ToString(), CultureInfo.InvariantCulture);
|
||||||
var generation = int.Parse(generationBytes.ToString(), CultureInfo.InvariantCulture);
|
var generation = int.Parse(generationBytes.ToString(), CultureInfo.InvariantCulture);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user