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

":revealjs_plugin_pdf: enabled" produces "Uncaught ReferenceError: require is not defined" #344

Closed
stenzengel opened this issue Feb 18, 2020 · 4 comments
Labels
Milestone

Comments

@stenzengel
Copy link

When :revealjs_plugin_pdf: enabled is added as described in the readme, the browser console (Chrome and Firefox) displays the following error:

Uncaught ReferenceError: require is not defined
    at print-pdf.js:13

I wonder if this plugin needs to be activated at all, because adding ?print-pdf at the end of the URL seems to work correctly, even if this plugin is not activated.

@obilodeau
Copy link
Member

What version of asciidoctor-reveal.js are you using? I think you are correct by stating that the plugin doesn't need to be activated. On master, I'm 100% sure but other versions I would need to look. I'll need to remove that part of the documentation.

@obilodeau obilodeau added this to the 4.0.0 milestone Feb 18, 2020
@stenzengel
Copy link
Author

I use:

"@asciidoctor/reveal.js": "^3.1.0",
"asciidoctor": "^2.1.1",

@obilodeau
Copy link
Member

obilodeau commented Feb 18, 2020

I managed to track this down. With reveal.js 3.7.0 (the one recommended with asciidoctor-reveal.js 3.1.0), the PDF plugin no longer exists, printing works without it.

Later today I'll modify the documentation:

  • in a 3.1.x maintenance branch: say that the plugin is not required with reveal.js 3.7
  • on master: remove all references to the PDF printing plugin

Thanks for the report!

@stenzengel
Copy link
Author

Thanks!

The hint, that a PDF print is available via ?print-pdf on chrome browser, was helpful for me.

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

No branches or pull requests

2 participants