Documentation ¶
Overview ¶
Package pdf implements a minimal PDF 1.7 writer, just functional enough to create a PDF file containing a QR code encoded as rectangles.
It follows the standard “PDF 32000-1:2008 PDF 1.7”: https://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/PDF32000_2008.pdf
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Catalog ¶
Catalog represents a PDF catalog object.
type DocumentInfo ¶
DocumentInfo represents a PDF document information object.
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
Encoder is a PDF writer.
func NewEncoder ¶
NewEncoder returns a ready-to-use Encoder writing to w.
type Object ¶
type Object interface { // Objects returns all Objects which should be encoded into the // PDF file. Objects() []Object // Encode encodes the object into the PDF file w. Encode(w io.Writer, ids map[string]ObjectID) error // SetID updates the object id. SetID(id ObjectID) // Name returns the human-readable object name. Name() string fmt.Stringer }
Object is implemented by all PDF objects.
type Page ¶
type Page struct { Common Resources []Object // Image Contents []Object // Common (streams) // Parent contains the human-readable name of the parent object, // which will be translated into an object ID when encoding. Parent string }
Page represents a PDF page object with size DIN A4
Click to show internal directories.
Click to hide internal directories.