VadimDez / ng2-pdf-viewer

📄 PDF Viewer Component for Angular
https://vadimdez.github.io/ng2-pdf-viewer/
MIT License
1.3k stars 419 forks source link

Can't bind to 'fit-to-page' since it isn't a known property of 'pdf-viewer' [VERSION 10.2.2] #1113

Open faizaldong opened 3 months ago

faizaldong commented 3 months ago
  1. If 'pdf-viewer' is an Angular component and it has 'fit-to-page' input, then verify that it is part of this module.
  2. If 'pdf-viewer' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
  3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.

line 122 [fit-to-page]="true"

  <pdf-viewer
    *ngIf="true"
    [src]="someURL"
    [render-text]="true"
    [original-size]="false"
    [zoom-scale]="'somePageWidth'"
    [ERROR] => [fit-to-page]="true"
  ></pdf-viewer>`

To add: I'm upgrading a version from 9.1.5 to 10.2.2. With the 9.1.5 version there is no issue but after upgrading I got the above error in my terminal.

faizaldong commented 3 months ago

@VadimDez please take a look at this issue, seems after I upgraded to the latest version, I got this error.