react-pdf icon indicating copy to clipboard operation
react-pdf copied to clipboard

dpi is not prop of Page

Open chathu-novade opened this issue 2 years ago • 0 comments

Describe the bug Try to change dpi of a page and following TypeScript error.

No overload matches this call.
  Overload 1 of 2, '(props: PageProps | Readonly<PageProps>): Page', gave the following error.
    Type '{ children: Element[]; size: "A4";wrap: false; dpi: number; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Page> & Readonly<PageProps>'.
      Property 'dpi' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Page> & Readonly<PageProps>'.
  Overload 2 of 2, '(props: PageProps, context: any): Page', gave the following error.
    Type '{ children: Element[]; size: "A4"; wrap: false; dpi: number; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Page> & Readonly<PageProps>'.
      Property 'dpi' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Page> & Readonly<PageProps>'.ts(2769)

To Reproduce Steps to reproduce the behavior including code snippet (if applies):

  1. Create a TypeScript project.2.
  2. Try to use dpi prop of Page component.3. 3.

Expected behavior Should be able to use dpi prop of the Page component in TypeScript .

Desktop (please complete the following information):

  • OS: MacOS
  • React-pdf version : 2.3.0

chathu-novade avatar Jul 20 '22 12:07 chathu-novade