From 04e9551b7f6e47a505b950baf44f787028db5cbe Mon Sep 17 00:00:00 2001 From: Jepzter Date: Fri, 20 Dec 2019 23:57:24 +0100 Subject: [PATCH] ISSUE-124, add Line property to TableList. The Line property will draw a Line after every content-row added to the list. The default spaceHeight is set to 1.0 --- internal/examples/pdfs/sample1.pdf | Bin 874372 -> 874738 bytes internal/examples/sample1/main.go | 4 +- internal/tablelist.go | 7 ++++ internal/tablelist_test.go | 59 +++++++++++++++++++++++++++++ pkg/pdf/example_test.go | 4 +- pkg/props/prop.go | 2 + 6 files changed, 74 insertions(+), 2 deletions(-) diff --git a/internal/examples/pdfs/sample1.pdf b/internal/examples/pdfs/sample1.pdf index 36d8989ba2262df1a9d471e8db06c28ed532c413..8a2a309ec67a44fedbc8f810da7930c042b340e8 100644 GIT binary patch delta 5927 zcmZWsWmJ?w+ZF_+mWBmEx+Qj(S`b-KLFrD#1?gS{X?UbVq!w6GNqLa zasxy7QDAg6j_W#wafDZu*ZN!z=v|SX=Ip5<}HE zC6n$N2ju8;PYyF^KG91lHLOjTPpU1fD*Y;GxY;QlS}$^T{*#! zaAhact!tiGJ@iE4%UcewpSf74@Z%js&c`%6oiz7Z;J5Ju-2ghc8MD} z9v7rQhUZuXRNhYv2isidQIEMNW@fMYp{3k9inwWZB3URYK3O4G?v`G|STbd}&yz{_ zTbbrOe-3V>F7UkK?&P5`yIdXw8dv~;$`P3IJip_;nf`kRp%F0hyq8DE7czGixQgsJ z`0QMd=)(F>$Zf@DTItve7QAoJPShDuvL@fr&%OO&C>YZ;`58hG*TnmdHzsH$#!eCr zeVY4B$Faxh(=fz&oZ8;pE423E2MHzH*fh%a4x3e)m$S`q;N2w z(y=kKuj}c=EBui*3DzC!e%$1KG{R_zI^SWGZ;bfOZJ4|qIyb#87^qmZ+rZluFJwc? zlAWJBic)YOo|li$*F*sRyZsI-unXYg7yR9rP+l+Rd99;MdO!;FT{MlO-fsOxo9khp z7GBLZ(nKTa@kF(RDT;ATRT)^;@WZmJATAXC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