cpdf

package
v0.0.0-...-dfcb032 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2014 License: MIT Imports: 7 Imported by: 2

Documentation

Overview

Package cpdf contains methods to manipulate pdf files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Merge

func Merge(job mergable) (err error)

Merge concatenates the given files, adds a header, and writes combined bookmarks in a single pass.

Types

type Cpdf

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

func New

func New(filePath string, id string) (c *Cpdf)

func (*Cpdf) ListBookmarks

func (c *Cpdf) ListBookmarks() (out []byte, err error)

func (*Cpdf) PageCount

func (c *Cpdf) PageCount() (result int, err error)

PageCount returns the number of pages in the document.

func (*Cpdf) Validate

func (c *Cpdf) Validate() (err error)

Validate checks whether the file can be processed by cpdf. In particular, it should catch encrypted documents before they get to the combine phase.

func (*Cpdf) WriteErrorMessage

func (c *Cpdf) WriteErrorMessage(title string)

Intended for use on a blank file used to indicate an error to the user.

type InfoCmd

type InfoCmd interface {
	ListBookmarks() ([]byte, error)
	PageCount() (int, error)
	Validate() error
}

type ManipulatorCmd

type ManipulatorCmd interface {
	Merge([]string, string) error
	AddBookmarks(string)
}

Jump to

Keyboard shortcuts

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