mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
13 lines
339 B
JavaScript
13 lines
339 B
JavaScript
|
const fs = require('fs')
|
||
|
const { parseXrefTable } = require('../app/lib/pdfjs/parseXrefTable')
|
||
|
|
||
|
const pdfPath = process.argv[2]
|
||
|
|
||
|
async function main() {
|
||
|
const size = (await fs.promises.stat(pdfPath)).size
|
||
|
const xRefEntries = await parseXrefTable(pdfPath, size)
|
||
|
console.log('Xref entries', xRefEntries)
|
||
|
}
|
||
|
|
||
|
main().catch(console.error)
|