pdfmarker

package module
v0.0.0-...-824522c Latest Latest
Warning

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

Go to latest
Published: May 7, 2019 License: MIT Imports: 3 Imported by: 0

README

pdfmarker

Tool for adding watermark to pdfs

gographics/imagick v2 is used to convert and add watermark to pdfs

Usage

See example

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EnableLog = false

Functions

func AddWatermark

func AddWatermark(src string, dst string, inout *ImageIOSize, watermark *imagick.MagickWand, style *WatermarkStyle) (err error)

Types

type Coordinate

type Coordinate struct {
	X, Y float64
}

type ImageIOSize

type ImageIOSize struct {
	InResolution *Coordinate
	OutScale     float64
}

type ImageWatermark

type ImageWatermark struct {
	Style *WatermarkStyle
	File  string
}

func (*ImageWatermark) NewWatermark

func (iwm *ImageWatermark) NewWatermark() (*imagick.MagickWand, error)

type TextStyle

type TextStyle struct {
	Size      *Coordinate
	Font      string
	PointSize float64
	Weight    uint
	Color     string
	Opacity   float64
}

type TextWatermark

type TextWatermark struct {
	Style     *WatermarkStyle
	TextStyle *TextStyle
	Text      string
}

func (*TextWatermark) NewWatermark

func (twm *TextWatermark) NewWatermark() (*imagick.MagickWand, error)

type WatermarkCreator

type WatermarkCreator interface {
	NewWatermark() (*imagick.MagickWand, error)
}

type WatermarkStyle

type WatermarkStyle struct {
	Opacity float64
	Degrees float64
	Autofit bool // fit Size of the original image
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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