mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-09-20 20:07:57 +08:00
recover from invalid cross reference position
if we are reading a cross reference offset which contains a number we assumed it was a stream object. if it's not we now brute-force the entire file looking for an 'xref' token. this should be combined with a search for cross-reference streams and should run when we read neither the numeric token or an 'xref' token but for now this fixes the observed issue. also adds number of images to the page api to prevent consumers needing to enumerate.
This commit is contained in:
@@ -164,6 +164,7 @@
|
||||
|
||||
/// <summary>
|
||||
/// Whether the given string is at this position in the input.
|
||||
/// Resets to the current offset once read.
|
||||
/// </summary>
|
||||
public static bool IsString(IInputBytes bytes, string s)
|
||||
{
|
||||
|
Reference in New Issue
Block a user