Skip to content

Commit

Permalink
Merge pull request #4 from nemmarramos/master
Browse files Browse the repository at this point in the history
Update output file of generated pdf
  • Loading branch information
janczer authored May 24, 2018
2 parents fe6f2d0 + b3c058c commit c2b2b54
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ func Generate(html string, css string, out string) {

cssFile, err := ioutil.ReadFile(css)
if err != nil {
panic(err)
return
}
cssStyle := string(cssFile)
Expand Down Expand Up @@ -51,7 +52,7 @@ func Generate(html string, css string, out string) {
for i := 0; i < len(list); i++ {
list[i].draw(pdf)
}
err = pdf.OutputFileAndClose("hello.pdf")
err = pdf.OutputFileAndClose(out)
if err != nil {
fmt.Println("Error pdf", err)
}
Expand Down

0 comments on commit c2b2b54

Please sign in to comment.