validate

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 15 Imported by: 17

Documentation

Overview

Package validate implements validation against PDF 32000-1:2008.

Index

Constants

View Source
const (

	// REQUIRED is used for required dict entries.
	REQUIRED = true

	// OPTIONAL is used for optional dict entries.
	OPTIONAL = false
)
View Source
const (

	// ExcludePatternCS ...
	ExcludePatternCS = true

	// IncludePatternCS ...
	IncludePatternCS = false
)

Variables

This section is empty.

Functions

func DocumentPageLayout added in v0.6.0

func DocumentPageLayout(s string) bool

DocumentPageLayout returns true for valid page layout values.

func DocumentPageMode added in v0.6.0

func DocumentPageMode(s string) bool

DocumentPageMode returns true for valid page mode values.

func DocumentProperty added in v0.3.2

func DocumentProperty(s string) bool

DocumentProperty ensures a property name that may be modified.

func XRefTable

func XRefTable(xRefTable *model.XRefTable) error

XRefTable validates a PDF cross reference table obeying the validation mode.

Types

type Alt added in v0.6.0

type Alt struct {
	//XMLName xml.Name `xml:"http://www.w3.org/1999/02/22-rdf-syntax-ns# Alt"`
	Entries []string `xml:"http://www.w3.org/1999/02/22-rdf-syntax-ns# li"`
}

type Creator added in v0.6.0

type Creator struct {
	//XMLName xml.Name `xml:"http://purl.org/dc/elements/1.1/ creator"`
	Seq Seq `xml:"http://www.w3.org/1999/02/22-rdf-syntax-ns# Seq"`
}

type Desc added in v0.6.0

type Desc struct {
	//XMLName xml.Name `xml:"http://purl.org/dc/elements/1.1/ description"`
	Alt Alt `xml:"http://www.w3.org/1999/02/22-rdf-syntax-ns# Alt"`
}

type Description added in v0.6.0

type Description struct {
	//XMLName      xml.Name `xml:"http://www.w3.org/1999/02/22-rdf-syntax-ns# Description"`
	Title        Title    `xml:"http://purl.org/dc/elements/1.1/ title"`
	Author       Creator  `xml:"http://purl.org/dc/elements/1.1/ creator"`
	Subject      Desc     `xml:"http://purl.org/dc/elements/1.1/ description"`
	Creator      string   `xml:"http://ns.adobe.com/xap/1.0/ CreatorTool"`
	CreationDate userDate `xml:"http://ns.adobe.com/xap/1.0/ CreateDate"`
	ModDate      userDate `xml:"http://ns.adobe.com/xap/1.0/ ModifyDate"`
	Producer     string   `xml:"http://ns.adobe.com/pdf/1.3/ Producer"`
	Trapped      bool     `xml:"http://ns.adobe.com/pdf/1.3/ Trapped"`
	Keywords     string   `xml:"http://ns.adobe.com/pdf/1.3/ Keywords"`
}

type RDF added in v0.6.0

type RDF struct {
	XMLName     xml.Name `xml:"http://www.w3.org/1999/02/22-rdf-syntax-ns# RDF"`
	Description Description
}

type Seq added in v0.6.0

type Seq struct {
	//XMLName xml.Name `xml:"http://www.w3.org/1999/02/22-rdf-syntax-ns# Seq"`
	Entries []string `xml:"http://www.w3.org/1999/02/22-rdf-syntax-ns# li"`
}

type Title added in v0.6.0

type Title struct {
	//XMLName xml.Name `xml:"http://purl.org/dc/elements/1.1/ title"`
	Alt Alt `xml:"http://www.w3.org/1999/02/22-rdf-syntax-ns# Alt"`
}

type XMPMeta added in v0.6.0

type XMPMeta struct {
	XMLName xml.Name `xml:"adobe:ns:meta/ xmpmeta"`
	RDF     RDF
}

Jump to

Keyboard shortcuts

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