-
-
Notifications
You must be signed in to change notification settings - Fork 223
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
Root-component border is cutoff #587
Comments
Hi! Thanks for re-reporting, and for the example! The issue seems to the the Taking your example, first, I made these changes to make the issue easier to see: .relativeCSS {
border: solid 5px #707070;
}
.testClass {
background: red;
border: solid 5px green;
} Then, in Not sure what a good fix will be here, let me think about it |
I think this is a rendering issue specific to the zoom level. Is it not necessary to worry too much about it? In the printing field, physical length units such as mm/cm/inch/pt are generally used instead of relative units such as px. |
Most web developers use units such as px. Just because a user clicks print does not mean they actually intent to print a physical document. These days, using the browser to save to PDF is very common. Regarding zoom levels, I do not believe that is the issue, but if it were, we have no control over the zoom level the browser sets in the print dialog. |
I tried to scale the printed PDF at different ratios, and generally, the above problem occurs when scaling down the PDF and displays correctly when scaling up. This is not related to the length unit, as long as the border width is too small, the problem will occur. And this is not related to ReactToPrint. Even if I print the entire webpage, the same problem occurs. I think this should be a problem with the browser. |
Could be, browsers don't have a standard printing API so they do all sorts of weird things when printing 😢 |
Long time no see!
react-to-print is very good library
sorry i couldn't reply about 1px solid issue last year、、、
so this issue was closed
A lot of time passed since then.
I was able to reproduce the phenomenon!
https://codesandbox.io/s/react-to-print-forked-gd8onz?file=/example.css:200-285
I did only two things
at your example code
example css
modify relativeCSS and testClass
in this case
border-color #707070 is very light on the #e6ebed in the print preview
The text was updated successfully, but these errors were encountered: