node-html-pdf
node-html-pdf copied to clipboard
Font size is significant larger in rendered pdf
Did I miss something?
My css is:
.page {
width: 8.5in;
height: 11in;
font-size: 16px;
}
It works very well in real brower. But in rendered pdf file, only the 70% of the page width is visible, font-size is larger than it is in real browser. the remaining 30% is cut off.
My options object is empty, and it is same when I specify width and height
let options = {}
/* result is the same
let options = {
width: '8.5in',
height: '11in'
}
*/
pdf.create(invoiceStr, options).toFile('./test.pdf', ()=> {})
What did miss?
i have the same issue. I made the entire page width reduced by half and its started working locally. But same problem after deployment in server.
@marcbachmann Can you please help here. I have my custom fonts for UI and am passing UI html to node api to generate PDF. But i am getting pdf with all weired fonts. How can i solve this
On Windows, locally executed code works fine, however when I upload to server (linux based), while styles applied correctly, all proportions are extremely big compared to original. (Font size)
Update Apparently won't get fixed it seems: See this issue
Same issue
Same issue here, more than a year has passed... is this being taken care of at all?
Same issue, tried reducing the zoom factor but not getting any changes, will this be fixed?
Same here.
same.
Same issue. On mac.
I have the same problem.
Had same issue, solved mine by using em rather than px.
Hi all, has anyone found a solution to this? Experiencing the same thing now.
Same here...
I have the same problem
Same problem
Guys I found something just add to your css file this line:
html { zoom: 0.55; }
Guys I found something just add to your css file this line:
html { zoom: 0.55; }
It's just a temporary solution. but it will work because we zoom in before render to pdf. Any solution for this issues
Guys I found something just add to your css file this line:
html { zoom: 0.55; }
your workaround just saves my day
Guys I found something just add to your css file this line: html { zoom: 0.55; }
your workaround just saves my day
Im glad for you man!
I had this issue with html-pdf however using node-html-pdf solved it. I am aware this issue is on node-html-pdf but am posting this here incase it helps anyone having the same issue with html-pdf - silly me did not realise they were two different libraries.
Guys I found something just add to your css file this line:
html { zoom: 0.55; }
Savior
Guys I found something just add to your css file this line:
html { zoom: 0.55; }
Thanks bro!! It works.. I did like
<html style="zoom: 0.55;">
But still searching for a permanent fix!!
Same Problem
You save my life, bro. Thank you so much
Guys I found something just add to your css file this line:
html { zoom: 0.55; }
You are a genius for thinking it.
You save my day. Thank you so much, bro.
I had this issue with html-pdf however using node-html-pdf solved it. I am aware this issue is on node-html-pdf but am posting this here incase it helps anyone having the same issue with html-pdf - silly me did not realise they were two different libraries.
html { zoom: 0.55; } this is not working any other solution
html { zoom: 0.55; } this is not working and i am creating 40 pages pdf but the middle pages are not behaving similar