pdf

package
v0.0.0-...-71c6e05 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	// contains filtered or unexported fields
}

File is a wraper for a PDF file

func NewFile

func NewFile(filename string) (p *File, err error)

NewFile creates a new Pdf object.

func (*File) AllowsPageExtraction

func (f *File) AllowsPageExtraction() bool

AllowsPageExtraction checks whether the permissions contained in the PDF file allow to extract pages from it

func (*File) ExtractPage

func (f *File) ExtractPage(pageNumber int, outDir string) (extractedPage *File, err error)

ExtractPage extracts a single page from the input file and stores it under (but not necessarily in) the given output directory. Provided page number can also be negative, then page is searched from the back.

func (*File) Filename

func (f *File) Filename() (filename string)

Filename returns the filename of the given PDF

func (*File) Fill

func (f *File) Fill(argStore *args.Store, ct *template.Chronicle, outfile string) (err error)

Fill is the main function used to fill a PDF file.

func (*File) GetDimensionsInPoints

func (f *File) GetDimensionsInPoints() (width float64, height float64)

GetDimensionsInPoints returns the width and height of the first page in a given PDF file

func (*File) GetPermissionBit

func (f *File) GetPermissionBit(bit int) (bitValue bool)

GetPermissionBit checks whether the given permission bit is set for the given PDF file

func (*File) StampIt

func (f *File) StampIt(stampFile string, outFile string) (err error)

StampIt stamps the given PDF file with the given stamp

Jump to

Keyboard shortcuts

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