How can I show a pdf from pdf url in an iframe in angular. currently pdf is getting download...

Discussão em 'Angular' iniciado por Arya Chauhan, Novembro 29, 2024.

  1. Arya Chauhan

    Arya Chauhan Guest

    I have an api response which contains the amazon aws pdf link. Whenever I try to render that pdf in an iframe it gets downloaded and nothing renders inside the iframe. I don't want to use any external library like ng2-pdf-viewer.

    Here is my code snippet.

    <iframe [src]="pdfPreviewURL" type="application/pdf"></iframe>


    Here pdfPreviewURL is the response pdf aws pdf file link.

    Thanks in advance. All suggestions are welcomed.

    Continue reading...

Compartilhe esta Página