-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
fromHTML() cuts off line at new page #555
Comments
Too late to comment but still... I am facing the same issue .. were you able to fix it ? |
I have same issue too. Did you find any fix for this issue please? |
same issue here! |
Same issue, no workaround found yet 😢 |
Open the jspdf.js file and modify this: this.pdf.internal.getVerticalCoordinateString(this.y), style.color, "Td"); Erasing "style.color" and save as: this.pdf.internal.getVerticalCoordinateString(this.y), "Td"); And then it runs correctly on firefox and chrome |
am also facing same problem i tried this.pdf.internal.getVerticalCoordinateString(this.y), "Td"); also but its not working pls help me it would be very grate help to me becoz i tried one week |
Fixed in #1492 |
We are in 2021 and I think this is still an issue. Unfortunately, I can´t work inside jspdf.js since I have to use the CDN file and can´t use the file locally to upload it to the server. Any solution for that? Thanks |
@SebastianKut What line is that? I don´t find this line in jspdf.js |
I think this post shouldn´t have been closed @Uzlopak. In your example, you have used the same phare on each line. What happens if you do : Thanks |
@Uzlopak e @SebastianKut I just noticed I was using an old CDN version. I have changed for "https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.5.3/jspdf.min.js" and it worked. |
Im still having this problem and im at latest version :S |
I also have the problem with the latest version. I habe a little bit different scenarion than the example above. I'm currently rendering the html from a big paragraph. |
I updated jspdf to version 2.4.0 , it has "autoPaging" |
if anyone still facing the issue, you can just add Thankss |
I have to build a pdf based on dynamic text. I am using an HTML page to load in stored content from the forms that the user will fill out. When the data exceeds the pagesize a new page is created but a line always gets cut out inbetween the two pages. I have no way of knowing exactly where in the html this will occur because it will always be different based on what you've filled out and can range from 1-20+ pages. So far I've tried css page breaks, 'pagesplit:true', and slightly modifying the fromHTML.js functions to try and change the starting y value(which didnt work). messing with the maxLineHeight variable in the renderTextFragment function showed me the missing line but in an arbitrary position on the page. for example, maxLineHeight = Math.max(maxLineHeight, style["line-height"], style["font-size"])-x; //for x=random number 1-50. seemed to work, but again i would not know where to put this before hand. Any idea how to fix this? Same problem when you exceed two pages(line got cut out between pages 2-3)
The text was updated successfully, but these errors were encountered: