Open nishant-appvent opened 2 months ago
Facing the same issue. We are using jspdf to convert static html template to pdf, jsPdf internally uses html2canvas for this conversion. Everything was working fine before, but now after chrome v-128 update, the generated pdf seems to break.
Can anyone suggest an alternative library to convert static html to pdf?
Note: The html to be downloaded is not being rendered, so the alternative should be able to handle the conversion without rendering.
We fixed this by removing "zoom" css property from that element. Have a look at this chrome release note, We were also facing this on using scale so we removed it.
Yes i figured. Our application's layout is structured as such that it is not possible to remove zoom property at this point.
The actual correct HtmlElement
The image after converting it through html2canvas version "^1.4.1".
image on commenting this code in node_modules.
var segmentWords = function (value, styles) { // if (FEATURES.SUPPORT_NATIVE_TEXT_SEGMENTATION) { // // eslint-disable-next-line @typescript-eslint/no-explicit-any // var segmenter = new Intl.Segmenter(void 0, { // granularity: 'word' // }); // // eslint-disable-next-line @typescript-eslint/no-explicit-any // return Array.from(segmenter.segment(value)).map(function (segment) { return segment.segment; }); // } return breakWords(value, styles); };
Bug reports:
I am facing this issue in latest chrome version i.e. 128.0.6613.84. While it was working fine with chrome version 127.0.6533.119. Can any one please suggest any solution for this? Can you please look into it, @niklasvh?
Specifications: