Closed sandeep1027 closed 1 year ago
See https://pkg.go.dev/github.com/SebastiaanKlippert/go-wkhtmltopdf#PageReader you can only add one page from memory (stdin).
https://github.com/SebastiaanKlippert/go-wkhtmltopdf/issues/74 https://github.com/SebastiaanKlippert/go-wkhtmltopdf/issues/54
Anything else is technically not possible.
Hi,
I try this code `htmlfile, err := ioutil.ReadFile("htmlsimple1.html") if err != nil { log.Fatal(err) } page1 := wkhtmltopdf.NewPageReader(bytes.NewReader(htmlfile)) page1.EnableLocalFileAccess.Set(true) //needed to include js page1.FooterHTML.Set("footer.html") page1.HeaderHTML.Set("header.html") pdfg.AddPage(page1)
Pdf first page display content fine but in second page is show blank page.