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 'fromString' of undefined #2979

Closed
annibuliful opened this issue Oct 25, 2020 · 4 comments
Closed

TypeError: Cannot read property 'fromString' of undefined #2979

annibuliful opened this issue Oct 25, 2020 · 4 comments

Comments

@annibuliful
Copy link

annibuliful commented Oct 25, 2020

When I create new PDF with svg file, it doesn't work

svg file is from fabricjs

const svg = fabricCanvas.toSVG({
        width: fabricCanvas.getWidth(),
        height: fabricCanvas.getHeight(),
        suppressPreamble: true,
      })
      const pdf = new jsPDF()
      pdf.addSvgAsImage(svg, 20, 20, 30, 30)
      pdf.save('2D_PATTERN_EXPORT.pdf')

I use Nextjs to generate PDF

@HackbrettXXX
Copy link
Collaborator

Please provide the entire stacktrace.

@annibuliful
Copy link
Author

Now I change to use add image instead, thank you

@antonkri97
Copy link
Contributor

@HackbrettXXX I just opened corresponding pull request

#2981

@annibuliful
Copy link
Author

Thank you very much

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

3 participants