Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/PdfSharp/Pdf.IO/Parser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ public PdfObject ReadObject(PdfObject pdfObject, PdfObjectID objectID, bool incl
break;

// Acrobat 6 Professional proudly presents: The Null object!
// Even with a one-digit object number an indirect reference x 0 R to this object is
// one character larger than the direct use of null. Probable this is the reason why
// Even with a one-digit object number an indirect reference «x 0 R» to this object is
// one character larger than the direct use of «null». Probable this is the reason why
// it is true that Acrobat Web Capture 6.0 creates this object, but obviously never
// creates a reference to it!
case Symbol.Null:
Expand Down Expand Up @@ -1025,10 +1025,10 @@ internal PdfTrailer ReadTrailer()
// If "startxref" was still not found yet, read the file completely.
string trail = _lexer.ReadRawString(0, length);
idx = trail.LastIndexOf("startxref", StringComparison.Ordinal);
if (idx == -1)
throw new Exception("The StartXRef table could not be found, the file cannot be opened.");
_lexer.Position = idx;
}
if (idx == -1)
throw new Exception("The StartXRef table could not be found, the file cannot be opened.");

ReadSymbol(Symbol.StartXRef);
_lexer.Position = ReadInteger();
Expand Down Expand Up @@ -1237,7 +1237,7 @@ private PdfTrailer ReadXRefStream(PdfCrossReferenceTable xrefTable)
int prev = xrefStream.Elements.GetInteger(PdfCrossReferenceStream.Keys.Prev);
PdfArray w = (PdfArray)xrefStream.Elements.GetValue(PdfCrossReferenceStream.Keys.W);

// E.g.: W[1 2 1] Index[7 12] Size 19
// E.g.: W[1 2 1] ¤ Index[7 12] ¤ Size 19

// Setup subsections.
int subsectionCount;
Expand Down Expand Up @@ -1815,4 +1815,4 @@ public static uint ReadBytes(byte[] bytes, int index, int byteCount)
return value;
}
}
}
}