node-html-pdf icon indicating copy to clipboard operation
node-html-pdf copied to clipboard

PDF document gets cut-off on live server

Open vamsi-kleargroup opened this issue 4 years ago • 8 comments

I use a <table> to render out a report in PDF. The out PDF gets successfully uploaded to AWS S3 storage when tested out locally. But the code when deployed to AWS doesn't yield the same result. The generated PDF is getting Chopped off midway on the horizontal axis. image

vamsi-kleargroup avatar Apr 21 '21 11:04 vamsi-kleargroup

@vamsi-kleargroup I am also facing the same issue. Did you find any workaround to fix this issue?

dmchandru avatar Jun 17 '21 05:06 dmchandru

@dmchandru nope.

vamsi-kleargroup avatar Jun 17 '21 06:06 vamsi-kleargroup

@vamsi-kleargroup What is node version used in AWS?

dmchandru avatar Jun 17 '21 17:06 dmchandru

@vamsi-kleargroup Reduce the font-size in CSS or inline-styles max = 12px

dmchandru avatar Jun 18 '21 12:06 dmchandru

Same problem, any idea how to solved it?

j45t7 avatar Jul 13 '21 11:07 j45t7

I have the same problem. i tried several options and two different html but in all cases it gets cut off

ivex001 avatar Jul 26 '21 15:07 ivex001

@j45t7 @ivex001 Reduce the font-size in your html template as <=12px.

dmchandru avatar Jul 26 '21 17:07 dmchandru

@j45t7 @ivex001 Reduce the font-size in your html template as <=12px.

Indeed was a problem of font size. Mine was set to "em" and i changed them to "12px" and "14px" and now it's working. Thank you @dmchandru

ivex001 avatar Jul 26 '21 21:07 ivex001