comment

package
v0.11.3 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2020 License: AGPL-3.0, AGPL-3.0 Imports: 7 Imported by: 0

README

pdfcomment

get pdf comments out of doc / construct flattened versions

Why

Since editors don't respect read-only settings, we need to flatten text annotations

Formatting

for a proper sticky note ...

// NewParagraph creates a new text paragraph.
// Default attributes:
// Font: Helvetica,
// Font size: 10
// Encoding: WinAnsiEncoding
// Wrap: enabled
// Text color: black
func (c *Creator) NewParagraph(text string) *Paragraph {
	return newParagraph(text, c.NewTextStyle())
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DrawComment

func DrawComment(c *creator.Creator, comment Comment, X, Y float64)

func DrawMarker

func DrawMarker(c *creator.Creator, comment Comment)

func DrawText

func DrawText(c *creator.Creator, comment Comment, X, Y float64)

Types

type Comment

type Comment struct {
	Pos   geo.Point
	Text  string
	Page  int
	Label string
}

type Comments

type Comments map[int][]Comment

func GetComments

func GetComments(reader *pdf.PdfReader) (Comments, error)

func (Comments) GetByPage

func (c Comments) GetByPage(page int) []Comment

Jump to

Keyboard shortcuts

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