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

Generation of PDF failed with too much latex formulas #545

Closed
bfueldner opened this issue Sep 19, 2023 · 2 comments · Fixed by #551
Closed

Generation of PDF failed with too much latex formulas #545

bfueldner opened this issue Sep 19, 2023 · 2 comments · Fixed by #551
Labels
bug Something isn't working

Comments

@bfueldner
Copy link

bfueldner commented Sep 19, 2023

Version of Marp Tool

Marp CLI 3.2.1

Operating System

Linux

Environment

  • Linux Mint 21.2 Cinnamon

How to reproduce

  1. Generate markdown file test.md with following content:
# Low-pass filter

$$R = 220\ohm$$
$$C = 10nF$$
$$f_{cutoff} = \frac{1}{2\pi RC} = \frac{1}{2\pi \cdot 220\ohm \cdot 10nF} = 72.34Hz$$

---
  1. Convert to PDF
    $ marp --pdf test.md

test.pdf will be generated without problems.

  1. Copy to content of test.md 150-times into the same file to generate 150 pages with multiple formulas and save it

  2. Convert to PDF again

    $ marp --pdf test.md

Conversion will fail and the console is floated with the base64 encoded HTML version of the input file.

Expected behavior

Conversion of markdown files with unlimited numbers of latex formulas.

Actual behavior

Conversion aborts with the error:

Failed converting Markdown. (net::ERR_ABORTED at data:text/html;base64,<lots of base64 encoded data>

Additional information

No response

@bfueldner bfueldner added the bug Something isn't working label Sep 19, 2023
@yhatt
Copy link
Member

yhatt commented Sep 20, 2023

Perhaps it has reached the limit of URL length for Chromium I think it would be required a proper solution or fallback alternative to data URI.

Workaround: Add --allow-local-files option. It always uses the local file URI instead of data URI.

@bfueldner
Copy link
Author

bfueldner commented Sep 20, 2023

Thank you for the fast response and the workaround! It worked for me and the PDF is generated without problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants