parallax / jsPDF

Client-side JavaScript PDF generation for everyone.

Home Page:https://parall.ax/products/jspdf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jspdf :2.5.1 Error Property 'setHeight' does not exist

princegupta1131 opened this issue · comments

Hi Team,

While fixing the vulnerabilities, I have upgraded the jspdf version "jspdf": "1.5.3", to "jspdf": "2.5.1",
but while running I am getting the below error. could you please suggest to me how we can fix this setHeight method
is not working in the latest version

error TS2551: Property 'setHeight' does not exist on type '{ width: number; getWidth: () => number; height: number; getHeight: () => number; }'. Did you mean 'getHeight'?

269       pdf.internal.pageSize.setHeight(imageHeight);
                               ~~~~~~~~~

 node_modules/jspdf/types/index.d.ts:945:9
   945         getHeight: () => number;
               ~~~~~~~~~
   'getHeight' is declared here.
   ```