UNPKG

@saiarlen/pdf-signer-latest

Version:

A JavaScript PDF signer with certificate for NodeJS

12 lines (11 loc) 374 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const getIndexFromRef = (refTable, ref) => { const [rawIndex] = ref.split(' '); const index = parseInt(rawIndex); if (!refTable.offsets.has(index)) { throw new Error(`Failed to locate object "${ref}".`); } return index; }; exports.default = getIndexFromRef;