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

When using the IE8 browser to generate a QR code, the size of the QR code is distorted #283

Open
asonglife opened this issue Nov 18, 2022 · 0 comments

Comments

@asonglife
Copy link

When using the IE8 browser to generate the QR code, the form of the table tag is used.
There is a problem here: to calculate the height of each cell, use the Math.floor() method. When there is a lot of content, because of the downward rounding, the actual generated QR code size will be much smaller than the actual displayed one. As a guess, the more content, the more severe the size distortion.
It is recommended to use the style attribute when generating the table tag to fix the width and height instead of using the sum of the width and height calculated by the cell as the final width and height of the QR code.
aHTML.push('</table style=“width:100%;height:100%">');
We can set the size of table`s parent node directly and Using margin to make size will cause some strange scenes

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

1 participant