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

Exporting PDF using DaisyUI #23

Open
hylink-carlos-nieto opened this issue Jan 31, 2024 · 3 comments
Open

Exporting PDF using DaisyUI #23

hylink-carlos-nieto opened this issue Jan 31, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@hylink-carlos-nieto
Copy link

Environment

No response

Reproduction

No response

Describe the bug

I'm trying to export a pdf using this module in a project with DaisyUI, but I'm getting the attached error. Apparently it doesn't load correctly the oklch variables from Daisy.
Thank you in advance if someone can help me with this.

Screenshot 2024-01-31 at 6 18 32 PM

Additional context

No response

Logs

No response

@hylink-carlos-nieto hylink-carlos-nieto added the bug Something isn't working label Jan 31, 2024
@frantortosa
Copy link

Hello, I have the same bug,

Error: Attempting to parse an unsupported color function "oklch"
at Object.parse (html2canvas.esm.js?v=57a7160c:1720:23)

I had no idea it was related to DaisyUI but yes, I also use DaisyUI. Any potential solution for this?

Thanks!

@ichsanmln99
Copy link

i have same problem

Uncaught (in promise) Error: Attempting to parse an unsupported color function "oklch"

any update?

@Nebual
Copy link

Nebual commented May 24, 2024

This seems to be a limitation of the underlying html2canvas library (used by jspdf, which nuxt-pdf uses), there's several issues (niklasvh/html2canvas#3130, niklasvh/html2canvas#3150, niklasvh/html2canvas#2700) mentioning it but the library seems to be unmaintained for the last 2 years.

Each issue has a comment from the author of a fork https://www.npmjs.com/package/html2canvas-pro saying theirs supports oklch, but the fork's git repo only has 2 commits (so the oklch support has been blended into its 'initial commit') which doesn't bode well for longterm success of that fork. Theres another fork that looks to be more open source friendly, but at a glance it doesn't look like it supports oklch yet.

I'm unsure how this package might do much about this, but I'm personally going to look into using Puppeteer for serverside pdf generation instead.

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

No branches or pull requests

4 participants