Closed waaronking closed 4 years ago
Example of what findByteRange returns
const { findByteRange } = require('node-signpdf/dist/helpers');
console.log(findByteRange(pdfBuffer));
{
byteRangeString: '/ByteRange [0 39317 44257 111062]',
byteRange: [ '0', '39317', '44257', '111062' ]
}
{
byteRangeString: '/ByteRange [ 0 /********** /********** /********** ]',
byteRange: [ '0', '/**********', '/**********', '/**********' ]
}
Per #98, this PR adds a findByteRange that properly parses the ByteRange field regardless of the spacing included inside. The function returns a
byteRangeString
and abyteRange
array of values.