Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder builds Text
func (*Builder) Render ¶
Render adds the content with the given dimensions and font to the text builder. Text blocks are sectioned into lines and paragraphs based on their relative location on the page.
func (*Builder) WriteNewline ¶
func (b *Builder) WriteNewline()
type Content ¶
func (Content) DebugString ¶
type Part ¶
type Part struct { Size float64 // bitmask of styles, currently just 1 for bold. Weight int Content string }
Part is a part of Text with the same size and font weight.
type Section ¶
func (Section) DebugString ¶
type Text ¶
type Text []Part
Text represents minimally structured text extracted from a PDF.
func (Text) DebugString ¶
DebugString renders the Text as a string with annotation at each change of text size.
func (Text) Sectioned ¶
Sectioned attempts to process the text into a structured hierarchy of sections. This does not work via metadata encoded in the PDF as that is found to be unreliable, but via text size and positioning.
Click to show internal directories.
Click to hide internal directories.