Skip to content

PDF links #34

@ardenn

Description

@ardenn

Problem

I can't seem to find a way to add hyperlinks. I'm happy to look around the codebase and help with adding that.
Any concerns with this?

Proposed Solution

I'm thinking a new document.Link node with a similar API to document.Text .

// Link adds a hyperlink element to the column.
func (c *ColBuilder) Link(label, url string, opts ...TextOption) {
	style := c.defaultStyle()
	for _, opt := range opts {
		opt(&style)
	}
	c.nodes = append(c.nodes, &document.Link{
		Label:   label,
		URL: url,
		TextStyle: style,
	})
}

Alternatives Considered

No response

Scope

pdf (Layer 1: primitives)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions