summaryrefslogtreecommitdiff
path: root/pdf.go
AgeCommit message (Collapse)Author
2021-11-23gofmt, plus update documentation of recently changed pipeline.UploadImagesNick White
2021-08-30pdf: Always encode images as jpegv0.5.1Nick White
Previously for PDFs using binarised images we kept them as PNG, but there's no good reason to do so, it's better to just get the space savings on offer from jpeg.
2021-08-30adjusted the height of the image in the pdf to 1000px if the smaller option ↵Antonia Rescribe
is chosen
2021-08-17pdf: Stretch words to fit in their boxes, for more perfect embeddingNick White
- Words are stretched to fit their boxes, which means the accuracy is now very high indeed. This was done by modifying gofpdf to add the SetCellStretchToFit function, which will hopefully be upstreamed in due course. - Copy pasting from a PDF works well with lines rarely if ever being erroneously broken by the PDF reader. There was quite a bit of trial-and-error to improve this, and the stretched text plus a space being added after the word in CellFormat was the best (plus preserves accuracy of word and character locations).
2021-08-09pdf: use same line height and origin for all words on a line as it makes ↵Nick White
things neater in the PDF in most cases
2021-08-09pdf: significantly improve character coordinatesNick White
A few good changes to make word coordinate lookups significantly more accurate: - Set font size dynamically based on the line height (previously it was fixed as size 10) - Correct height and width of word boxes (previously they were way too large, which probably didn't make a difference in the general case, but now they're correct) - Set word box margin to zero Also change PDF size to A5 paper, as that's closer to an average book page size.
2020-11-18Switch to a maintained version of gofpdfNick White
2020-04-14Remove unused PreprocPattern, allow sensible defaults with aws setup, and ↵Nick White
add a little more documentation
2020-04-07gofmtNick White