render

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2019 License: MIT Imports: 13 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(f *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 Blockquote

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

Blockquote does what BasicBlockquote don't.

func CodeBlock

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

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

func ContentBox

func ContentBox(fpdf *gofpdf.Fpdf) (width, height float64)

ContentBox returns the width and height of a page minus margins.

func ContentBoxHeight

func ContentBoxHeight(fpdf *gofpdf.Fpdf) float64

ContentBoxHeight returns the height of a page minus top and bottom margins.

func ContentBoxWidth

func ContentBoxWidth(fpdf *gofpdf.Fpdf) float64

ContentBoxWidth returns the width of a width minus left and right margins.

func FullP

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

FullP will (when finished) write a paragraph with plain, bold, italic, bold/italic, and linked text.

func H1

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

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

func H2

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

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

func H3

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

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

func H4

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

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

func H5

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

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

func H6

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

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

func HR

func HR(f *gofpdf.Fpdf)

HR writes a Horizontal Rule to a gofpdf.Fpdf.

func Image

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

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

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 with nicely split lines to a gofpdf.Fpdf. https://github.com/jung-kurt/gofpdf/blob/master/fpdf_test.go#L525

Types

This section is empty.

Jump to

Keyboard shortcuts

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