Skip to content

Commit

Permalink
fix(pdf): Open the right file in the browser
Browse files Browse the repository at this point in the history
  • Loading branch information
germainlefebvre4 committed Dec 30, 2024
1 parent 8cc8ece commit 0f67210
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/cvrender/pdf/pdf.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ func RenderFormatPDF(cv model.CV, outputDirectory string, inputFilename string,
utils.CheckError(err)
defer w.Close()

localServerUrl := fmt.Sprintf("http://localhost:%d", utils.CliArgs.Port)
localServerUrl := fmt.Sprintf("http://localhost:%d/%s.html", utils.CliArgs.Port, inputFilename)

// Run the server to output the HTML
logrus.Info("Starting a temporary server at address ", localServerUrl)
logrus.Info("Serve temporary the CV on server at address ", localServerUrl)
go func() {
cvserve.StartServer(outputDirectory)

Expand Down

0 comments on commit 0f67210

Please # to comment.