-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
border:dashed renders as solid #210
Comments
I have written email to you about this issue. Please answer as soon as possible. |
I reviewed and it really seems that there is nothing in the source code of the html2canvas about borderStyle (I could be wrong) |
Awesome lib! |
I have the same problem... Anyone have a solution?? |
I Got the same problem. |
Same problem here. |
Maybe this link helps to create a pullrequest http://www.rgraph.net/blog/2013/january/html5-canvas-dashed-lines.html |
Solved by drawing the borders myself, over the canvas returned by html2canvas. Here are the steps:
Here is a fiddle. |
Nice @Rodris! Looks like a good solution as long as the borders are straight/rectangular. I dug into the source code and worked out a way to fix things internally, see #1146. This works with non-rectangular borders as well ( |
@eKoopmans Thanks for the fix! It works great for the dashed borders but now my images seems a bit chopped from the bottom. Is there a way to fix this? |
Can you give me an example? |
Hi @eKoopmans , Still border-radius is not working with latest release of html2canavs. I am using html2canvs in react app. Is there support for border-radious latest version ? Can you please suggest fix for this ? |
same problem here "boder: 2px dashed #9b9b9b" converted into solid. did any one got answer? |
Hi, sorry the changes I spoke of in 2017 weren't merged. It would take someone reworking #1146 to work with the latest version of html2canvas. |
Hi guys, This is a dirty fix but I used this and it worked for me: .whateveryouwant:before { |
Thanks for your help. I will implement it.
…On Wed 27 Mar, 2019, 7:34 PM jasperplender ***@***.*** wrote:
Hi guys,
This is a dirty fix but I used this and it worked for me:
.whateveryouwant:before {
content: "_ _ _ _ _ _ _ _ _ _ _ _ _ _ _";
letter-spacing: 4px;
}
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#210 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AkTdvDqkUikC4P7QJ1PKcsfYYH_Tcbbsks5va3pRgaJpZM4Ap8aN>
.
|
I have experienced a more severe version of this problem with none of the above solutions working. In the end I solved the issue by simply making a div full of dashes and cycling through a lot of fonts until I found a font for which the dashes would be rendered. |
I encountered the same problem. it took me a while to solve it, instead of using dashed border, I remove the border of the div. Then I add polyline SVG and act as a border. Then it fix my problem |
@johnray016 Nice it works. Thank you! |
I'm using version 0.4 and all dashed borders are rendered as solid.
Tried your border test case (https://github.com/niklasvh/html2canvas/blob/master/tests/cases/border/dashed.html) and got the same result.
Tested in latest versions of FF/Chrome/Opera/IE.
The text was updated successfully, but these errors were encountered: