hr_test.go 492 B

1234567891011121314151617181920212223242526
  1. package gopdf
  2. import (
  3. "testing"
  4. "github.com/tiechui1994/gopdf/core"
  5. )
  6. func ComplexHLineReport() {
  7. r := core.CreateReport()
  8. r.SetPage("A4", "mm", "P")
  9. r.RegisterExecutor(core.Executor(ComplexHLineReportExecutor), core.Detail)
  10. r.Execute("hr_test.pdf")
  11. r.SaveAtomicCellText("hr_test.txt")
  12. }
  13. func ComplexHLineReportExecutor(report *core.Report) {
  14. hr := NewHLine(report)
  15. hr.SetColor(0)
  16. hr.GenerateAtomicCell()
  17. }
  18. func TestComplexHLineReport(t *testing.T) {
  19. ComplexHLineReport()
  20. }