Greenbar PDF in Go

Playing with this a little. At first I was having problems printing more than a few lines per page. Then I had problems with the padding around the text. However made some progress! Turns out they were both related. Problem was I found an example that was very strange if it intended to show you how to use the pdf.MultiCell command. I assumed the example had sensible options. I was trying to figure out how to define a custom PDF (Not “A3”, “A4”, “A5”, “Letter”, “Legal”, or “Tabloid”)…You use the NewCustom command. The example showed a pdf.MultiCell command like so pdf.CellFormat(5, 0.2, “6 in x 6 in”, “”, 0, “C”, false, 0, “”), not realizing the 5 basically meant 5″ down. Yes a spacing of 5″ between lines is very normal…Not! So I cut & pasted that into my code then wondered why I was only printing a few lines per page. So it was my fault for assuming an example would use sensible options.

This same command was responsible for the spacing between the lines. I ended up using…
pdf.MultiCell(0, 0.15, fmt.Sprintf(“Line # %d %s\n”, j, “”), “”, “J”, true). Notice the 0.15 to get close printing between lines. This got me much closer than I started with.