pdf

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2021 License: Apache-2.0 Imports: 4 Imported by: 36

Documentation

Overview

Package pdf implements metadata for PDF files as defined by XMP Specification Part 2.

Index

Constants

This section is empty.

Variables

View Source
var (
	NsPDF = xmp.NewNamespace("pdf", "http://ns.adobe.com/pdf/1.3/", NewModel)
)

Functions

func NewModel

func NewModel(name string) xmp.Model

Types

type PDFInfo

type PDFInfo struct {
	Title        xmp.AltString  `xmp:"dc:title"`
	Author       xmp.StringList `xmp:"dc:creator"`
	Subject      xmp.AltString  `xmp:"dc:description"`
	Keywords     string         `xmp:"pdf:Keywords"`
	Creator      xmp.AgentName  `xmp:"xmp:CreatorTool"`
	Producer     xmp.AgentName  `xmp:"pdf:Producer"`
	PDFVersion   string         `xmp:"pdf:PDFVersion"`
	CreationDate xmp.Date       `xmp:"xmp:CreateDate"`
	ModifyDate   xmp.Date       `xmp:"xmp:ModifyDate"`
	Trapped      xmp.Bool       `xmp:"pdf:Trapped"`
	Copyright    string         `xmp:"pdf:Copyright"`
	Marked       xmp.Bool       `xmp:"pdf:Marked"`
}

Part 2: 3.1 Adobe PDF namespace

func FindModel

func FindModel(d *xmp.Document) *PDFInfo

func MakeModel

func MakeModel(d *xmp.Document) (*PDFInfo, error)

func (PDFInfo) Can

func (x PDFInfo) Can(nsName string) bool

func (*PDFInfo) CanTag

func (x *PDFInfo) CanTag(tag string) bool

func (*PDFInfo) GetTag

func (x *PDFInfo) GetTag(tag string) (string, error)

func (PDFInfo) Namespaces

func (x PDFInfo) Namespaces() xmp.NamespaceList

func (*PDFInfo) SetTag

func (x *PDFInfo) SetTag(tag, value string) error

func (*PDFInfo) SyncFromXMP

func (x *PDFInfo) SyncFromXMP(d *xmp.Document) error

func (*PDFInfo) SyncModel

func (x *PDFInfo) SyncModel(d *xmp.Document) error

func (PDFInfo) SyncToXMP

func (x PDFInfo) SyncToXMP(d *xmp.Document) error

Jump to

Keyboard shortcuts

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