pdfutil

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package pdfutil provides info on and rotates pdf files. The page sizing information is simplified to only report on the first page.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Orientation

type Orientation int

Orientation determines the orientation of a pdf file

func (Orientation) String

func (o Orientation) String() string

String represents the string of the enum

type PDFFile

type PDFFile struct {
	FilePath    string
	Pages       int
	Width       float64
	Height      float64
	Orientation Orientation
}

PDFFile represents a pdf file

func NewPDFFile

func NewPDFFile(path string) (*PDFFile, error)

NewPDFFile returns a new PDFFile

func (*PDFFile) Rotate

func (p *PDFFile) Rotate(rotation int) error

Rotate rotates a pdf file by the specified degrees; copyFile can be an empty string to overwrite the original file

func (*PDFFile) RotateCopy

func (p *PDFFile) RotateCopy(rotation int, copyFile string) error

RotateCopy rotates a pdf file by the specified degrees; copyFile can be an empty string to overwrite the original file

func (*PDFFile) String

func (p *PDFFile) String() string

String returns a string representation of a PDFFile

Jump to

Keyboard shortcuts

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