Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

119
Visualizações
HTML pdf not showing in safari

i have a php page which shows a list of invoices. clicking on any of those invoices shows its pdf file. When the user clicks on any invoice, the src of the embed tag is changed by jQuery to the appropriate pdf file.

Works very well, but strangely enough it behaves differently in safari then in firefox for instance.

In firefox i can just click on an invoice -> the pdf shows. if i right after that click on another invoice and after that click on the first invoice again -> the pdf shows again.

Safari: If i re-click an invoice, i get a blank pdf (embed tag). And downloading of that pdf results in a 0kb file.

Seems to only happen in safari.

Has anyone encountered this before and maybe know a solution to this issue? i have googled and tried a lot but it's still not working.

Html:
     <div class="card-body">
           <embed id="invoice_scan" src="" type="application/pdf" width="100%" height="400px" />
     </div>


jQuery:
     $('#invoice_scan').attr('src', '/docs/pdf_file1.pdf );
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

I had this issue showing a pdf in an object tag using angular. The fix was to remove type="application/pdf" from the object tag.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda