-
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
.html() function bug #2745
Comments
+1 I have the same problem with Angular 8 @lbravodev |
+1 same |
I guess this library is broken. I have stumbled upon a couple of problems already, and I did download it today. |
If it's any help, I had more success with getting HTML into a PDF with html2pdf (which uses jsPDF) than I did by putting it straight into jsPDF. |
I gave up trying to use this library, it looks bugged and not really well supported anymore. Just use puppeteer running on NodeJS server and take PDF screenshot of the page. It's much easier than using this. You do need a server |
We are currently working on making the |
@Mikhail-MM , seems like puppeteer is the best choice for now. |
But guys, the @lbravodev Chrome has the ability to save an entire HTML page as a PDF. It's not just a screenshot, it's a full PDF. You can select text, you can click links. If the devs of this library are converting HTML to a Canvas before turning to PDF, you lose all of that. Puppeteer is really the way to go. And it is VERY easy... https://blog.risingstack.com/pdf-from-html-node-js-puppeteer/ It has a |
Looks similar to the margin-top issue when using Some mentioned html2pdf above. One thing I don't like is that the PDF file generated using html2pdf is not text searchable. |
This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant. |
Just got a notification of the above action. I want to say this works fine. I have successfully used it in a project. |
Ok, then I'm gonna close this. |
I am using jsPDF module in angular 7 for rendering my page to a new pdf file. Here is some code snippets you can check.
and here is the div element i was trying to render for testing.
the problem is that when the div content is over one page, pdf shows a strange margin on the top of the first page. I have attached a screenshot for some insights.
screenshot
For some reasons, I must use html function and i can't use other functions such as addHTML() or fromHTML().
Why do i have this strange margin? Is there any solution to avoid this issue?
Please help me if you have some solutions. Thanks in advance.
The text was updated successfully, but these errors were encountered: