Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read property 'dict' of undefined #233

Closed
mpolitze opened this issue Aug 18, 2021 · 2 comments
Closed

TypeError: Cannot read property 'dict' of undefined #233

mpolitze opened this issue Aug 18, 2021 · 2 comments

Comments

@mpolitze
Copy link

mpolitze commented Aug 18, 2021

Hi!

for one of my slide decks I am getting the following error from decktape

Printing slide #4       ( 4/23) ...TypeError: Cannot read property 'dict' of undefined
    at parseXObject (/decktape/decktape.js:393:28)
    at /decktape/decktape.js:384:42
    at Array.forEach (<anonymous>)
    at parseResources (/decktape/decktape.js:384:25)
    at parseXObject (/decktape/decktape.js:403:7)
    at /decktape/decktape.js:384:42
    at Array.forEach (<anonymous>)
    at parseResources (/decktape/decktape.js:384:25)
    at parseXObject (/decktape/decktape.js:403:7)
    at /decktape/decktape.js:384:42

If it helps, the slide at question is available here: https://gitlab-nrw-workshop-2021-04.gitlab.io/workshop/slides.html#4

I am a bit lost, it would be nice to have a hint why it fails.

@astefanutti
Copy link
Owner

For some reasons, the PDF generated out of slide #4 contains a reference that cannot be resolved. so the following call returns an undefined result:

const object = page.node.context.lookup(entry);

Interestingly, I've been able to produce a correct PDF by returning early and skipping the unresolved reference:

test.pdf

It would be interesting to understand what is special in slide #4 that leads to that undefined result.

@astefanutti
Copy link
Owner

It should be fixed in version 3.4.1. Feel free to re-open if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants