URL
To display a PDF from an url just pass it to the [src]
attribute.
Html
<ngx-extended-pdf-viewer [(src)]="src" [height]="'90vh'"> </ngx-extended-pdf-viewer>
Typescript
@Component({ ... })
export class FileSourcesComponent {
public src = 'assets/pdfs/pdf-sample.pdf';
public url = new URL('http://pdfviewer.net/assets/pdfs/GraalVM.pdf');
}
Tips
When loading a document from an API as a BLOB, Base64 String or a UInt8Array, consider using a resolver. This allows you to do the API call before actually showing the viewer.
Checkout the Angular Documentation on ResolveFn to learn more about how to set this up.