-
Notifications
You must be signed in to change notification settings - Fork 151
width % causes parser error #189
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
Comments
i'm having the same problem. did you find out how to address this? |
Keeping an eye on this- I contributed some of the code to handle the widths and percents is not something I was thinking about calculating since its relative to the page size. But if you know the page size + margins to draw a box, it would adding a function to convert percents into EMUs (I believe) https://stackoverflow.com/questions/20194403/openxml-distance-size-units |
For my scenario it turned out I didn't need the % widths, but since it is valid CSS for a td it would be nice if the parser didn't error. I was fighting with it for a few hours trying to narrow down the issue and finally realized it was the % width causing it to crash. |
Facing the same, is there any solution to this?. |
Try removing the spaces between the style fields. Let us know if it works for you |
Same issue here @BeanoKing , did you find a solution? |
I didn't. Ended up moving to a paid solution instead from Apose |
@BeanoKing, @mgiraldo, @nicolasiscoding, @abhinovpankaj, @maximesahagian: I opened a PR to fix this at #256 |
I have a td tag that has a width attribute of 50% which creates this parsing error: InvalidCharacterError: The string contains invalid characters. Invalid XML name: @w
If I remove the % the parsing engine works fine. The exact markup I have that is causing the issue is:
Is this expected behavior and if so is there a workaround?
The text was updated successfully, but these errors were encountered: