Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set Compression and Set Protection #304

Merged
merged 8 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,23 @@ mock:

.PHONY: examples
examples: font
go run docs/assets/examples/addpage/v2/main.go
go run docs/assets/examples/barcodegrid/v2/main.go
go run docs/assets/examples/billing/v2/main.go
go run docs/assets/examples/cellstyle/v2/main.go
go run docs/assets/examples/compression/v2/main.go
go run docs/assets/examples/customfont/v2/main.go
go run docs/assets/examples/customsize/v2/main.go
go run docs/assets/examples/datamatrixgrid/v2/main.go
go run docs/assets/examples/footer/v2/main.go
go run docs/assets/examples/header/v2/main.go
go run docs/assets/examples/imagegrid/v2/main.go
go run docs/assets/examples/list/v2/main.go
go run docs/assets/examples/margins/v2/main.go
go run docs/assets/examples/maxgridsum/v2/main.go
go run docs/assets/examples/pagenumber/v2/main.go
go run docs/assets/examples/parallelism/v2/main.go
go run docs/assets/examples/protection/v2/main.go
go run docs/assets/examples/qrgrid/v2/main.go
go run docs/assets/examples/signaturegrid/v2/main.go
go run docs/assets/examples/textgrid/v2/main.go
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ always when a new page appear, in this case, a header may have many rows, lines
* With `go get`:

```bash
go get github.com/johnfercher/maroto/v2/pkg@v2.0.0-alpha.15
go get github.com/johnfercher/maroto/v2/pkg@v2.0.0-alpha.16
```


Expand Down
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

[![Mentioned in Awesome Go](https://awesome.re/mentioned-badge.svg)](https://github.com/avelino/awesome-go#template-engines) [![Roadmap](https://img.shields.io/badge/V2-Roadmap-purple)](https://github.com/users/johnfercher/projects/1) [![Discussion](https://img.shields.io/badge/V2-Discussion-blue)](https://github.com/johnfercher/maroto/issues/257) [![Release Notes](https://img.shields.io/badge/Release-Notes-cyan)](https://github.com/johnfercher/maroto/releases) [![Visits Badge](https://badges.pufler.dev/visits/johnfercher/maroto)](https://badges.pufler.dev)

#### Maroto`v2.0.0-alpha.15`is here! Try out:
#### Maroto`v2.0.0-alpha.16`is here! Try out:

* Installation with`go get`:

```bash
go get github.com/johnfercher/maroto/v2/pkg@v2.0.0-alpha.15
go get github.com/johnfercher/maroto/v2/pkg@v2.0.0-alpha.16
```

The public API was completely redesigned with the aim of enhancing the
Expand Down
2 changes: 2 additions & 0 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* [Add Page](v2/features/addpage.md?id=addpage)
* [Barcode](v2/features/barcode.md?id=barcode)
* [Cell Style](v2/features/cellstyle.md?id=cell-style)
* [Compression](v2/features/compression.md?id=compression)
* [Custom Font](v2/features/customfont.md?id=custom-font)
* [Custom Size](v2/features/customsize.md?id=custom-size)
* [Data Matrix](v2/features/datamatrix.md?id=data-matrix)
Expand All @@ -17,6 +18,7 @@
* [Max Grid Sum](v2/features/maxgridsum.md?id=max-grid-sum)
* [Page Number](v2/features/pagenumber.md?id=page-number)
* [Parallelism](v2/features/parallelism.md?id=parallelism)
* [Protection](v2/features/protection.md?id=protection)
* [QR Code](v2/features/qrcode.md?id=qrcode)
* [Signature](v2/features/signature.md?id=signature)
* [Text](v2/features/text.md?id=text)
Expand Down
107 changes: 107 additions & 0 deletions docs/assets/examples/compression/v2/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
package main

import (
"encoding/base64"
"fmt"
"log"
"os"

"github.com/johnfercher/maroto/v2/pkg/components/code"
"github.com/johnfercher/maroto/v2/pkg/components/image"
"github.com/johnfercher/maroto/v2/pkg/components/row"
"github.com/johnfercher/maroto/v2/pkg/components/signature"
"github.com/johnfercher/maroto/v2/pkg/components/text"

"github.com/johnfercher/maroto/v2/pkg/consts/align"
"github.com/johnfercher/maroto/v2/pkg/consts/extension"

"github.com/johnfercher/maroto/v2/pkg"
"github.com/johnfercher/maroto/v2/pkg/config"
"github.com/johnfercher/maroto/v2/pkg/core"
"github.com/johnfercher/maroto/v2/pkg/props"
)

var dummyText = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ac condimentum sem."

func main() {
cfg := config.NewBuilder().
WithCompression(true).
Build()

mrt := pkg.NewMaroto(cfg)
m := pkg.NewMetricsDecorator(mrt)

m.AddRows(
text.NewRow(20, "Main features", props.Text{Size: 15, Top: 6.5}),
)
m.AddRows(buildCodesRow()...)
m.AddRows(buildImagesRow()...)
m.AddRows(buildTextsRow()...)

document, err := m.Generate()
if err != nil {
log.Fatal(err.Error())
}

err = document.Save("docs/assets/pdf/compressionv2.pdf")
if err != nil {
log.Fatal(err.Error())
}

err = document.GetReport().Save("docs/assets/text/compressionv2.txt")
if err != nil {
log.Fatal(err.Error())
}
}

func buildCodesRow() []core.Row {
return []core.Row{
row.New(20).Add(
text.NewCol(4, "Barcode:", props.Text{Size: 15, Top: 6, Align: align.Center}),
code.NewBarCol(8, "barcode", props.Barcode{Center: true, Percent: 70}),
),
row.New(20).Add(
text.NewCol(4, "QrCode:", props.Text{Size: 15, Top: 6, Align: align.Center}),
code.NewQrCol(8, "qrcode", props.Rect{Center: true, Percent: 70}),
),
row.New(20).Add(
text.NewCol(4, "MatrixCode:", props.Text{Size: 15, Top: 6, Align: align.Center}),
code.NewMatrixCol(8, "matrixcode", props.Rect{Center: true, Percent: 70}),
),
}
}

func buildImagesRow() []core.Row {
byteSlices, err := os.ReadFile("docs/assets/images/frontpage.png")
if err != nil {
fmt.Println("Got error while opening file:", err)
os.Exit(1)
}
stringBase64 := base64.StdEncoding.EncodeToString(byteSlices)

return []core.Row{
row.New(20).Add(
text.NewCol(4, "Image From File:", props.Text{Size: 15, Top: 6, Align: align.Center}),
image.NewFromFileCol(8, "docs/assets/images/biplane.jpg", props.Rect{Center: true, Percent: 90}),
),
row.New(20).Add(
text.NewCol(4, "Image From Base64::", props.Text{Size: 15, Top: 6, Align: align.Center}),
image.NewFromBase64Col(8, stringBase64, extension.Png, props.Rect{Center: true, Percent: 90}),
),
}
}

func buildTextsRow() []core.Row {
colText := "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ac condimentum sem."

return []core.Row{
row.New(20).Add(
text.NewCol(4, "Text:", props.Text{Size: 15, Top: 6, Align: align.Center}),
text.NewCol(8, colText, props.Text{Size: 12, Top: 5, Align: align.Center}),
),
row.New(40).Add(
text.NewCol(4, "Signature:", props.Text{Size: 15, Top: 17, Align: align.Center}),
signature.NewCol(8, "Name", props.Font{Size: 10}),
),
}
}
4 changes: 1 addition & 3 deletions docs/assets/examples/list/v2/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package main
import (
"fmt"
"log"
"math/rand"

"github.com/johnfercher/maroto/v2/pkg/components/list"
"github.com/johnfercher/maroto/v2/pkg/components/row"
Expand Down Expand Up @@ -80,8 +79,7 @@ func getObjects(max int) []Object {
var objects []Object
for i := 0; i < max; i++ {
objects = append(objects, Object{
Key: fmt.Sprintf("Key: %d", i),
Value: fmt.Sprintf("Value: %d", rand.Intn(3000)),
Key: fmt.Sprintf("Key: %d", i),
})
}
return objects
Expand Down
39 changes: 39 additions & 0 deletions docs/assets/examples/protection/v2/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package main

import (
"log"

"github.com/johnfercher/maroto/v2/pkg/components/text"
"github.com/johnfercher/maroto/v2/pkg/consts/protection"

"github.com/johnfercher/maroto/v2/pkg"
"github.com/johnfercher/maroto/v2/pkg/config"
)

func main() {
cfg := config.NewBuilder().
WithProtection(protection.None, "user", "owner").
Build()

mrt := pkg.NewMaroto(cfg)
m := pkg.NewMetricsDecorator(mrt)

m.AddRows(
text.NewRow(30, "supersecret content"),
)

document, err := m.Generate()
if err != nil {
log.Fatal(err.Error())
}

err = document.Save("docs/assets/pdf/protectionv2.pdf")
if err != nil {
log.Fatal(err.Error())
}

err = document.GetReport().Save("docs/assets/text/protectionv2.txt")
if err != nil {
log.Fatal(err.Error())
}
}
Binary file modified docs/assets/pdf/addpagev2.pdf
Binary file not shown.
Binary file modified docs/assets/pdf/barcodegridv2.pdf
Binary file not shown.
Binary file modified docs/assets/pdf/billingv2.pdf
Binary file not shown.
Binary file modified docs/assets/pdf/cellstylev2.pdf
Binary file not shown.
Binary file added docs/assets/pdf/compressionv2.pdf
Binary file not shown.
Binary file modified docs/assets/pdf/customfontv2.pdf
Binary file not shown.
Binary file modified docs/assets/pdf/customsizev2.pdf
Binary file not shown.
Binary file modified docs/assets/pdf/datamatrixgridv2.pdf
Binary file not shown.
Binary file modified docs/assets/pdf/footerv2.pdf
Binary file not shown.
Binary file modified docs/assets/pdf/headerv2.pdf
Binary file not shown.
Binary file modified docs/assets/pdf/imagegridv2.pdf
Binary file not shown.
Binary file modified docs/assets/pdf/listv2.pdf
Binary file not shown.
Binary file modified docs/assets/pdf/marginsv2.pdf
Binary file not shown.
Binary file modified docs/assets/pdf/maxgridsumv2.pdf
Binary file not shown.
Binary file modified docs/assets/pdf/pagenumberv2.pdf
Binary file not shown.
Binary file modified docs/assets/pdf/parallelismv2.pdf
Binary file not shown.
Binary file added docs/assets/pdf/protectionv2.pdf
Binary file not shown.
Binary file modified docs/assets/pdf/qrgridv2.pdf
Binary file not shown.
Binary file modified docs/assets/pdf/signaturegridv2.pdf
Binary file not shown.
Binary file modified docs/assets/pdf/textgridv2.pdf
Binary file not shown.
5 changes: 3 additions & 2 deletions docs/assets/text/addpagev2.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
generate -> avg: 3.61ms, executions: [3.61ms]
add_page -> avg: 1519.00ns, executions: [1.52μs]
generate -> avg: 2.49ms, executions: [2.49ms]
add_page -> avg: 1427.00ns, executions: [1.43μs]
file_size -> 3.92Kb
5 changes: 3 additions & 2 deletions docs/assets/text/barcodegridv2.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
generate -> avg: 2.11ms, executions: [2.11ms]
add_cols -> avg: 161.75ns, executions: [308.00ns, 141.00ns, 123.00ns, 75.00ns]
generate -> avg: 1.70ms, executions: [1.70ms]
add_cols -> avg: 193.00ns, executions: [436.00ns, 137.00ns, 125.00ns, 74.00ns]
file_size -> 5.63Kb
11 changes: 6 additions & 5 deletions docs/assets/text/billingv2.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
generate -> avg: 17.09ms, executions: [17.09ms]
header -> avg: 251.00ns, executions: [251.00ns]
footer -> avg: 59.00ns, executions: [59.00ns]
add_row -> avg: 213.50ns, executions: [133.00ns, 294.00ns]
add_cols -> avg: 160.50ns, executions: [150.00ns, 171.00ns]
generate -> avg: 16.76ms, executions: [16.76ms]
header -> avg: 329.00ns, executions: [329.00ns]
footer -> avg: 60.00ns, executions: [60.00ns]
add_row -> avg: 209.00ns, executions: [120.00ns, 298.00ns]
add_cols -> avg: 149.50ns, executions: [134.00ns, 165.00ns]
file_size -> 218.26Kb
5 changes: 3 additions & 2 deletions docs/assets/text/cellstylev2.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
generate -> avg: 18.87ms, executions: [18.87ms]
add_row -> avg: 119.37ns, executions: [0.55μs, 0.23μs, 0.14μs, 0.07μs, 0.15μs, 0.05μs, 0.03μs, 0.03μs, 0.15μs, 0.04μs, 0.04μs, 0.04μs, 0.05μs, 0.03μs, 0.04μs, 0.03μs, 1.72μs, 0.04μs, 0.04μs, 0.04μs, 0.05μs, 0.04μs, 0.04μs, 0.04μs, 0.05μs, 0.03μs, 0.78μs, 0.14μs, 0.15μs, 0.03μs, 0.17μs, 0.05μs, 0.07μs, 0.03μs, 0.12μs, 0.04μs, 0.04μs, 0.04μs, 0.06μs, 0.04μs, 0.04μs, 0.04μs, 0.14μs, 0.04μs, 0.07μs, 0.03μs, 0.05μs, 0.04μs, 0.04μs, 0.04μs, 0.04μs, 0.03μs, 0.54μs, 0.10μs, 0.12μs, 0.04μs, 0.17μs, 0.05μs, 0.05μs, 0.04μs]
generate -> avg: 15.59ms, executions: [15.59ms]
add_row -> avg: 118.85ns, executions: [0.36μs, 0.13μs, 0.08μs, 0.03μs, 0.08μs, 0.02μs, 0.02μs, 0.02μs, 0.07μs, 0.04μs, 0.02μs, 0.02μs, 0.02μs, 0.02μs, 0.02μs, 0.02μs, 0.99μs, 0.02μs, 0.02μs, 0.02μs, 0.03μs, 0.02μs, 0.02μs, 0.02μs, 0.03μs, 0.02μs, 0.48μs, 0.07μs, 0.07μs, 0.02μs, 0.10μs, 0.03μs, 0.03μs, 0.02μs, 0.07μs, 0.02μs, 0.02μs, 0.02μs, 0.03μs, 0.02μs, 0.02μs, 0.02μs, 0.08μs, 0.02μs, 0.02μs, 0.02μs, 0.03μs, 0.02μs, 0.02μs, 0.02μs, 0.02μs, 0.02μs, 3.37μs, 0.07μs, 0.06μs, 0.02μs, 0.08μs, 0.03μs, 0.03μs, 0.02μs]
file_size -> 18.16Kb
3 changes: 3 additions & 0 deletions docs/assets/text/compressionv2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
generate -> avg: 4.06ms, executions: [4.06ms]
add_row -> avg: 138.75ns, executions: [258.00ns, 165.00ns, 101.00ns, 31.00ns]
file_size -> 224.23Kb
5 changes: 3 additions & 2 deletions docs/assets/text/customfontv2.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
generate -> avg: 33.68ms, executions: [33.68ms]
add_cols -> avg: 105.56ns, executions: [0.78μs, 0.15μs, 0.12μs, 0.10μs, 0.11μs, 0.06μs, 0.06μs, 0.05μs, 0.13μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.08μs, 0.05μs, 0.14μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.06μs, 0.05μs, 0.06μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.19μs, 0.05μs, 0.05μs, 0.06μs, 0.05μs, 0.06μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.06μs, 0.05μs, 0.05μs, 0.06μs, 0.05μs, 0.06μs, 0.04μs, 0.05μs, 0.05μs, 2.62μs, 0.10μs, 0.11μs, 0.12μs, 0.15μs, 0.06μs, 0.05μs, 0.05μs, 0.12μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.06μs, 0.05μs, 0.11μs, 0.06μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 1.23μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.12μs, 0.05μs, 0.05μs, 0.09μs, 0.05μs, 0.05μs, 0.05μs, 0.04μs, 0.05μs, 0.05μs, 0.05μs, 0.04μs, 0.04μs, 0.05μs, 0.06μs, 0.04μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.39μs, 0.09μs, 0.09μs, 0.06μs, 0.10μs]
generate -> avg: 32.24ms, executions: [32.24ms]
add_cols -> avg: 97.92ns, executions: [0.67μs, 0.18μs, 0.13μs, 0.07μs, 0.10μs, 0.07μs, 0.06μs, 0.05μs, 0.11μs, 0.05μs, 0.06μs, 0.05μs, 0.05μs, 0.07μs, 0.05μs, 0.05μs, 0.14μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.07μs, 0.05μs, 0.06μs, 0.05μs, 0.05μs, 0.05μs, 0.19μs, 0.05μs, 0.06μs, 0.05μs, 0.05μs, 0.06μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.06μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 2.31μs, 0.13μs, 0.15μs, 0.09μs, 0.14μs, 0.05μs, 0.06μs, 0.05μs, 0.10μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.07μs, 0.05μs, 0.05μs, 0.10μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.69μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.14μs, 0.05μs, 0.05μs, 0.09μs, 0.06μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.07μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.05μs, 0.06μs, 0.36μs, 0.09μs, 0.10μs, 0.05μs, 0.10μs]
file_size -> 206.56Kb
5 changes: 3 additions & 2 deletions docs/assets/text/customsizev2.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
generate -> avg: 2.19ms, executions: [2.19ms]
add_cols -> avg: 394.00ns, executions: [394.00ns]
generate -> avg: 4.35ms, executions: [4.35ms]
add_cols -> avg: 319.00ns, executions: [319.00ns]
file_size -> 205.03Kb
5 changes: 3 additions & 2 deletions docs/assets/text/datamatrixgridv2.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
generate -> avg: 2.92ms, executions: [2.92ms]
add_cols -> avg: 306.75ns, executions: [623.00ns, 241.00ns, 222.00ns, 141.00ns]
generate -> avg: 1.14ms, executions: [1.14ms]
add_cols -> avg: 208.00ns, executions: [469.00ns, 145.00ns, 136.00ns, 82.00ns]
file_size -> 4.58Kb
7 changes: 4 additions & 3 deletions docs/assets/text/footerv2.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
generate -> avg: 9.91ms, executions: [9.91ms]
footer -> avg: 163.00ns, executions: [163.00ns]
add_row -> avg: 59.92ns, executions: [109.00ns, 89.00ns, 62.00ns, 26.00ns, 61.00ns, 22.00ns, 22.00ns, 16.00ns, 66.00ns, 16.00ns, 15.00ns, 14.00ns, 15.00ns, 15.00ns, 15.00ns, 16.00ns, 914.00ns, 16.00ns, 16.00ns, 16.00ns, 17.00ns, 16.00ns, 18.00ns, 17.00ns, 432.00ns, 70.00ns, 50.00ns, 15.00ns, 57.00ns, 16.00ns, 15.00ns, 15.00ns, 60.00ns, 28.00ns, 15.00ns, 15.00ns, 15.00ns, 16.00ns, 16.00ns, 14.00ns, 70.00ns, 16.00ns, 16.00ns, 16.00ns, 15.00ns, 15.00ns, 28.00ns, 18.00ns, 287.00ns, 57.00ns]
generate -> avg: 10.80ms, executions: [10.80ms]
footer -> avg: 216.00ns, executions: [216.00ns]
add_row -> avg: 58.04ns, executions: [108.00ns, 86.00ns, 67.00ns, 24.00ns, 65.00ns, 22.00ns, 16.00ns, 18.00ns, 65.00ns, 16.00ns, 14.00ns, 15.00ns, 16.00ns, 16.00ns, 16.00ns, 14.00ns, 944.00ns, 16.00ns, 15.00ns, 16.00ns, 15.00ns, 14.00ns, 16.00ns, 16.00ns, 401.00ns, 60.00ns, 51.00ns, 17.00ns, 54.00ns, 16.00ns, 16.00ns, 16.00ns, 51.00ns, 16.00ns, 15.00ns, 16.00ns, 15.00ns, 16.00ns, 16.00ns, 15.00ns, 61.00ns, 16.00ns, 16.00ns, 16.00ns, 15.00ns, 15.00ns, 15.00ns, 22.00ns, 255.00ns, 50.00ns]
file_size -> 8.76Kb
7 changes: 4 additions & 3 deletions docs/assets/text/headerv2.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
generate -> avg: 10.13ms, executions: [10.13ms]
header -> avg: 226.00ns, executions: [226.00ns]
add_row -> avg: 59.20ns, executions: [136.00ns, 84.00ns, 28.00ns, 69.00ns, 24.00ns, 15.00ns, 26.00ns, 76.00ns, 16.00ns, 14.00ns, 14.00ns, 16.00ns, 15.00ns, 14.00ns, 14.00ns, 867.00ns, 17.00ns, 16.00ns, 17.00ns, 16.00ns, 20.00ns, 16.00ns, 17.00ns, 17.00ns, 495.00ns, 73.00ns, 17.00ns, 62.00ns, 16.00ns, 16.00ns, 15.00ns, 56.00ns, 15.00ns, 16.00ns, 16.00ns, 15.00ns, 14.00ns, 17.00ns, 15.00ns, 59.00ns, 15.00ns, 15.00ns, 15.00ns, 15.00ns, 15.00ns, 15.00ns, 15.00ns, 14.00ns, 292.00ns, 68.00ns]
generate -> avg: 13.87ms, executions: [13.87ms]
header -> avg: 830.00ns, executions: [830.00ns]
add_row -> avg: 141.86ns, executions: [0.37μs, 0.16μs, 0.06μs, 0.16μs, 0.05μs, 0.04μs, 0.05μs, 0.15μs, 0.04μs, 0.04μs, 0.04μs, 0.04μs, 0.04μs, 0.04μs, 0.04μs, 2.09μs, 0.04μs, 0.04μs, 0.04μs, 0.04μs, 0.04μs, 0.04μs, 0.04μs, 0.04μs, 1.30μs, 0.18μs, 0.04μs, 0.15μs, 0.04μs, 0.04μs, 0.04μs, 0.13μs, 0.04μs, 0.04μs, 0.04μs, 0.04μs, 0.04μs, 0.04μs, 0.04μs, 0.16μs, 0.04μs, 0.04μs, 0.04μs, 0.04μs, 0.04μs, 0.04μs, 0.04μs, 0.04μs, 0.61μs, 0.14μs]
file_size -> 8.76Kb
5 changes: 3 additions & 2 deletions docs/assets/text/imagegridv2.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
generate -> avg: 8.86ms, executions: [8.86ms]
add_cols -> avg: 198.00ns, executions: [501.00ns, 190.00ns, 185.00ns, 88.00ns, 148.00ns, 76.00ns]
generate -> avg: 5.46ms, executions: [5.46ms]
add_cols -> avg: 168.83ns, executions: [518.00ns, 129.00ns, 131.00ns, 68.00ns, 103.00ns, 64.00ns]
file_size -> 222.72Kb
5 changes: 3 additions & 2 deletions docs/assets/text/listv2.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
generate -> avg: 33.05ms, executions: [33.05ms]
add_row -> avg: 1607.00ns, executions: [1.61μs]
generate -> avg: 38.96ms, executions: [38.96ms]
add_row -> avg: 4202.00ns, executions: [4.20μs]
file_size -> 24.63Kb
5 changes: 3 additions & 2 deletions docs/assets/text/marginsv2.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
generate -> avg: 194.50ms, executions: [194.50ms]
add_cols -> avg: 429.00ns, executions: [429.00ns]
generate -> avg: 187.20ms, executions: [187.20ms]
add_cols -> avg: 384.00ns, executions: [384.00ns]
file_size -> 253.31Kb
7 changes: 4 additions & 3 deletions docs/assets/text/maxgridsumv2.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
generate -> avg: 8.30ms, executions: [8.30ms]
add_row -> avg: 335.00ns, executions: [335.00ns]
add_cols -> avg: 264.00ns, executions: [337.00ns, 191.00ns]
generate -> avg: 4.81ms, executions: [4.81ms]
add_row -> avg: 458.00ns, executions: [458.00ns]
add_cols -> avg: 209.00ns, executions: [263.00ns, 155.00ns]
file_size -> 4.79Kb
5 changes: 3 additions & 2 deletions docs/assets/text/pagenumberv2.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
generate -> avg: 7.75ms, executions: [7.75ms]
add_row -> avg: 196.60ns, executions: [0.62μs, 0.22μs, 0.14μs, 0.06μs, 0.16μs, 0.05μs, 0.04μs, 0.04μs, 0.17μs, 0.04μs, 0.04μs, 0.04μs, 0.04μs, 1.09μs, 0.18μs]
generate -> avg: 4.34ms, executions: [4.34ms]
add_row -> avg: 111.80ns, executions: [357.00ns, 177.00ns, 96.00ns, 43.00ns, 110.00ns, 32.00ns, 22.00ns, 30.00ns, 130.00ns, 23.00ns, 22.00ns, 22.00ns, 23.00ns, 506.00ns, 84.00ns]
file_size -> 3.55Kb
5 changes: 3 additions & 2 deletions docs/assets/text/parallelismv2.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
generate -> avg: 9.35ms, executions: [9.35ms]
add_row -> avg: 118.66ns, executions: [0.37μs, 0.16μs, 0.10μs, 0.05μs, 0.12μs, 0.04μs, 0.03μs, 0.04μs, 0.12μs, 0.03μs, 0.02μs, 0.02μs, 0.03μs, 0.03μs, 0.02μs, 0.02μs, 1.94μs, 0.03μs, 0.03μs, 0.03μs, 0.03μs, 0.02μs, 0.03μs, 0.03μs, 0.03μs, 0.03μs, 0.70μs, 0.12μs, 0.09μs, 0.03μs, 0.10μs, 0.03μs, 0.03μs, 0.03μs, 0.10μs, 0.03μs, 0.90μs, 0.03μs, 0.03μs, 0.03μs, 0.03μs, 0.03μs, 0.11μs, 0.03μs, 0.03μs, 0.03μs, 0.03μs, 0.03μs, 0.03μs, 0.03μs]
generate -> avg: 8.51ms, executions: [8.51ms]
add_row -> avg: 67.46ns, executions: [245.00ns, 131.00ns, 86.00ns, 28.00ns, 83.00ns, 28.00ns, 22.00ns, 22.00ns, 100.00ns, 21.00ns, 19.00ns, 19.00ns, 20.00ns, 19.00ns, 20.00ns, 19.00ns, 999.00ns, 21.00ns, 18.00ns, 18.00ns, 19.00ns, 21.00ns, 20.00ns, 22.00ns, 29.00ns, 20.00ns, 498.00ns, 92.00ns, 91.00ns, 18.00ns, 75.00ns, 20.00ns, 21.00ns, 20.00ns, 66.00ns, 36.00ns, 20.00ns, 20.00ns, 25.00ns, 28.00ns, 20.00ns, 19.00ns, 74.00ns, 20.00ns, 20.00ns, 19.00ns, 19.00ns, 20.00ns, 26.00ns, 37.00ns]
file_size -> 2.36Kb
3 changes: 3 additions & 0 deletions docs/assets/text/protectionv2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
generate -> avg: 218.17μs, executions: [218.17μs]
add_row -> avg: 217.00ns, executions: [217.00ns]
file_size -> 1.30Kb
5 changes: 3 additions & 2 deletions docs/assets/text/qrgridv2.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
generate -> avg: 23.17ms, executions: [23.17ms]
add_cols -> avg: 161.75ns, executions: [357.00ns, 123.00ns, 100.00ns, 67.00ns]
generate -> avg: 48.63ms, executions: [48.63ms]
add_cols -> avg: 166.25ns, executions: [366.00ns, 138.00ns, 97.00ns, 64.00ns]
file_size -> 5.21Kb
5 changes: 3 additions & 2 deletions docs/assets/text/signaturegridv2.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
generate -> avg: 2.00ms, executions: [2.00ms]
add_cols -> avg: 475.00ns, executions: [715.00ns, 235.00ns]
generate -> avg: 1.21ms, executions: [1.21ms]
add_cols -> avg: 250.50ns, executions: [371.00ns, 130.00ns]
file_size -> 2.76Kb
7 changes: 4 additions & 3 deletions docs/assets/text/textgridv2.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
generate -> avg: 2.86ms, executions: [2.86ms]
add_row -> avg: 54.75ns, executions: [139.00ns, 33.00ns, 23.00ns, 24.00ns]
add_cols -> avg: 182.25ns, executions: [402.00ns, 142.00ns, 112.00ns, 73.00ns]
generate -> avg: 3.72ms, executions: [3.72ms]
add_row -> avg: 70.00ns, executions: [151.00ns, 54.00ns, 37.00ns, 38.00ns]
add_cols -> avg: 256.50ns, executions: [529.00ns, 202.00ns, 165.00ns, 130.00ns]
file_size -> 4.42Kb
11 changes: 11 additions & 0 deletions docs/v2/features/compression.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Compression

## Code Example
[filename](../../assets/examples/compression/v2/main.go ':include :type=code')

## PDF Generated
```pdf
assets/pdf/compressionv2.pdf
```
## Time Execution
[filename](../../assets/text/compressionv2.txt ':include :type=code')
11 changes: 11 additions & 0 deletions docs/v2/features/protection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Protection

## Code Example
[filename](../../assets/examples/protection/v2/main.go ':include :type=code')

## PDF Generated
```pdf
assets/pdf/protectionv2.pdf
```
## Time Execution
[filename](../../assets/text/protectionv2.txt ':include :type=code')
Loading