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

Table colGroup issue #232

Closed
mjouneh opened this issue Dec 18, 2024 · 2 comments
Closed

Table colGroup issue #232

mjouneh opened this issue Dec 18, 2024 · 2 comments

Comments

@mjouneh
Copy link

mjouneh commented Dec 18, 2024

Getting error after upgrade the library from 2.5.1 to 2.5.17

Provide the HTML code

Share the HTML code that you try to convert.
<table style="" border="1" cellspacing="0" cellpadding="0" id="" data-mce-style="" class=""><thead style="" id="" data-mce-style="" class=""><tr style="" class="" id="" data-mce-style=""><th style="" scope="col" class="" id="" data-mce-style=""><p style="" id="" data-mce-style="" class="">&nbsp;</p></th><th style="" scope="col" class="" id="" data-mce-style=""><p style="" id="" data-mce-style="" class="">&nbsp;</p></th></tr></thead><tbody style="" id="" data-mce-style="" class=""><tr style="" class="" id="" data-mce-style=""><td style="" valign="top" class="" id="" data-mce-style=""><p style="" id="" data-mce-style="" class="">Head 1</p></td><td style="" valign="top" class="" id="" data-mce-style=""><p style="" id="" data-mce-style="" class="">Head 2</p></td></tr><tr style="" class="" id="" data-mce-style=""><td style="" valign="top" class="" id="" data-mce-style=""><p style="" id="" data-mce-style="" class="">Data 1</p></td><td style="" valign="top" class="" id="" data-mce-style=""><table style="" border="1" cellspacing="0" cellpadding="0" id="" data-mce-style="" class=""><tbody style="" id="" data-mce-style="" class=""><tr style="" class="" id="" data-mce-style=""><td style="" valign="top" class="" id="" data-mce-style=""><p style="" id="" data-mce-style="" class="">Sub head 1</p></td><td style="" valign="top" class="" id="" data-mce-style=""><p style="" id="" data-mce-style="" class="">Sub head 2</p></td></tr><tr style="" class="" id="" data-mce-style=""><td style="" valign="top" class="" id="" data-mce-style=""><p style="" id="" data-mce-style="" class="">Sub data 1</p></td><td style="" valign="top" class="" id="" data-mce-style=""><p style="" id="" data-mce-style="" class="">Sub data 2</p></td></tr></tbody></table><p style="" id="" data-mce-style="" class="">&nbsp;</p></td></tr><tr style="" class="" id="" data-mce-style=""><td style="" class="" id="" data-mce-style=""><p style="" id="" data-mce-style="" class="">English EN -&gt; short code 'E'<br style="" id="" data-mce-style="" class="">Chinese ZH -&gt; short code '1' (one)<br style="" id="" data-mce-style="" class="">Russian RU -&gt; short code 'R'&nbsp;<br style="" id="" data-mce-style="" class="">Japanese JA -&gt; short code 'J'</p></td><td style="" class="" id="" data-mce-style=""><table style="" border="0" cellspacing="0" cellpadding="0" id="" data-mce-style="" class=""><colgroup style="" id="" data-mce-style="" class=""><col style="" span="2" id="" data-mce-style="" class=""></colgroup><thead style="" id="" data-mce-style="" class=""><tr style="" class="" id="" data-mce-style=""><td style="" align="right" class="" id="" data-mce-style="">1</td><td style="" align="right" class="" id="" data-mce-style="">2</td></tr><tr style="" class="" id="" data-mce-style=""><th style="" scope="col" align="right" class="" id="" data-mce-style="">3</th><th style="" scope="col" align="right" class="" id="" data-mce-style="">4</th></tr></thead></table><p style="" id="" data-mce-style="" class="">&nbsp;</p></td></tr></tbody></table>
Describe the bug
A clear and concise description of what the bug is. What is the result in the PDF, versus what you expected to see.
getting this error:
Uncaught TypeError TypeError: Cannot read properties of undefined (reading 'getAttribute') at <anonymous> (/Users/I500068/Desktop/works/Projects/Voyager/webapps/sr-pdf-srv/src/node_modules/html-to-pdfmake/index.js:348:51) at <anonymous> (/Users/I500068/Desktop/works/Projects/Voyager/webapps/sr-pdf-srv/src/node_modules/html-to-pdfmake/index.js:326:21) at parseElement (/Users/I500068/Desktop/works/Projects/Voyager/webapps/sr-pdf-srv/src/node_modules/html-to-pdfmake/index.js:323:30) at <anonymous> (/Users/I500068/Desktop/works/Projects/Voyager/webapps/sr-pdf-srv/src/node_modules/html-to-pdfmake/index.js:191:29) at parseElement (/Users/I500068/Desktop/works/Projects/Voyager/webapps/sr-pdf-srv/src/node_modules/html-to-pdfmake/index.js:190:22) at <anonymous> (/Users/I500068/Desktop/works/Projects/Voyager/webapps/sr-pdf-srv/src/node_modules/html-to-pdfmake/index.js:191:29) at parseElement (/Users/I500068/Desktop/works/Projects/Voyager/webapps/sr-pdf-srv/src/node_modules/html-to-pdfmake/index.js:190:22) at <anonymous> (/Users/I500068/Desktop/works/Projects/Voyager/webapps/sr-pdf-srv/src/node_modules/html-to-pdfmake/index.js:191:29) at parseElement (/Users/I500068/Desktop/works/Projects/Voyager/webapps/sr-pdf-srv/src/node_modules/html-to-pdfmake/index.js:190:22) at <anonymous> (/Users/I500068/Desktop/works/Projects/Voyager/webapps/sr-pdf-srv/src/node_modules/html-to-pdfmake/index.js:191:29) at parseElement (/Users/I500068/Desktop/works/Projects/Voyager/webapps/sr-pdf-srv/src/node_modules/html-to-pdfmake/index.js:190:22) at <anonymous> (/Users/I500068/Desktop/works/Projects/Voyager/webapps/sr-pdf-srv/src/node_modules/html-to-pdfmake/index.js:191:29) at parseElement (/Users/I500068/Desktop/works/Projects/Voyager/webapps/sr-pdf-srv/src/node_modules/html-to-pdfmake/index.js:190:22) at convertHtml (/Users/I500068/Desktop/works/Projects/Voyager/webapps/sr-pdf-srv/src/node_modules/html-to-pdfmake/index.js:127:23) at htmlToPdfMake (/Users/I500068/Desktop/works/Projects/Voyager/webapps/sr-pdf-srv/src/node_modules/html-to-pdfmake/index.js:1039:21) at module.exports (/Users/I500068/Desktop/works/Projects/Voyager/webapps/sr-pdf-srv/src/node_modules/html-to-pdfmake/index.js:1054:10) at eval (repl:1:1)

@Aymkdn
Copy link
Owner

Aymkdn commented Dec 19, 2024

Thanks for letting me know. I'm traveling these days. Except a few days before I can have a look at it.

@Aymkdn Aymkdn closed this as completed in 6664c59 Dec 21, 2024
@Aymkdn
Copy link
Owner

Aymkdn commented Dec 21, 2024

Fixed in v2.5.18

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