render

package
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2019 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package render renders text in the style of GitHub using gofpdf.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BasicBlockquote

func BasicBlockquote(pdf *gofpdf.Fpdf, text string)

BasicBlockquote writes text to a blockquote without rendering any enclosed elements.

func BasicP

func BasicP(pdf *gofpdf.Fpdf, text string)

BasicP writes the contents of a paragraph without rendering any enclosed elements.

func BasicTable added in v0.0.5

func BasicTable(f *gofpdf.Fpdf, table model.TableContent)

BasicTable writes a table with nicely split lines to a gofpdf.Fpdf. https://github.com/jung-kurt/gofpdf/blob/master/fpdf_test.go#L525

func Blockquote

func Blockquote(pdf *gofpdf.Fpdf, contents model.Contents)

Blockquote does what BasicBlockquote don't.

func BlockquoteBG added in v0.0.3

func BlockquoteBG() (r, g, b int)

BlockquoteBG rgb values (223, 226, 229)

func BlockquoteBorder added in v0.0.3

func BlockquoteBorder() (r, g, b int)

BlockquoteBorder rgb values (223, 226, 229)

func BlockquoteFG added in v0.0.3

func BlockquoteFG() (r, g, b int)

BlockquoteFG rgb values (106, 115, 125)

func CodeBlock

func CodeBlock(pdf *gofpdf.Fpdf, contents model.Contents)

CodeBlock writes a `<pre>` style code block to a gofpdf.Fpdf.

func CodeOrangeFG added in v0.0.3

func CodeOrangeFG() (r, g, b int)

CodeOrangeFG rgb values (227, 98, 9)

func CodeSpanBG added in v0.0.3

func CodeSpanBG() (r, g, b int)

CodeSpanBG rgb values (243, 243, 243)

func DefaultBG added in v0.0.3

func DefaultBG() (r, g, b int)

DefaultBG rgb values (255, 255, 255)

func DefaultFG added in v0.0.3

func DefaultFG() (r, g, b int)

DefaultFG rgb values (36, 41, 46)

func FullP

func FullP(pdf *gofpdf.Fpdf, contents model.Contents)

FullP will write a paragraph with plain, bold, italic, bold/italic, and linked text.

func H1

func H1(pdf *gofpdf.Fpdf, contents model.Contents)

H1 write a 1st level header to a gofpdf.Fpdf.

func H2

func H2(pdf *gofpdf.Fpdf, contents model.Contents)

H2 write a 2nd level header to a gofpdf.Fpdf.

func H3

func H3(pdf *gofpdf.Fpdf, contents model.Contents)

H3 write a 3rd level header to a gofpdf.Fpdf.

func H4

func H4(pdf *gofpdf.Fpdf, contents model.Contents)

H4 write a 4th level header to a gofpdf.Fpdf.

func H5

func H5(pdf *gofpdf.Fpdf, contents model.Contents)

H5 write a 5th level header to a gofpdf.Fpdf.

func H6

func H6(pdf *gofpdf.Fpdf, contents model.Contents)

H6 write a 6th level header to a gofpdf.Fpdf.

func HR

func HR(pdf *gofpdf.Fpdf)

HR draws a standard Horizontal Rule to a gofpdf.Fpdf.

func HeaderUnderlineFG added in v0.0.3

func HeaderUnderlineFG() (r, g, b int)

HeaderUnderlineFG rgb values (234, 236, 239)

func HighlightedCodeblock added in v0.0.3

func HighlightedCodeblock(pdf *gofpdf.Fpdf, contents model.Contents, class string)

HighlightedCodeblock draws a codeblock with syntax highlighting provided by Chroma.

func HrFG added in v0.0.4

func HrFG() (r, g, b int)

HrFG rgb values (191, 191, 191)

func Image

func Image(pdf *gofpdf.Fpdf, src, link string)

Image writes a JPEG, PNG or GIF to a gofpdf.Fpdf.

func LightCodeBlockBG added in v0.0.4

func LightCodeBlockBG() (r, g, b int)

LightCodeBlockBG rgb values (246, 248, 250)

func LinkFG added in v0.0.3

func LinkFG() (r, g, b int)

LinkFG rgb values (3, 102, 214)

func List

func List(pdf *gofpdf.Fpdf, list model.ListContent)

List writes a list with any level of indentation to a gofpdf.Fpdf.

func SetMetaData

func SetMetaData(f *gofpdf.Fpdf, author, title string)

SetMetaData for a pdf.

func Setup

func Setup(f *gofpdf.Fpdf)

Setup sets default GitHub-Flavored styles to a gofpdf.Fpdf.

func Table

func Table(f *gofpdf.Fpdf, table model.TableContent)

Table writes a table to a gofpdf.Fpdf.

func TableCellBG added in v0.0.3

func TableCellBG() (r, g, b int)

TableCellBG rgb values (246, 248, 250)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL