Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

285
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!