modulepackage
0.0.0-20181108132858-aa93a7d81bff
Repository: https://github.com/georged19/json-gofpdf.git
Documentation: pkg.go.dev
# README
json-gofpdf
json-gofpdf runs JSON schema through gofpdf to generate PDFs in server-side.
Features
- Maps JSON schema to gofpdf functions.
- Inject data into your schema layouts for dynamic information.
API
logic := `[
{
"new": {
"orientation": "P",
"unit": "mm",
"size": "A4",
"fontDir": ""
}
},
{
"addpage": {}
},
{
"setfont": {}
},
{
"cell": {
"width": 40.0,
"height": 10.0,
"text": "Hello, World!"
}
}
]`
pdfparser2, err := jsongofpdf.New(jsongofpdf.JSONGOFPDFOptions{Logic: logic})
if err != nil {
fmt.Println(err)
}
pdf2 := pdfparser2.GetPDF()
pdf.OutputFileAndClose("hello.pdf")
Supported functions
- AddPage
- AliasNbPages
- Body
- Cell
- CellFormat
# Functions
No description provided by the author
No description provided by the author
GetImage returns a File type containing the hex version of the image with associated meta information.
No description provided by the author
No description provided by the author
New creates a new jsongofpdf instance.
# Variables
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author