mirror of
https://github.com/UglyToad/PdfPig.git
synced 2026-03-10 00:23:29 +08:00
#443 fix bug in new calculated offset which caused xref issue
This commit is contained in:
@@ -170,7 +170,7 @@ three %PDF-1.6");
|
|||||||
var result = FileHeaderParser.Parse(scanner.scanner, scanner.bytes, false, log);
|
var result = FileHeaderParser.Parse(scanner.scanner, scanner.bytes, false, log);
|
||||||
|
|
||||||
Assert.Equal(0, scanner.scanner.CurrentPosition);
|
Assert.Equal(0, scanner.scanner.CurrentPosition);
|
||||||
Assert.Equal(129, result.OffsetInFile);
|
Assert.Equal(128, result.OffsetInFile);
|
||||||
Assert.Equal(1.1m, result.Version);
|
Assert.Equal(1.1m, result.Version);
|
||||||
Assert.Equal("PDF-1.1", result.VersionString);
|
Assert.Equal("PDF-1.1", result.VersionString);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -131,7 +131,7 @@
|
|||||||
headerVersion = new HeaderVersion(
|
headerVersion = new HeaderVersion(
|
||||||
version,
|
version,
|
||||||
content.Substring(afterCommentSymbolIndex, versionLength - 1),
|
content.Substring(afterCommentSymbolIndex, versionLength - 1),
|
||||||
currentOffset + afterCommentSymbolIndex);
|
currentOffset + actualIndex);
|
||||||
|
|
||||||
inputBytes.Seek(startPosition);
|
inputBytes.Seek(startPosition);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user