HomeUniDoc
HomeUniDoc
...

Package pdfaid

Overview ▾

Variables

Namespace is the xmp.Model PDF/A namespace.

var Namespace = xmp.NewNamespace("pdfaid", "http://www.aiim.org/pdfa/ns/id/", NewModel)

Schema is the pdfaExtension schema for the PDF/A ID.

var Schema = pdfaextension.Schema{
    NamespaceURI: Namespace.URI,
    Prefix:       Namespace.Name,
    Schema:       "PDF/A ID Schema",
    Property: []pdfaextension.Property{
        {
            Category:    pdfaextension.PropertyCategoryInternal,
            Description: "Part of PDF/A standard",
            Name:        "part",
            ValueType:   pdfaextension.ValueTypeNameInteger,
        },
        {
            Category:    pdfaextension.PropertyCategoryInternal,
            Description: "Amendment of PDF/A standard",
            Name:        "amd",
            ValueType:   pdfaextension.ValueTypeNameText,
        },
        {
            Category:    pdfaextension.PropertyCategoryInternal,
            Description: "Conformance level of PDF/A standard",
            Name:        "conformance",
            ValueType:   pdfaextension.ValueTypeNameText,
        },
    },
    ValueType: nil,
}

func NewModel

func NewModel(name string) xmp.Model

NewModel creates a new model.

type Model

Model is the XMP model for the PdfA metadata.

type Model struct {
    Part        int    `xmp:"pdfaid:part"`
    Conformance string `xmp:"pdfaid:conformance"`
}

func MakeModel

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

MakeModel gets or create sa new model for PDF/A ID namespace.

func (*Model) Can

func (x *Model) Can(nsName string) bool

Can implements xmp.Model interface.

func (*Model) CanTag

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

CanTag implements xmp.Model interface.

func (*Model) GetTag

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

GetTag implements xmp.Model interface.

func (*Model) Namespaces

func (x *Model) Namespaces() xmp.NamespaceList

Namespaces implements xmp.Model interface.

func (*Model) SetTag

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

SetTag implements xmp.Model interface.

func (*Model) SyncFromXMP

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

SyncFromXMP implements xmp.Model interface.

func (*Model) SyncModel

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

SyncModel implements xmp.Model interface.

func (*Model) SyncToXMP

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

SyncToXMP implements xmp.Model interface.