question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Parsing never ends

See original GitHub issue

Hi, I try to parse a pdf but it never ends

const index = PDFObjectIndex.create();
const pdfParser = new PDFParser();
const parsedPdf = pdfParser.parse(data, index);

The pdf is this one : https://mle-sandbox.s3.amazonaws.com/bug7.pdf

For the moment I don’t see where it’s stuck

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

4reactions
mlecoqcommented, Jul 2, 2019

I have changed my code a bit:

const start = new Date();

const pdf = fs.readFileSync(`${__dirname}/pdf/bug7.pdf`);

const pdfParser = new PDFParser(pdf);

pdfParser.parseDocument().then(parsedPdf => {
    console.log(parsedPdf);
    const end = new Date() - start;
    console.log('Execution time: %dms', end);
});

Parsing is done within 413ms against 8min currently (impressive)

0reactions
mlecoqcommented, Jul 8, 2019

fixed in 1.0.0-beta.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

C++ Parsing Never Stops · Issue #1114 · microsoft/vscode ...
Install Microsoft C/C++ extension. It never stop parsing in Visual Code 1.17. Reproduces without extensions: Yes/No. Copied from original issue: ...
Read more >
Parsing: A never ending story
Parsing : A never ending story. Legacy encodings as. 1. Message Text Format (MTF). Over 250 instances of message types using this en-...
Read more >
powershell - parsing script never ends - Stack Overflow
i have the following script but it does never end executing. what could be the issue ? I tried to debug it but...
Read more >
html.parser — Simple HTML and XHTML parser ... - Python Docs
An HTMLParser instance is fed HTML data and calls handler methods when start tags, end tags, text, comments, and other markup elements are...
Read more >
Homework 2. Generating naive parsers for parsing expression ...
When a parser fails to parse any prefix of its input, it returns None . When it successfully parses a prefix of its...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found