-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
"html2pdf__page-break" gives unexpected vertical left aligned line #2
Comments
Yep, that looks like a problem! I'll look into it. |
Hi @eKoopmans thank you for your library, I found a similar error, and this happened if I changed the margin != 1. If margin is set to 1, then the output is ok. I just checked and this seems to happen if I change any of the values that you provide in your example in the README. |
Hi @alundiak @lidijarad, I'd definitely like to resolve this issue but I haven't yet been able to reproduce it. It could be a platform thing. Could you please:
Thanks! |
@eKoopmans
I also tried with |
Hi, as I mentioned in the readme, html2pdf works best with the custom builds of html2canvas and jsPDF included in the The jsFiddle I linked uses the |
ok, then close this issue, if it's not an issue. |
I think it's bug, because as an end consumer, I want to use 3rd party libs and not depend on your own build of the lib code. Otherwise such lib is not well maintainable. When new version/release of html2canvas appear, u will update ur repo and I will have to update my code with file from your repo directly. I would like to install by npm or bower module/component and rely on it strictly from official releases. |
@alundiak I hear you, I'd rather be able to use the stock versions too, but right now that offscreen rendering issue is an unavoidable bug in html2canvas. There's no way I could fix it from the outside. I'm waiting on the pull request to be merged in over there, as soon as it is then there will be no need for custom builds! Your initial issue, with the dark vertical strip to the left of the text, seems separate from the black boxes, and I'd still like to resolve it. Have you tested with the custom html2canvas? |
If u did changes in minified file, then I would suggest u add comment on header of file, so that code researcher realize, that minified file IS NOT the same version as version published on CDN or elsewhere. Doing this, u will show, the reason why u have copy of file in code itself. U know - if I saw it in code, I would know why u have copy. Yes I read it in readme, and I realise the reason of copy in vendor. But hope u agree, that from code perspective, it's not informative, that 3rd-party library has been somehow changed. |
@eKoopmans this is "html2pdf usage - NEW" jsfiddle.
Results is the same: MacOS 10.12.4, Chrome 58.0, Safari 10.1, Firefox 53.0.2 Adobe Acrobat Reader
|
You're going to say this isn't obvious - and you'd probably be right - but again as mentioned in the readme, the order of the dependencies is important. jsPDF includes an out-of-date version of html2canvas internally, so you need to include html2canvas after jsPDF and before html2pdf. I've updated the order of the includes in your fiddle (the only change I made is including html2canvas before html2pdf instead of after). Maybe it would be best to package all of the dependencies together with Browserify and offer a html2pdf.bundle.js to avoid all of these sorts of issues. In any case, please try the link I sent and let me know if it's still producing the black bars or boxes (neither show up for me). |
@eKoopmans :) I tried, and the reality of JS proves that all works fine now. Silly, but have to admit. One bundle would be great. |
Agreed, I'll make a bundle (and NPM package info etc) in the near future. Thanks for helping track down this problem! |
@eKoopmans, I have updated the order in which I load the files and am using your modified versions of the other libs and the output of the pdf seems to be good now. Thank you so much for tending to this so promptly. |
No problem @lidijarad! I'm glad everything's working well, let me know if you run into any other problems. |
Btw, bundle was added in v0.8.0. |
@eKoopmans not sure if this is an issue (yours or jsPDF) or designed feature.
My HTML
So having this
WITH NO custom CSS code gives me a hint I would expect just text on 2 pages.
My JS:
Soch code gives me PDF, and I see some vertical line in content.
This is how Chrome PDF viewer shows:
And this is how Adobe Reader on MacOS shows:
Left aligned from the text, and among whole pages I see vertical line, presumably left-broder, etc.
@eKoopmans will u agree with me, that my expectation TO NOT have that line does at least some sense?
The text was updated successfully, but these errors were encountered: