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

286
Visualizações
How to open pdf with JavaScript/vue

I have a application generated with jhipster and vue as admin dashboard. My Java code is connecting to Dropbox downloading images and converting them to pdf and saving them to a folder at the same level like src.

What I want to try now is to download open the pdf in a new tab with a button click. But I am getting the following error:

Can not GET /generatedPdf/toBePrintedPdf 

My code looks like this:

openPdf(){
    window.open("generatedPdf/toBePrintedPdf.pdf", "_blank");
    return false;
}

This is the vue part:

<b-button v-on:click="openPdf" variant="primary">open pdf</b-button>

Can someone help me find my error?

Edit:

Sorry for the late edit it was a hard week with a lot of work for me. I will now send the folder structure as a picture, if there are any other question feel free to ask. The folder called 'generatedPdf' contains the pdf and the marked component is from where I try to open the pdf. Sadly I had to take picture from my phone sorry for that.

Folder structure

about 4 years ago · Juan Pablo Isaza
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