diff --git a/src/PDF.hs b/src/PDF.hs index e1e7421..0f18b5f 100644 --- a/src/PDF.hs +++ b/src/PDF.hs @@ -182,7 +182,7 @@ readStartXref eolStyle input = BS.length input - BS.length eofMarker - if BS.last input == BS.last eofMarker then 0 else eolOffset startXrefPosition = - previous eolLastByte (eofMarkerPosition - eolOffset) input + 1 + previous eolLastByte (eofMarkerPosition - eolOffset - 1) input + 1 startXrefLength = eofMarkerPosition - eolOffset - startXrefPosition parseDocument :: ByteString -> Either ParseError Document