Documentation
¶
Index ¶
- Constants
- Variables
- func AfterFunc(ctx ContextContext, f func()) (stop func() bool)
- func AnchorPosition(a Anchor, r *Rectangle, w, h float64) (x float64, y float64)
- func BestFitRectIntoRect(rSrc, rDest *Rectangle, enforceOrient, scaleUp bool) (w, h, dx, dy, rot float64)
- func ByteForOctalString(octalBytes string) (b byte)
- func CJK(script, lang string) bool
- func CJKEncoding(s string) bool
- func CP1252ToUTF8(s string) string
- func CSVSafeString(s string) string
- func Cause(c ContextContext) error
- func CheckConfigVersion(v string)
- func CoreWriteContext(ctx *Context) (err error)
- func DateString(t time.Time) string
- func DateTime(s string, relaxed bool) (time.Time, bool)
- func DecodeName(s string) (string, error)
- func DecodeUTF16String(s string) (string, error)
- func DetectKeywords(line string) (endInd int, streamInd int, err error)
- func DetectKeywordsWithContext(c ContextContext, line string) (endInd int, streamInd int, err error)
- func Embedded(xRefTable *XRefTable, fontDict Dict, objNr int) (bool, error)
- func EncodeName(s string) string
- func EncodeUTF16String(s string) string
- func EqualFontDicts(fd1, fd2 Dict, xRefTable *XRefTable) (bool, error)
- func EqualObjects(o1, o2 Object, xRefTable *XRefTable) (ok bool, err error)
- func EqualSlices(a, b []string) bool
- func EqualStreamDicts(sd1, sd2 *StreamDict, xRefTable *XRefTable) (bool, error)
- func Escape(s string) (*string, error)
- func EscapedUTF16String(s string) (*string, error)
- func FreeTextIntentName(fti FreeTextIntent) string
- func HexLiteralToString(hl HexLiteral) (string, error)
- func IndRefMemberOf(i IndirectRef, arr Array) bool
- func IntMemberOf(i int, list []int) bool
- func IsCoreFont(fontName string) bool
- func IsStringUTF16BE(s string) bool
- func IsUTF16BE(b []byte) bool
- func Lang(xRefTable *XRefTable, fontDict Dict) (string, error)
- func LineEndingStyleName(les LineEndingStyle) string
- func LineIntentName(li LineIntent) string
- func Lines(data []byte, atEOF bool) (advance int, token []byte, err error)
- func List() []string
- func MemberOf(s string, list []string) bool
- func ModelRemoveKeywords(metadata *[]byte) error
- func Name(xRefTable *XRefTable, fontDict Dict, objNumber int) (prefix, fontName string, err error)
- func NormalizeCoord(x, y float64, r *Rectangle, origin Corner, absolute bool) (float64, float64)
- func NormalizeOffset(x, y float64, origin Corner) (float64, float64)
- func Optimize(input []byte, conf *Configuration) ([]byte, error)
- func OptimizeContext(ctx *Context) error
- func OptimizeXRefTable(ctx *Context) error
- func ParseObjectAttributes(line *string) (objectNumber *int, generationNumber *int, err error)
- func Permissions(ctx *Context) (list []string)
- func PermissionsList(p int) (list []string)
- func PolyLineIntentName(pi PolyLineIntent) string
- func PolygonIntentName(pi PolygonIntent) string
- func ProcessRefCounts(xRefTable *XRefTable, o Object)
- func RTL(lang string) bool
- func ReadFont(fileName string) ([]byte, error)
- func RemoveControlChars(s string) string
- func Reverse(s string) string
- func ScriptForEncoding(enc string) string
- func StringLiteralToString(sl StringLiteral) (string, error)
- func StringOrHexLiteral(obj Object) (*string, error)
- func Subset(fontName string, usedGIDs map[uint16]bool) ([]byte, error)
- func SupportedScript(s string) bool
- func SupportsDecodeParms(f string) bool
- func Text(o Object) (string, error)
- func ToUserSpace(f float64, unit DisplayUnit) float64
- func UTF8ToCP1252(s string) string
- func Unescape(s string) ([]byte, error)
- func UpdateUserfont(xRefTable *XRefTable, fontName string, f FontResource) error
- func ValidateContext(ctx *Context) error
- func WithCancel(parent ContextContext) (ctx ContextContext, cancel CancelFunc)
- func WithCancelCause(parent ContextContext) (ctx ContextContext, cancel CancelCauseFunc)
- func WithDeadline(parent ContextContext, d time.Time) (ContextContext, CancelFunc)
- func WithDeadlineCause(parent ContextContext, d time.Time, cause error) (ContextContext, CancelFunc)
- func WithTimeout(parent ContextContext, timeout time.Duration) (ContextContext, CancelFunc)
- func WithTimeoutCause(parent ContextContext, timeout time.Duration, cause error) (ContextContext, CancelFunc)
- func WriteContextF(ctx *Context, w io.Writer) error
- func XRefTableValidation(ctx *Context) error
- type Alt
- type Anchor
- type Annot
- type AnnotMap
- type AnnotationFlags
- type AnnotationInterface
- func (ann AnnotationInterface) APObjNrInt() int
- func (ann AnnotationInterface) ContentString() string
- func (ann AnnotationInterface) CustomTypeString() string
- func (ann AnnotationInterface) HashString() uint32
- func (ann AnnotationInterface) ID() string
- func (ann AnnotationInterface) RectString() string
- func (ann AnnotationInterface) RenderDict(xRefTable *XRefTable, pageIndRef *IndirectRef) (Dict, error)
- func (ann AnnotationInterface) Type() AnnotationType
- func (ann AnnotationInterface) TypeString() string
- type AnnotationRenderer
- type AnnotationType
- type Array
- type Boolean
- type BorderStyle
- type Box
- type ByteSize
- type CancelCauseFunc
- type CancelFunc
- type CaretAnnotation
- type CertificateDetails
- type CircleAnnotation
- type CommandMode
- type Configuration
- func (c *Configuration) ApplyReducedFeatureSet() bool
- func (c *Configuration) EolString() string
- func (c *Configuration) PreferredCertRevocationCheckerString() string
- func (c *Configuration) SetUnit(s string)
- func (c *Configuration) UnitString() string
- func (c *Configuration) ValidationModeString() string
- type Context
- func NewContext(rs io.ReadSeeker, conf *Configuration) (*Context, error)
- func Read(rs io.ReadSeeker, conf *Configuration) (*Context, error)
- func ReadAndValidate(rs io.ReadSeeker, conf *Configuration) (ctx *Context, err error)
- func ReadContext(rs io.ReadSeeker, conf *Configuration) (*Context, error)
- func ReadValidateAndOptimize(rs io.ReadSeeker, conf *Configuration) (ctx *Context, err error)
- func ReadWithContext(c ContextContext, rs io.ReadSeeker, conf *Configuration) (*Context, error)
- func (ctx *Context) AddPageBoundaries(selectedPages IntSet, pb *PageBoundaries) error
- func (ctx *Context) Crop(selectedPages IntSet, b *Box) error
- func (ctx *Context) ListPageBoundaries(selectedPages IntSet, wantPB *PageBoundaries) ([]string, error)
- func (ctx *Context) RemovePageBoundaries(selectedPages IntSet, pb *PageBoundaries) error
- type ContextContext
- type Corner
- type Creator
- type DecodeLazyObjectStreamObjectFunc
- type Desc
- type Description
- type Destination
- type DestinationType
- type Dict
- func (d Dict) ArrayEntry(key string) Array
- func (d Dict) BooleanEntry(key string) *bool
- func (d Dict) Clone() Object
- func (d Dict) Delete(key string) (value Object)
- func (d Dict) DictEntry(key string) Dict
- func (d Dict) Entry(dictName, key string, required bool) (Object, bool, error)
- func (d Dict) Find(key string) (Object, bool)
- func (d Dict) First() *int
- func (d Dict) HexLiteralEntry(key string) *HexLiteral
- func (d *Dict) Increment(key string) error
- func (d *Dict) IncrementBy(key string, i int) error
- func (d Dict) Index() Array
- func (d Dict) IndirectRefEntry(key string) *IndirectRef
- func (d Dict) Insert(k string, v Object) bool
- func (d Dict) InsertBool(key string, value bool)
- func (d Dict) InsertFloat(key string, value float32)
- func (d Dict) InsertInt(key string, value int)
- func (d Dict) InsertName(key, value string)
- func (d Dict) InsertString(key, value string)
- func (d Dict) Int64Entry(key string) *int64
- func (d Dict) IntEntry(key string) *int
- func (d Dict) IsLinearizationParmDict() bool
- func (d Dict) IsObjStm() bool
- func (d Dict) IsPage() bool
- func (d Dict) Len() int
- func (d Dict) Length() (*int64, *int)
- func (d Dict) N() *int
- func (d Dict) NameEntry(key string) *string
- func (d Dict) NewIDForPrefix(prefix string, i int) string
- func (d Dict) PDFString() string
- func (d Dict) Prev() *int64
- func (d Dict) Size() *int
- func (d Dict) StreamDictEntry(key string) *StreamDict
- func (d Dict) String() string
- func (d Dict) StringEntry(key string) *string
- func (d Dict) StringEntryBytes(key string) ([]byte, error)
- func (d Dict) StringLiteralEntry(key string) *StringLiteral
- func (d Dict) StringOrHexLiteralEntry(key string) (*string, error)
- func (d Dict) Subtype() *string
- func (d Dict) Type() *string
- func (d Dict) Update(key string, value Object)
- func (d Dict) W() Array
- type Dim
- type Direction
- type DisplayUnit
- type DuplicateImageObject
- type Enc
- type Filter
- type Float
- type FontMap
- type FontObject
- type FontResource
- type FreeTextAnnotation
- type FreeTextIntent
- type HAlignment
- type HexLiteral
- type HighlightAnnotation
- type ImageObject
- type IndirectRef
- func CIDFontDescriptor(xRefTable *XRefTable, ttf TTFLight, fontName, baseFontName, fontLang string, ...) (*IndirectRef, error)
- func CIDFontDict(xRefTable *XRefTable, ttf TTFLight, fontName, baseFontName, lang string, ...) (*IndirectRef, error)
- func CIDFontFile(xRefTable *XRefTable, fontName string, subFont bool) (*IndirectRef, error)
- func CIDSet(xRefTable *XRefTable, ttf TTFLight, fontName string, indRef *IndirectRef) (*IndirectRef, error)
- func CIDWidths(xRefTable *XRefTable, ttf TTFLight, fontName string, subFont bool, ...) (*IndirectRef, error)
- func EnsureFontDict(xRefTable *XRefTable, fontName, lang, script string, field bool, ...) (*IndirectRef, error)
- func NewFontDescriptor(xRefTable *XRefTable, ttf TTFLight, fontName, fontLang string) (*IndirectRef, error)
- func NewIndirectRef(objectNumber, generationNumber int) *IndirectRef
- func PDFDocEncoding(xRefTable *XRefTable) (*IndirectRef, error)
- func Widths(xRefTable *XRefTable, ttf TTFLight, first, last int) (*IndirectRef, error)
- type InheritedPageAttrs
- type InkAnnotation
- type InkPath
- type IntSet
- type Integer
- type LazyObjectStreamObject
- type LineAnnotation
- type LineEndingStyle
- type LineIntent
- type LineJoinStyle
- type LinkAnnotation
- type MarkupAnnotation
- type NameMap
- type NameType
- type Node
- func (n *Node) Add(xRefTable *XRefTable, k string, v Object, m NameMap, nameRefDictKeys []string) error
- func (n *Node) AddTree(xRefTable *XRefTable, tree *Node, m NameMap, nameRefDictKeys []string) error
- func (n *Node) AppendToNames(k string, v Object)
- func (n *Node) HandleLeaf(xRefTable *XRefTable, k string, v Object, m NameMap, nameRefDictKeys []string) error
- func (n Node) KeyList() ([]string, error)
- func (n *Node) Process(xRefTable *XRefTable, handler func(*XRefTable, string, *Object) error) error
- func (n *Node) Remove(xRefTable *XRefTable, k string) (empty, ok bool, err error)
- func (n Node) String() string
- func (n Node) Value(k string) (Object, bool)
- type NonFullScreenPageMode
- type Object
- func NewLazyObjectStreamObject(osd *ObjectStreamDictType, startOffset, endOffset int, ...) Object
- func ParseObject(line *string) (Object, error)
- func ParseObjectContext(c ContextContext, line *string) (Object, error)
- func ParseObjectWithContext(c ContextContext, ctx *Context, offset int64, objNr, genNr int) (Object, error)
- type ObjectStreamDictType
- type OptimizationContext
- func (oc *OptimizationContext) DuplicateFontObjectsString() (int, string)
- func (oc *OptimizationContext) DuplicateImageObjectsString() (int, string)
- func (oc *OptimizationContext) DuplicateInfoObjectsString() (int, string)
- func (oc *OptimizationContext) IsDuplicateFontObject(i int) bool
- func (oc *OptimizationContext) IsDuplicateImageObject(i int) bool
- func (oc *OptimizationContext) IsDuplicateInfoObject(i int) bool
- func (oc *OptimizationContext) NonReferencedObjsString() (int, string)
- type Orientation
- type PDFFilter
- type PageBoundaries
- func (pb PageBoundaries) ArtBox() *Rectangle
- func (pb PageBoundaries) BleedBox() *Rectangle
- func (pb PageBoundaries) CropBox() *Rectangle
- func (pb PageBoundaries) MediaBox() *Rectangle
- func (pb *PageBoundaries) ResolveBox(s string) error
- func (pb *PageBoundaries) SelectAll()
- func (pb PageBoundaries) String() string
- func (pb PageBoundaries) TrimBox() *Rectangle
- type PageBoundary
- type PageLayout
- type PageMode
- type PageResourceNames
- type PaperHandling
- type PermissionFlags
- type PgAnnots
- type Point
- type PolyLineAnnotation
- type PolyLineIntent
- type PolygonAnnotation
- type PolygonIntent
- type PopupAnnotation
- type PrintScaling
- type QuadLiteral
- type QuadPoints
- type RDF
- type ReadContextType
- type Rectangle
- func ApplyBox(boxName string, b *Box, d Dict, parent *Rectangle) *Rectangle
- func NewRectangle(llx, lly, urx, ury float64) *Rectangle
- func RectForArray(arr Array) *Rectangle
- func RectForDim(width, height float64) *Rectangle
- func RectForFormat(f string) *Rectangle
- func RectForWidthAndHeight(llx, lly, width, height float64) *Rectangle
- func (r Rectangle) Array() Array
- func (r Rectangle) AspectRatio() float64
- func (r Rectangle) Center() Point
- func (r Rectangle) Clone() *Rectangle
- func (r Rectangle) Contains(p Point) bool
- func (r *Rectangle) ConvertToUnit(unit DisplayUnit) *Rectangle
- func (r Rectangle) CroppedCopy(margin float64) *Rectangle
- func (r Rectangle) Dimensions() Dim
- func (r Rectangle) Equals(r2 Rectangle) bool
- func (r Rectangle) FitsWithin(r2 *Rectangle) bool
- func (r Rectangle) Format(unit DisplayUnit) string
- func (r Rectangle) Height() float64
- func (r Rectangle) Landscape() bool
- func (r Rectangle) Portrait() bool
- func (r Rectangle) ScaledHeight(w float64) float64
- func (r Rectangle) ScaledWidth(h float64) float64
- func (r Rectangle) ShortString() string
- func (r Rectangle) String() string
- func (r Rectangle) ToCentimetres() *Rectangle
- func (r Rectangle) ToInches() *Rectangle
- func (r Rectangle) ToMillimetres() *Rectangle
- func (r *Rectangle) Translate(dx, dy float64)
- func (r Rectangle) Visible() bool
- func (r Rectangle) Width() float64
- type RelPosition
- type Resource
- type RevocationDetails
- type Seq
- type Signature
- type SignatureDetails
- type SignatureReason
- type SignatureStats
- type SignatureStatus
- type SignatureValidationResult
- type Signer
- type SimpleColor
- type SquareAnnotation
- type SquigglyAnnotation
- type StreamDict
- type StrikeOutAnnotation
- type StringLiteral
- type StringSet
- type TTFLight
- type TextAnnotation
- type TextMarkupAnnotation
- type Title
- type TrustDetails
- type UnderlineAnnotation
- type UserDate
- type VAlignment
- type Version
- type ViewerPrefJSON
- type ViewerPreferences
- func (vp ViewerPreferences) List() []string
- func (vp *ViewerPreferences) MarshalJSON() ([]byte, error)
- func (vp *ViewerPreferences) Populate(vp1 *ViewerPreferences)
- func (vp *ViewerPreferences) SetCenterWindow(val bool)
- func (vp *ViewerPreferences) SetDisplayDocTitle(val bool)
- func (vp *ViewerPreferences) SetFitWindow(val bool)
- func (vp *ViewerPreferences) SetHideMenuBar(val bool)
- func (vp *ViewerPreferences) SetHideToolBar(val bool)
- func (vp *ViewerPreferences) SetHideWindowUI(val bool)
- func (vp *ViewerPreferences) SetNumCopies(i int)
- func (vp *ViewerPreferences) SetPickTrayByPDFSize(val bool)
- func (vp ViewerPreferences) String() string
- func (vp *ViewerPreferences) UnmarshalJSON(data []byte) error
- func (vp *ViewerPreferences) Validate(version Version) error
- type WriteContext
- type XMPMeta
- type XRefStreamDict
- type XRefTable
- func (xRefTable *XRefTable) AppendContent(pageDict Dict, bb []byte) error
- func (xRefTable *XRefTable) AppendPages(rootPageIndRef *IndirectRef, fromPageNr int, ctx *Context) (int, error)
- func (xRefTable *XRefTable) BindNameTrees() error
- func (xRefTable *XRefTable) BindPrinterPreferences(vp *ViewerPreferences, d Dict)
- func (xRefTable *XRefTable) BindViewerPreferences()
- func (xRefTable *XRefTable) Catalog() (Dict, error)
- func (xRefTable *XRefTable) CatalogHasPieceInfo() (bool, error)
- func (xRefTable *XRefTable) DeleteDictEntry(d Dict, key string) error
- func (xRefTable *XRefTable) DeleteObject(o Object) error
- func (xRefTable *XRefTable) DeleteObjectGraph(o Object) error
- func (xRefTable *XRefTable) Dereference(o Object) (Object, error)
- func (xRefTable *XRefTable) DereferenceArray(o Object) (Array, error)
- func (xRefTable *XRefTable) DereferenceBoolean(o Object, sinceVersion Version) (*Boolean, error)
- func (xRefTable *XRefTable) DereferenceCSVSafeText(o Object) (string, error)
- func (xRefTable *XRefTable) DereferenceDestArray(key string) (Array, error)
- func (xRefTable *XRefTable) DereferenceDict(o Object) (Dict, error)
- func (xRefTable *XRefTable) DereferenceDictEntry(d Dict, key string) (Object, error)
- func (xRefTable *XRefTable) DereferenceDictWithIncr(o Object) (Dict, int, error)
- func (xRefTable *XRefTable) DereferenceFontDict(indRef IndirectRef) (Dict, error)
- func (xRefTable *XRefTable) DereferenceForWrite(o Object) (Object, error)
- func (xRefTable *XRefTable) DereferenceInteger(o Object) (*Integer, error)
- func (xRefTable *XRefTable) DereferenceName(o Object, sinceVersion Version, validate func(string) bool) (n NameType, err error)
- func (xRefTable *XRefTable) DereferenceNumber(o Object) (float64, error)
- func (xRefTable *XRefTable) DereferencePageNodeDict(indRef IndirectRef) (Dict, error)
- func (xRefTable *XRefTable) DereferenceStreamDict(o Object) (*StreamDict, bool, error)
- func (xRefTable *XRefTable) DereferenceStringEntryBytes(d Dict, key string) ([]byte, error)
- func (xRefTable *XRefTable) DereferenceStringLiteral(o Object, sinceVersion Version, validate func(string) bool) (s StringLiteral, err error)
- func (xRefTable *XRefTable) DereferenceStringOrHexLiteral(obj Object, sinceVersion Version, validate func(string) bool) (s string, err error)
- func (xRefTable *XRefTable) DereferenceText(o Object) (string, error)
- func (xRefTable *XRefTable) DereferenceWithIncr(o Object) (Object, int, error)
- func (xRefTable *XRefTable) DereferenceXObjectDict(indRef IndirectRef) (*StreamDict, error)
- func (xRefTable *XRefTable) DestName(obj Object) (string, error)
- func (xRefTable *XRefTable) DumpObject(objNr, mode int)
- func (xRefTable *XRefTable) EmptyPage(parentIndRef *IndirectRef, mediaBox *Rectangle) (*IndirectRef, error)
- func (xRefTable *XRefTable) EncryptDict() (Dict, error)
- func (xRefTable *XRefTable) EnsureCollection() error
- func (xRefTable *XRefTable) EnsurePageCount() error
- func (xRefTable *XRefTable) EnsureValidFreeList() error
- func (xRefTable *XRefTable) EnsureVersionForWriting()
- func (xRefTable *XRefTable) Exists(objNr int) bool
- func (xRefTable *XRefTable) Find(objNr int) (*XRefTableEntry, bool)
- func (xRefTable *XRefTable) FindObject(objNr int) (Object, error)
- func (xRefTable *XRefTable) FindTableEntry(objNr int, genNr int) (*XRefTableEntry, bool)
- func (xRefTable *XRefTable) FindTableEntryForIndRef(indRef *IndirectRef) (*XRefTableEntry, bool)
- func (xRefTable *XRefTable) FindTableEntryLight(objNr int) (*XRefTableEntry, bool)
- func (xRefTable *XRefTable) Free(objNr int) (*XRefTableEntry, error)
- func (xRefTable *XRefTable) FreeObject(objNr int) error
- func (xRefTable *XRefTable) HasUsedGIDs(fontName string) bool
- func (xRefTable *XRefTable) IDFirstElement() (id []byte, err error)
- func (xRefTable *XRefTable) IncrementRefCount(indRef *IndirectRef)
- func (xRefTable *XRefTable) IndRefForNewObject(obj Object) (*IndirectRef, error)
- func (xRefTable *XRefTable) InsertAndUseRecycled(xRefTableEntry XRefTableEntry) (objNr int, err error)
- func (xRefTable *XRefTable) InsertBlankPages(pages IntSet, dim *Dim, before bool) error
- func (xRefTable *XRefTable) InsertNew(xRefTableEntry XRefTableEntry) (objNr int)
- func (xRefTable *XRefTable) InsertObject(obj Object) (objNr int, err error)
- func (xRefTable *XRefTable) InsertPages(parent *IndirectRef, p *int, ctx *Context) (int, error)
- func (xRefTable *XRefTable) IsBeingValidated(ir IndirectRef) (bool, error)
- func (xRefTable *XRefTable) IsLinearizationObject(i int) bool
- func (xRefTable *XRefTable) IsMerging() bool
- func (xRefTable *XRefTable) IsObjBeingValidated(objNr, genNr int) (bool, error)
- func (xRefTable *XRefTable) IsObjValid(objNr, genNr int) (bool, error)
- func (xRefTable *XRefTable) IsValid(ir IndirectRef) (bool, error)
- func (xRefTable *XRefTable) LinearizationObjsString() (int, string)
- func (xRefTable *XRefTable) LocateNameTree(nameTreeName string, ensure bool) error
- func (xRefTable *XRefTable) MissingObjects() (int, *string)
- func (xRefTable *XRefTable) NameRef(nameType string) NameMap
- func (xRefTable *XRefTable) NamesDict() (Dict, error)
- func (xRefTable *XRefTable) NewEmbeddedStreamDict(r io.Reader, modDate time.Time) (*IndirectRef, error)
- func (xRefTable *XRefTable) NewFileSpecDict(f, uf, desc string, indRefStreamDict IndirectRef) (Dict, error)
- func (xRefTable *XRefTable) NewStreamDictForBuf(buf []byte) (*StreamDict, error)
- func (xRefTable *XRefTable) NextForFree(objNr int) (int, error)
- func (xRefTable *XRefTable) PageBoundaries(selectedPages IntSet) ([]PageBoundaries, error)
- func (xRefTable *XRefTable) PageContent(d Dict, pageNr int) ([]byte, error)
- func (xRefTable *XRefTable) PageDict(pageNr int, consolidateRes bool) (Dict, *IndirectRef, *InheritedPageAttrs, error)
- func (xRefTable *XRefTable) PageDictIndRef(page int) (*IndirectRef, error)
- func (xRefTable *XRefTable) PageDims() ([]Dim, error)
- func (xRefTable *XRefTable) PageNumber(pageObjNr int) (int, error)
- func (xRefTable *XRefTable) Pages() (*IndirectRef, error)
- func (xRefTable *XRefTable) ParseRootVersion() (v *string, err error)
- func (xRefTable *XRefTable) RectForArray(a Array) (*Rectangle, error)
- func (xRefTable *XRefTable) RemoveCollection() error
- func (xRefTable *XRefTable) RemoveEmbeddedFilesNameTree() error
- func (xRefTable *XRefTable) RemoveNameTree(nameTreeName string) error
- func (xRefTable *XRefTable) RemoveSignature()
- func (xRefTable *XRefTable) SetBeingValidated(ir IndirectRef) error
- func (xRefTable *XRefTable) SetValid(ir IndirectRef) error
- func (xRefTable *XRefTable) StreamDictIndRef(bb []byte) (*IndirectRef, error)
- func (xRefTable *XRefTable) UndeleteObject(objectNumber int) error
- func (xRefTable *XRefTable) ValidateVersion(element string, sinceVersion Version) error
- func (xRefTable *XRefTable) Version() Version
- func (xRefTable *XRefTable) VersionString() string
- type XRefTableEntry
Constants ¶
const ( ASCII85 = "ASCII85Decode" ASCIIHex = "ASCIIHexDecode" RunLength = "RunLengthDecode" LZW = "LZWDecode" Flate = "FlateDecode" CCITTFax = "CCITTFaxDecode" JBIG2 = "JBIG2Decode" DCT = "DCTDecode" JPX = "JPXDecode" )
PDF defines the following filters. See also 7.4 in the PDF spec.
const ( PredictorNo = 1 // No prediction. PredictorTIFF = 2 // Use TIFF prediction for all rows. PredictorNone = 10 // Use PNGNone for all rows. PredictorSub = 11 // Use PNGSub for all rows. PredictorUp = 12 // Use PNGUp for all rows. PredictorAverage = 13 // Use PNGAverage for all rows. PredictorPaeth = 14 // Use PNGPaeth for all rows. PredictorOptimum = 15 // Use the optimum PNG prediction for each row. )
PDF allows a prediction step prior to compression applying TIFF or PNG prediction. Predictor algorithm.
const ( PNGNone = 0x00 PNGSub = 0x01 PNGUp = 0x02 PNGAverage = 0x03 PNGPaeth = 0x04 )
For predictor > 2 PNG filters (see RFC 2083) get applied and the first byte of each pixelrow defines the prediction algorithm used for all pixels of this row.
const ( EolLF = "\x0A" EolCR = "\x0D" EolCRLF = "\x0D\x0A" )
Supported line delimiters
const ( // ValidationStrict ensures 100% compliance with the spec (PDF 32000-1:2008). ValidationStrict int = iota // ValidationRelaxed ensures PDF compliance based on frequently encountered validation errors. ValidationRelaxed )
const ( PermissionsNone = PermissionFlags(0xF0C3) PermissionsPrint = PermissionsNone + PermissionPrintRev2 + PermissionPrintRev3 PermissionsAll = PermissionFlags(0xFFFF) )
const ( Unknown = iota False // aka invalid, not ok True // aka valid, ok )
const ( CRL = iota OCSP )
Preferred cert revocation checking mechanism values
const ( CertifiedSigPermNone = iota CertifiedSigPermNoChangesAllowed CertifiedSigPermFillingAndSigningOK CertifiedSigPermFillingAnnotatingAndSigningOK )
const ( SigTypeForm = iota SigTypePage SigTypeUR SigTypeDTS )
const ( // REQUIRED is used for required dict entries. REQUIRED = true // OPTIONAL is used for optional dict entries. OPTIONAL = false )
const ( // ExcludePatternCS ... ExcludePatternCS = true // IncludePatternCS ... IncludePatternCS = false )
const ( DeviceGrayCS = "DeviceGray" DeviceRGBCS = "DeviceRGB" DeviceCMYKCS = "DeviceCMYK" CalGrayCS = "CalGray" CalRGBCS = "CalRGB" LabCS = "Lab" ICCBasedCS = "ICCBased" IndexedCS = "Indexed" PatternCS = "Pattern" SeparationCS = "Separation" DeviceNCS = "DeviceN" )
PDF defines the following Color Spaces:
const ( PageLastModified = iota PageResources PageMediaBox PageCropBox PageBleedBox PageTrimBox PageArtBox PageBoxColorInfo PageContents PageRotate PageGroup PageThumb PageB PageDur PageTrans PageAnnots PageAA PageMetadata PagePieceInfo PageStructParents PageID PagePZ PageSeparationInfo PageTabs PageTemplateInstantiated PagePresSteps PageUserUnit PageVP )
The PDF page object fields.
const ( RootVersion = iota RootExtensions RootPageLabels RootNames RootDests RootViewerPrefs RootPageLayout RootPageMode RootOutlines RootThreads RootOpenAction RootAA RootURI RootAcroForm RootMetadata RootStructTreeRoot RootMarkInfo RootLang RootSpiderInfo RootOutputIntents RootPieceInfo RootOCProperties RootPerms RootLegal RootRequirements RootCollection RootNeedsRendering )
The PDF root object fields.
const FreeHeadGeneration = 65535
FreeHeadGeneration is the predefined generation number for the head of the free list.
const (
// ObjectStreamMaxObjects limits the number of objects within an object stream written.
ObjectStreamMaxObjects = 100
)
const SignTSFormat = "2006-01-02 15:04:05 -0700"
const (
// StatsFileNameDefault is the standard stats filename.
StatsFileNameDefault = "stats.csv"
)
Variables ¶
var ( Black = SimpleColor{} White = SimpleColor{R: 1, G: 1, B: 1} LightGray = SimpleColor{.9, .9, .9} Gray = SimpleColor{.5, .5, .5} DarkGray = SimpleColor{.3, .3, .3} Red = SimpleColor{1, 0, 0} Green = SimpleColor{0, 1, 0} Blue = SimpleColor{0, 0, 1} Yellow = SimpleColor{.5, .5, 0} )
Some popular colors.
var ( ErrWrongPassword = errors.New("pdfcpu: please provide the correct password") ErrCorruptHeader = errors.New("pdfcpu: no header version available") ErrMissingXRefSection = errors.New("pdfcpu: can't detect last xref section") ErrReferenceDoesNotExist = errors.New("pdfcpu: referenced object does not exist") )
var ( UserFontMetrics = map[string]TTFLight{} UserFontMetricsLock = &sync.RWMutex{} )
UserFontMetrics represents font metrics for TTF or OTF font files installed into UserFontDir.
var AnnotTypeStrings = map[AnnotationType]string{ AnnText: "Text", AnnLink: "Link", AnnFreeText: "FreeText", AnnLine: "Line", AnnSquare: "Square", AnnCircle: "Circle", AnnPolygon: "Polygon", AnnPolyLine: "PolyLine", AnnHighLight: "Highlight", AnnUnderline: "Underline", AnnSquiggly: "Squiggly", AnnStrikeOut: "StrikeOut", AnnStamp: "Stamp", AnnCaret: "Caret", AnnInk: "Ink", AnnPopup: "Popup", AnnFileAttachment: "FileAttachment", AnnSound: "Sound", AnnMovie: "Movie", AnnWidget: "Widget", AnnScreen: "Screen", AnnPrinterMark: "PrinterMark", AnnTrapNet: "TrapNet", AnnWatermark: "Watermark", Ann3D: "3D", AnnRedact: "Redact", AnnCustom: "Custom", }
AnnotTypeStrings manages string representations for annotation
var AnnotTypes = map[string]AnnotationType{ "Text": AnnText, "Link": AnnLink, "FreeText": AnnFreeText, "Line": AnnLine, "Square": AnnSquare, "Circle": AnnCircle, "Polygon": AnnPolygon, "PolyLine": AnnPolyLine, "Highlight": AnnHighLight, "Underline": AnnUnderline, "Squiggly": AnnSquiggly, "StrikeOut": AnnStrikeOut, "Stamp": AnnStamp, "Caret": AnnCaret, "Ink": AnnInk, "Popup": AnnPopup, "FileAttachment": AnnFileAttachment, "Sound": AnnSound, "Movie": AnnMovie, "Widget": AnnWidget, "Screen": AnnScreen, "PrinterMark": AnnPrinterMark, "TrapNet": AnnTrapNet, "Watermark": AnnWatermark, "3D": Ann3D, "Redact": AnnRedact, "Custom": AnnCustom, }
var Canceled = errors.New("context canceled")
Canceled is the error returned by [ContextContext.Err] when the context is canceled for some reason other than its deadline passing.
var ConfigPath string = "default"
ConfigPath defines the location of pdfcpu's configuration directory. If set to a file path, pdfcpu will ensure the config dir at this location. Other possible values:
default: Ensure config dir at default location disable: Disable config dir usage
If you want to disable config dir usage in a multi threaded environment you are encouraged to use api.DisableConfigDir().
var CoreFontMetrics = map[string]fontMetrics{ "Courier-Bold": { NewRectangle(-113.0, -250.0, 749.0, 801.0), map[string]int{"space": 600, "exclam": 600, "quotedbl": 600, "numbersign": 600, "dollar": 600, "percent": 600, "ampersand": 600, "quoteright": 600, "parenleft": 600, "parenright": 600, "asterisk": 600, "plus": 600, "comma": 600, "hyphen": 600, "period": 600, "slash": 600, "zero": 600, "one": 600, "two": 600, "three": 600, "four": 600, "five": 600, "six": 600, "seven": 600, "eight": 600, "nine": 600, "colon": 600, "semicolon": 600, "less": 600, "equal": 600, "greater": 600, "question": 600, "at": 600, "A": 600, "B": 600, "C": 600, "D": 600, "E": 600, "F": 600, "G": 600, "H": 600, "I": 600, "J": 600, "K": 600, "L": 600, "M": 600, "N": 600, "O": 600, "P": 600, "Q": 600, "R": 600, "S": 600, "T": 600, "U": 600, "V": 600, "W": 600, "X": 600, "Y": 600, "Z": 600, "bracketleft": 600, "backslash": 600, "bracketright": 600, "asciicircum": 600, "underscore": 600, "quoteleft": 600, "a": 600, "b": 600, "c": 600, "d": 600, "e": 600, "f": 600, "g": 600, "h": 600, "i": 600, "j": 600, "k": 600, "l": 600, "m": 600, "n": 600, "o": 600, "p": 600, "q": 600, "r": 600, "s": 600, "t": 600, "u": 600, "v": 600, "w": 600, "x": 600, "y": 600, "z": 600, "braceleft": 600, "bar": 600, "braceright": 600, "asciitilde": 600, "exclamdown": 600, "cent": 600, "sterling": 600, "fraction": 600, "yen": 600, "florin": 600, "section": 600, "currency": 600, "quotesingle": 600, "quotedblleft": 600, "guillemotleft": 600, "guilsinglleft": 600, "guilsinglright": 600, "fi": 600, "fl": 600, "endash": 600, "dagger": 600, "daggerdbl": 600, "periodcentered": 600, "paragraph": 600, "bullet": 600, "quotesinglbase": 600, "quotedblbase": 600, "quotedblright": 600, "guillemotright": 600, "ellipsis": 600, "perthousand": 600, "questiondown": 600, "grave": 600, "acute": 600, "circumflex": 600, "tilde": 600, "macron": 600, "breve": 600, "dotaccent": 600, "dieresis": 600, "ring": 600, "cedilla": 600, "hungarumlaut": 600, "ogonek": 600, "caron": 600, "emdash": 600, "AE": 600, "ordfeminine": 600, "Lslash": 600, "Oslash": 600, "OE": 600, "ordmasculine": 600, "ae": 600, "dotlessi": 600, "lslash": 600, "oslash": 600, "oe": 600, "germandbls": 600, "Idieresis": 600, "eacute": 600, "abreve": 600, "uhungarumlaut": 600, "ecaron": 600, "Ydieresis": 600, "divide": 600, "Yacute": 600, "Acircumflex": 600, "aacute": 600, "Ucircumflex": 600, "yacute": 600, "scommaaccent": 600, "ecircumflex": 600, "Uring": 600, "Udieresis": 600, "aogonek": 600, "Uacute": 600, "uogonek": 600, "Edieresis": 600, "Dcroat": 600, "commaaccent": 600, "copyright": 600, "Emacron": 600, "ccaron": 600, "aring": 600, "Ncommaaccent": 600, "lacute": 600, "agrave": 600, "Tcommaaccent": 600, "Cacute": 600, "atilde": 600, "Edotaccent": 600, "scaron": 600, "scedilla": 600, "iacute": 600, "lozenge": 600, "Rcaron": 600, "Gcommaaccent": 600, "ucircumflex": 600, "acircumflex": 600, "Amacron": 600, "rcaron": 600, "ccedilla": 600, "Zdotaccent": 600, "Thorn": 600, "Omacron": 600, "Racute": 600, "Sacute": 600, "dcaron": 600, "Umacron": 600, "uring": 600, "threesuperior": 600, "Ograve": 600, "Agrave": 600, "Abreve": 600, "multiply": 600, "uacute": 600, "Tcaron": 600, "partialdiff": 600, "ydieresis": 600, "Nacute": 600, "icircumflex": 600, "Ecircumflex": 600, "adieresis": 600, "edieresis": 600, "cacute": 600, "nacute": 600, "umacron": 600, "Ncaron": 600, "Iacute": 600, "plusminus": 600, "brokenbar": 600, "registered": 600, "Gbreve": 600, "Idotaccent": 600, "summation": 600, "Egrave": 600, "racute": 600, "omacron": 600, "Zacute": 600, "Zcaron": 600, "greaterequal": 600, "Eth": 600, "Ccedilla": 600, "lcommaaccent": 600, "tcaron": 600, "eogonek": 600, "Uogonek": 600, "Aacute": 600, "Adieresis": 600, "egrave": 600, "zacute": 600, "iogonek": 600, "Oacute": 600, "oacute": 600, "amacron": 600, "sacute": 600, "idieresis": 600, "Ocircumflex": 600, "Ugrave": 600, "Delta": 600, "thorn": 600, "twosuperior": 600, "Odieresis": 600, "mu": 600, "igrave": 600, "ohungarumlaut": 600, "Eogonek": 600, "dcroat": 600, "threequarters": 600, "Scedilla": 600, "lcaron": 600, "Kcommaaccent": 600, "Lacute": 600, "trademark": 600, "edotaccent": 600, "Igrave": 600, "Imacron": 600, "Lcaron": 600, "onehalf": 600, "lessequal": 600, "ocircumflex": 600, "ntilde": 600, "Uhungarumlaut": 600, "Eacute": 600, "emacron": 600, "gbreve": 600, "onequarter": 600, "Scaron": 600, "Scommaaccent": 600, "Ohungarumlaut": 600, "degree": 600, "ograve": 600, "Ccaron": 600, "ugrave": 600, "radical": 600, "Dcaron": 600, "rcommaaccent": 600, "Ntilde": 600, "otilde": 600, "Rcommaaccent": 600, "Lcommaaccent": 600, "Atilde": 600, "Aogonek": 600, "Aring": 600, "Otilde": 600, "zdotaccent": 600, "Ecaron": 600, "Iogonek": 600, "kcommaaccent": 600, "minus": 600, "Icircumflex": 600, "ncaron": 600, "tcommaaccent": 600, "logicalnot": 600, "odieresis": 600, "udieresis": 600, "notequal": 600, "gcommaaccent": 600, "eth": 600, "zcaron": 600, "ncommaaccent": 600, "onesuperior": 600, "imacron": 600, "Euro": 600}, }, "Courier-BoldOblique": { NewRectangle(-57.0, -250.0, 869.0, 801.0), map[string]int{"space": 600, "exclam": 600, "quotedbl": 600, "numbersign": 600, "dollar": 600, "percent": 600, "ampersand": 600, "quoteright": 600, "parenleft": 600, "parenright": 600, "asterisk": 600, "plus": 600, "comma": 600, "hyphen": 600, "period": 600, "slash": 600, "zero": 600, "one": 600, "two": 600, "three": 600, "four": 600, "five": 600, "six": 600, "seven": 600, "eight": 600, "nine": 600, "colon": 600, "semicolon": 600, "less": 600, "equal": 600, "greater": 600, "question": 600, "at": 600, "A": 600, "B": 600, "C": 600, "D": 600, "E": 600, "F": 600, "G": 600, "H": 600, "I": 600, "J": 600, "K": 600, "L": 600, "M": 600, "N": 600, "O": 600, "P": 600, "Q": 600, "R": 600, "S": 600, "T": 600, "U": 600, "V": 600, "W": 600, "X": 600, "Y": 600, "Z": 600, "bracketleft": 600, "backslash": 600, "bracketright": 600, "asciicircum": 600, "underscore": 600, "quoteleft": 600, "a": 600, "b": 600, "c": 600, "d": 600, "e": 600, "f": 600, "g": 600, "h": 600, "i": 600, "j": 600, "k": 600, "l": 600, "m": 600, "n": 600, "o": 600, "p": 600, "q": 600, "r": 600, "s": 600, "t": 600, "u": 600, "v": 600, "w": 600, "x": 600, "y": 600, "z": 600, "braceleft": 600, "bar": 600, "braceright": 600, "asciitilde": 600, "exclamdown": 600, "cent": 600, "sterling": 600, "fraction": 600, "yen": 600, "florin": 600, "section": 600, "currency": 600, "quotesingle": 600, "quotedblleft": 600, "guillemotleft": 600, "guilsinglleft": 600, "guilsinglright": 600, "fi": 600, "fl": 600, "endash": 600, "dagger": 600, "daggerdbl": 600, "periodcentered": 600, "paragraph": 600, "bullet": 600, "quotesinglbase": 600, "quotedblbase": 600, "quotedblright": 600, "guillemotright": 600, "ellipsis": 600, "perthousand": 600, "questiondown": 600, "grave": 600, "acute": 600, "circumflex": 600, "tilde": 600, "macron": 600, "breve": 600, "dotaccent": 600, "dieresis": 600, "ring": 600, "cedilla": 600, "hungarumlaut": 600, "ogonek": 600, "caron": 600, "emdash": 600, "AE": 600, "ordfeminine": 600, "Lslash": 600, "Oslash": 600, "OE": 600, "ordmasculine": 600, "ae": 600, "dotlessi": 600, "lslash": 600, "oslash": 600, "oe": 600, "germandbls": 600, "Idieresis": 600, "eacute": 600, "abreve": 600, "uhungarumlaut": 600, "ecaron": 600, "Ydieresis": 600, "divide": 600, "Yacute": 600, "Acircumflex": 600, "aacute": 600, "Ucircumflex": 600, "yacute": 600, "scommaaccent": 600, "ecircumflex": 600, "Uring": 600, "Udieresis": 600, "aogonek": 600, "Uacute": 600, "uogonek": 600, "Edieresis": 600, "Dcroat": 600, "commaaccent": 600, "copyright": 600, "Emacron": 600, "ccaron": 600, "aring": 600, "Ncommaaccent": 600, "lacute": 600, "agrave": 600, "Tcommaaccent": 600, "Cacute": 600, "atilde": 600, "Edotaccent": 600, "scaron": 600, "scedilla": 600, "iacute": 600, "lozenge": 600, "Rcaron": 600, "Gcommaaccent": 600, "ucircumflex": 600, "acircumflex": 600, "Amacron": 600, "rcaron": 600, "ccedilla": 600, "Zdotaccent": 600, "Thorn": 600, "Omacron": 600, "Racute": 600, "Sacute": 600, "dcaron": 600, "Umacron": 600, "uring": 600, "threesuperior": 600, "Ograve": 600, "Agrave": 600, "Abreve": 600, "multiply": 600, "uacute": 600, "Tcaron": 600, "partialdiff": 600, "ydieresis": 600, "Nacute": 600, "icircumflex": 600, "Ecircumflex": 600, "adieresis": 600, "edieresis": 600, "cacute": 600, "nacute": 600, "umacron": 600, "Ncaron": 600, "Iacute": 600, "plusminus": 600, "brokenbar": 600, "registered": 600, "Gbreve": 600, "Idotaccent": 600, "summation": 600, "Egrave": 600, "racute": 600, "omacron": 600, "Zacute": 600, "Zcaron": 600, "greaterequal": 600, "Eth": 600, "Ccedilla": 600, "lcommaaccent": 600, "tcaron": 600, "eogonek": 600, "Uogonek": 600, "Aacute": 600, "Adieresis": 600, "egrave": 600, "zacute": 600, "iogonek": 600, "Oacute": 600, "oacute": 600, "amacron": 600, "sacute": 600, "idieresis": 600, "Ocircumflex": 600, "Ugrave": 600, "Delta": 600, "thorn": 600, "twosuperior": 600, "Odieresis": 600, "mu": 600, "igrave": 600, "ohungarumlaut": 600, "Eogonek": 600, "dcroat": 600, "threequarters": 600, "Scedilla": 600, "lcaron": 600, "Kcommaaccent": 600, "Lacute": 600, "trademark": 600, "edotaccent": 600, "Igrave": 600, "Imacron": 600, "Lcaron": 600, "onehalf": 600, "lessequal": 600, "ocircumflex": 600, "ntilde": 600, "Uhungarumlaut": 600, "Eacute": 600, "emacron": 600, "gbreve": 600, "onequarter": 600, "Scaron": 600, "Scommaaccent": 600, "Ohungarumlaut": 600, "degree": 600, "ograve": 600, "Ccaron": 600, "ugrave": 600, "radical": 600, "Dcaron": 600, "rcommaaccent": 600, "Ntilde": 600, "otilde": 600, "Rcommaaccent": 600, "Lcommaaccent": 600, "Atilde": 600, "Aogonek": 600, "Aring": 600, "Otilde": 600, "zdotaccent": 600, "Ecaron": 600, "Iogonek": 600, "kcommaaccent": 600, "minus": 600, "Icircumflex": 600, "ncaron": 600, "tcommaaccent": 600, "logicalnot": 600, "odieresis": 600, "udieresis": 600, "notequal": 600, "gcommaaccent": 600, "eth": 600, "zcaron": 600, "ncommaaccent": 600, "onesuperior": 600, "imacron": 600, "Euro": 600}, }, "Courier-Oblique": { NewRectangle(-27.0, -250.0, 849.0, 805.0), map[string]int{"space": 600, "exclam": 600, "quotedbl": 600, "numbersign": 600, "dollar": 600, "percent": 600, "ampersand": 600, "quoteright": 600, "parenleft": 600, "parenright": 600, "asterisk": 600, "plus": 600, "comma": 600, "hyphen": 600, "period": 600, "slash": 600, "zero": 600, "one": 600, "two": 600, "three": 600, "four": 600, "five": 600, "six": 600, "seven": 600, "eight": 600, "nine": 600, "colon": 600, "semicolon": 600, "less": 600, "equal": 600, "greater": 600, "question": 600, "at": 600, "A": 600, "B": 600, "C": 600, "D": 600, "E": 600, "F": 600, "G": 600, "H": 600, "I": 600, "J": 600, "K": 600, "L": 600, "M": 600, "N": 600, "O": 600, "P": 600, "Q": 600, "R": 600, "S": 600, "T": 600, "U": 600, "V": 600, "W": 600, "X": 600, "Y": 600, "Z": 600, "bracketleft": 600, "backslash": 600, "bracketright": 600, "asciicircum": 600, "underscore": 600, "quoteleft": 600, "a": 600, "b": 600, "c": 600, "d": 600, "e": 600, "f": 600, "g": 600, "h": 600, "i": 600, "j": 600, "k": 600, "l": 600, "m": 600, "n": 600, "o": 600, "p": 600, "q": 600, "r": 600, "s": 600, "t": 600, "u": 600, "v": 600, "w": 600, "x": 600, "y": 600, "z": 600, "braceleft": 600, "bar": 600, "braceright": 600, "asciitilde": 600, "exclamdown": 600, "cent": 600, "sterling": 600, "fraction": 600, "yen": 600, "florin": 600, "section": 600, "currency": 600, "quotesingle": 600, "quotedblleft": 600, "guillemotleft": 600, "guilsinglleft": 600, "guilsinglright": 600, "fi": 600, "fl": 600, "endash": 600, "dagger": 600, "daggerdbl": 600, "periodcentered": 600, "paragraph": 600, "bullet": 600, "quotesinglbase": 600, "quotedblbase": 600, "quotedblright": 600, "guillemotright": 600, "ellipsis": 600, "perthousand": 600, "questiondown": 600, "grave": 600, "acute": 600, "circumflex": 600, "tilde": 600, "macron": 600, "breve": 600, "dotaccent": 600, "dieresis": 600, "ring": 600, "cedilla": 600, "hungarumlaut": 600, "ogonek": 600, "caron": 600, "emdash": 600, "AE": 600, "ordfeminine": 600, "Lslash": 600, "Oslash": 600, "OE": 600, "ordmasculine": 600, "ae": 600, "dotlessi": 600, "lslash": 600, "oslash": 600, "oe": 600, "germandbls": 600, "Idieresis": 600, "eacute": 600, "abreve": 600, "uhungarumlaut": 600, "ecaron": 600, "Ydieresis": 600, "divide": 600, "Yacute": 600, "Acircumflex": 600, "aacute": 600, "Ucircumflex": 600, "yacute": 600, "scommaaccent": 600, "ecircumflex": 600, "Uring": 600, "Udieresis": 600, "aogonek": 600, "Uacute": 600, "uogonek": 600, "Edieresis": 600, "Dcroat": 600, "commaaccent": 600, "copyright": 600, "Emacron": 600, "ccaron": 600, "aring": 600, "Ncommaaccent": 600, "lacute": 600, "agrave": 600, "Tcommaaccent": 600, "Cacute": 600, "atilde": 600, "Edotaccent": 600, "scaron": 600, "scedilla": 600, "iacute": 600, "lozenge": 600, "Rcaron": 600, "Gcommaaccent": 600, "ucircumflex": 600, "acircumflex": 600, "Amacron": 600, "rcaron": 600, "ccedilla": 600, "Zdotaccent": 600, "Thorn": 600, "Omacron": 600, "Racute": 600, "Sacute": 600, "dcaron": 600, "Umacron": 600, "uring": 600, "threesuperior": 600, "Ograve": 600, "Agrave": 600, "Abreve": 600, "multiply": 600, "uacute": 600, "Tcaron": 600, "partialdiff": 600, "ydieresis": 600, "Nacute": 600, "icircumflex": 600, "Ecircumflex": 600, "adieresis": 600, "edieresis": 600, "cacute": 600, "nacute": 600, "umacron": 600, "Ncaron": 600, "Iacute": 600, "plusminus": 600, "brokenbar": 600, "registered": 600, "Gbreve": 600, "Idotaccent": 600, "summation": 600, "Egrave": 600, "racute": 600, "omacron": 600, "Zacute": 600, "Zcaron": 600, "greaterequal": 600, "Eth": 600, "Ccedilla": 600, "lcommaaccent": 600, "tcaron": 600, "eogonek": 600, "Uogonek": 600, "Aacute": 600, "Adieresis": 600, "egrave": 600, "zacute": 600, "iogonek": 600, "Oacute": 600, "oacute": 600, "amacron": 600, "sacute": 600, "idieresis": 600, "Ocircumflex": 600, "Ugrave": 600, "Delta": 600, "thorn": 600, "twosuperior": 600, "Odieresis": 600, "mu": 600, "igrave": 600, "ohungarumlaut": 600, "Eogonek": 600, "dcroat": 600, "threequarters": 600, "Scedilla": 600, "lcaron": 600, "Kcommaaccent": 600, "Lacute": 600, "trademark": 600, "edotaccent": 600, "Igrave": 600, "Imacron": 600, "Lcaron": 600, "onehalf": 600, "lessequal": 600, "ocircumflex": 600, "ntilde": 600, "Uhungarumlaut": 600, "Eacute": 600, "emacron": 600, "gbreve": 600, "onequarter": 600, "Scaron": 600, "Scommaaccent": 600, "Ohungarumlaut": 600, "degree": 600, "ograve": 600, "Ccaron": 600, "ugrave": 600, "radical": 600, "Dcaron": 600, "rcommaaccent": 600, "Ntilde": 600, "otilde": 600, "Rcommaaccent": 600, "Lcommaaccent": 600, "Atilde": 600, "Aogonek": 600, "Aring": 600, "Otilde": 600, "zdotaccent": 600, "Ecaron": 600, "Iogonek": 600, "kcommaaccent": 600, "minus": 600, "Icircumflex": 600, "ncaron": 600, "tcommaaccent": 600, "logicalnot": 600, "odieresis": 600, "udieresis": 600, "notequal": 600, "gcommaaccent": 600, "eth": 600, "zcaron": 600, "ncommaaccent": 600, "onesuperior": 600, "imacron": 600, "Euro": 600}, }, "Courier": { NewRectangle(-23.0, -250.0, 715.0, 805.0), map[string]int{"space": 600, "exclam": 600, "quotedbl": 600, "numbersign": 600, "dollar": 600, "percent": 600, "ampersand": 600, "quoteright": 600, "parenleft": 600, "parenright": 600, "asterisk": 600, "plus": 600, "comma": 600, "hyphen": 600, "period": 600, "slash": 600, "zero": 600, "one": 600, "two": 600, "three": 600, "four": 600, "five": 600, "six": 600, "seven": 600, "eight": 600, "nine": 600, "colon": 600, "semicolon": 600, "less": 600, "equal": 600, "greater": 600, "question": 600, "at": 600, "A": 600, "B": 600, "C": 600, "D": 600, "E": 600, "F": 600, "G": 600, "H": 600, "I": 600, "J": 600, "K": 600, "L": 600, "M": 600, "N": 600, "O": 600, "P": 600, "Q": 600, "R": 600, "S": 600, "T": 600, "U": 600, "V": 600, "W": 600, "X": 600, "Y": 600, "Z": 600, "bracketleft": 600, "backslash": 600, "bracketright": 600, "asciicircum": 600, "underscore": 600, "quoteleft": 600, "a": 600, "b": 600, "c": 600, "d": 600, "e": 600, "f": 600, "g": 600, "h": 600, "i": 600, "j": 600, "k": 600, "l": 600, "m": 600, "n": 600, "o": 600, "p": 600, "q": 600, "r": 600, "s": 600, "t": 600, "u": 600, "v": 600, "w": 600, "x": 600, "y": 600, "z": 600, "braceleft": 600, "bar": 600, "braceright": 600, "asciitilde": 600, "exclamdown": 600, "cent": 600, "sterling": 600, "fraction": 600, "yen": 600, "florin": 600, "section": 600, "currency": 600, "quotesingle": 600, "quotedblleft": 600, "guillemotleft": 600, "guilsinglleft": 600, "guilsinglright": 600, "fi": 600, "fl": 600, "endash": 600, "dagger": 600, "daggerdbl": 600, "periodcentered": 600, "paragraph": 600, "bullet": 600, "quotesinglbase": 600, "quotedblbase": 600, "quotedblright": 600, "guillemotright": 600, "ellipsis": 600, "perthousand": 600, "questiondown": 600, "grave": 600, "acute": 600, "circumflex": 600, "tilde": 600, "macron": 600, "breve": 600, "dotaccent": 600, "dieresis": 600, "ring": 600, "cedilla": 600, "hungarumlaut": 600, "ogonek": 600, "caron": 600, "emdash": 600, "AE": 600, "ordfeminine": 600, "Lslash": 600, "Oslash": 600, "OE": 600, "ordmasculine": 600, "ae": 600, "dotlessi": 600, "lslash": 600, "oslash": 600, "oe": 600, "germandbls": 600, "Idieresis": 600, "eacute": 600, "abreve": 600, "uhungarumlaut": 600, "ecaron": 600, "Ydieresis": 600, "divide": 600, "Yacute": 600, "Acircumflex": 600, "aacute": 600, "Ucircumflex": 600, "yacute": 600, "scommaaccent": 600, "ecircumflex": 600, "Uring": 600, "Udieresis": 600, "aogonek": 600, "Uacute": 600, "uogonek": 600, "Edieresis": 600, "Dcroat": 600, "commaaccent": 600, "copyright": 600, "Emacron": 600, "ccaron": 600, "aring": 600, "Ncommaaccent": 600, "lacute": 600, "agrave": 600, "Tcommaaccent": 600, "Cacute": 600, "atilde": 600, "Edotaccent": 600, "scaron": 600, "scedilla": 600, "iacute": 600, "lozenge": 600, "Rcaron": 600, "Gcommaaccent": 600, "ucircumflex": 600, "acircumflex": 600, "Amacron": 600, "rcaron": 600, "ccedilla": 600, "Zdotaccent": 600, "Thorn": 600, "Omacron": 600, "Racute": 600, "Sacute": 600, "dcaron": 600, "Umacron": 600, "uring": 600, "threesuperior": 600, "Ograve": 600, "Agrave": 600, "Abreve": 600, "multiply": 600, "uacute": 600, "Tcaron": 600, "partialdiff": 600, "ydieresis": 600, "Nacute": 600, "icircumflex": 600, "Ecircumflex": 600, "adieresis": 600, "edieresis": 600, "cacute": 600, "nacute": 600, "umacron": 600, "Ncaron": 600, "Iacute": 600, "plusminus": 600, "brokenbar": 600, "registered": 600, "Gbreve": 600, "Idotaccent": 600, "summation": 600, "Egrave": 600, "racute": 600, "omacron": 600, "Zacute": 600, "Zcaron": 600, "greaterequal": 600, "Eth": 600, "Ccedilla": 600, "lcommaaccent": 600, "tcaron": 600, "eogonek": 600, "Uogonek": 600, "Aacute": 600, "Adieresis": 600, "egrave": 600, "zacute": 600, "iogonek": 600, "Oacute": 600, "oacute": 600, "amacron": 600, "sacute": 600, "idieresis": 600, "Ocircumflex": 600, "Ugrave": 600, "Delta": 600, "thorn": 600, "twosuperior": 600, "Odieresis": 600, "mu": 600, "igrave": 600, "ohungarumlaut": 600, "Eogonek": 600, "dcroat": 600, "threequarters": 600, "Scedilla": 600, "lcaron": 600, "Kcommaaccent": 600, "Lacute": 600, "trademark": 600, "edotaccent": 600, "Igrave": 600, "Imacron": 600, "Lcaron": 600, "onehalf": 600, "lessequal": 600, "ocircumflex": 600, "ntilde": 600, "Uhungarumlaut": 600, "Eacute": 600, "emacron": 600, "gbreve": 600, "onequarter": 600, "Scaron": 600, "Scommaaccent": 600, "Ohungarumlaut": 600, "degree": 600, "ograve": 600, "Ccaron": 600, "ugrave": 600, "radical": 600, "Dcaron": 600, "rcommaaccent": 600, "Ntilde": 600, "otilde": 600, "Rcommaaccent": 600, "Lcommaaccent": 600, "Atilde": 600, "Aogonek": 600, "Aring": 600, "Otilde": 600, "zdotaccent": 600, "Ecaron": 600, "Iogonek": 600, "kcommaaccent": 600, "minus": 600, "Icircumflex": 600, "ncaron": 600, "tcommaaccent": 600, "logicalnot": 600, "odieresis": 600, "udieresis": 600, "notequal": 600, "gcommaaccent": 600, "eth": 600, "zcaron": 600, "ncommaaccent": 600, "onesuperior": 600, "imacron": 600, "Euro": 600}, }, "Helvetica-Bold": { NewRectangle(-170.0, -228.0, 1003.0, 962.0), map[string]int{"space": 278, "exclam": 333, "quotedbl": 474, "numbersign": 556, "dollar": 556, "percent": 889, "ampersand": 722, "quoteright": 278, "parenleft": 333, "parenright": 333, "asterisk": 389, "plus": 584, "comma": 278, "hyphen": 333, "period": 278, "slash": 278, "zero": 556, "one": 556, "two": 556, "three": 556, "four": 556, "five": 556, "six": 556, "seven": 556, "eight": 556, "nine": 556, "colon": 333, "semicolon": 333, "less": 584, "equal": 584, "greater": 584, "question": 611, "at": 975, "A": 722, "B": 722, "C": 722, "D": 722, "E": 667, "F": 611, "G": 778, "H": 722, "I": 278, "J": 556, "K": 722, "L": 611, "M": 833, "N": 722, "O": 778, "P": 667, "Q": 778, "R": 722, "S": 667, "T": 611, "U": 722, "V": 667, "W": 944, "X": 667, "Y": 667, "Z": 611, "bracketleft": 333, "backslash": 278, "bracketright": 333, "asciicircum": 584, "underscore": 556, "quoteleft": 278, "a": 556, "b": 611, "c": 556, "d": 611, "e": 556, "f": 333, "g": 611, "h": 611, "i": 278, "j": 278, "k": 556, "l": 278, "m": 889, "n": 611, "o": 611, "p": 611, "q": 611, "r": 389, "s": 556, "t": 333, "u": 611, "v": 556, "w": 778, "x": 556, "y": 556, "z": 500, "braceleft": 389, "bar": 280, "braceright": 389, "asciitilde": 584, "exclamdown": 333, "cent": 556, "sterling": 556, "fraction": 167, "yen": 556, "florin": 556, "section": 556, "currency": 556, "quotesingle": 238, "quotedblleft": 500, "guillemotleft": 556, "guilsinglleft": 333, "guilsinglright": 333, "fi": 611, "fl": 611, "endash": 556, "dagger": 556, "daggerdbl": 556, "periodcentered": 278, "paragraph": 556, "bullet": 350, "quotesinglbase": 278, "quotedblbase": 500, "quotedblright": 500, "guillemotright": 556, "ellipsis": 1000, "perthousand": 1000, "questiondown": 611, "grave": 333, "acute": 333, "circumflex": 333, "tilde": 333, "macron": 333, "breve": 333, "dotaccent": 333, "dieresis": 333, "ring": 333, "cedilla": 333, "hungarumlaut": 333, "ogonek": 333, "caron": 333, "emdash": 1000, "AE": 1000, "ordfeminine": 370, "Lslash": 611, "Oslash": 778, "OE": 1000, "ordmasculine": 365, "ae": 889, "dotlessi": 278, "lslash": 278, "oslash": 611, "oe": 944, "germandbls": 611, "Idieresis": 278, "eacute": 556, "abreve": 556, "uhungarumlaut": 611, "ecaron": 556, "Ydieresis": 667, "divide": 584, "Yacute": 667, "Acircumflex": 722, "aacute": 556, "Ucircumflex": 722, "yacute": 556, "scommaaccent": 556, "ecircumflex": 556, "Uring": 722, "Udieresis": 722, "aogonek": 556, "Uacute": 722, "uogonek": 611, "Edieresis": 667, "Dcroat": 722, "commaaccent": 250, "copyright": 737, "Emacron": 667, "ccaron": 556, "aring": 556, "Ncommaaccent": 722, "lacute": 278, "agrave": 556, "Tcommaaccent": 611, "Cacute": 722, "atilde": 556, "Edotaccent": 667, "scaron": 556, "scedilla": 556, "iacute": 278, "lozenge": 494, "Rcaron": 722, "Gcommaaccent": 778, "ucircumflex": 611, "acircumflex": 556, "Amacron": 722, "rcaron": 389, "ccedilla": 556, "Zdotaccent": 611, "Thorn": 667, "Omacron": 778, "Racute": 722, "Sacute": 667, "dcaron": 743, "Umacron": 722, "uring": 611, "threesuperior": 333, "Ograve": 778, "Agrave": 722, "Abreve": 722, "multiply": 584, "uacute": 611, "Tcaron": 611, "partialdiff": 494, "ydieresis": 556, "Nacute": 722, "icircumflex": 278, "Ecircumflex": 667, "adieresis": 556, "edieresis": 556, "cacute": 556, "nacute": 611, "umacron": 611, "Ncaron": 722, "Iacute": 278, "plusminus": 584, "brokenbar": 280, "registered": 737, "Gbreve": 778, "Idotaccent": 278, "summation": 600, "Egrave": 667, "racute": 389, "omacron": 611, "Zacute": 611, "Zcaron": 611, "greaterequal": 549, "Eth": 722, "Ccedilla": 722, "lcommaaccent": 278, "tcaron": 389, "eogonek": 556, "Uogonek": 722, "Aacute": 722, "Adieresis": 722, "egrave": 556, "zacute": 500, "iogonek": 278, "Oacute": 778, "oacute": 611, "amacron": 556, "sacute": 556, "idieresis": 278, "Ocircumflex": 778, "Ugrave": 722, "Delta": 612, "thorn": 611, "twosuperior": 333, "Odieresis": 778, "mu": 611, "igrave": 278, "ohungarumlaut": 611, "Eogonek": 667, "dcroat": 611, "threequarters": 834, "Scedilla": 667, "lcaron": 400, "Kcommaaccent": 722, "Lacute": 611, "trademark": 1000, "edotaccent": 556, "Igrave": 278, "Imacron": 278, "Lcaron": 611, "onehalf": 834, "lessequal": 549, "ocircumflex": 611, "ntilde": 611, "Uhungarumlaut": 722, "Eacute": 667, "emacron": 556, "gbreve": 611, "onequarter": 834, "Scaron": 667, "Scommaaccent": 667, "Ohungarumlaut": 778, "degree": 400, "ograve": 611, "Ccaron": 722, "ugrave": 611, "radical": 549, "Dcaron": 722, "rcommaaccent": 389, "Ntilde": 722, "otilde": 611, "Rcommaaccent": 722, "Lcommaaccent": 611, "Atilde": 722, "Aogonek": 722, "Aring": 722, "Otilde": 778, "zdotaccent": 500, "Ecaron": 667, "Iogonek": 278, "kcommaaccent": 556, "minus": 584, "Icircumflex": 278, "ncaron": 611, "tcommaaccent": 333, "logicalnot": 584, "odieresis": 611, "udieresis": 611, "notequal": 549, "gcommaaccent": 611, "eth": 611, "zcaron": 500, "ncommaaccent": 611, "onesuperior": 333, "imacron": 278, "Euro": 556}, }, "Helvetica-BoldOblique": { NewRectangle(-174.0, -228.0, 1114.0, 962.0), map[string]int{"space": 278, "exclam": 333, "quotedbl": 474, "numbersign": 556, "dollar": 556, "percent": 889, "ampersand": 722, "quoteright": 278, "parenleft": 333, "parenright": 333, "asterisk": 389, "plus": 584, "comma": 278, "hyphen": 333, "period": 278, "slash": 278, "zero": 556, "one": 556, "two": 556, "three": 556, "four": 556, "five": 556, "six": 556, "seven": 556, "eight": 556, "nine": 556, "colon": 333, "semicolon": 333, "less": 584, "equal": 584, "greater": 584, "question": 611, "at": 975, "A": 722, "B": 722, "C": 722, "D": 722, "E": 667, "F": 611, "G": 778, "H": 722, "I": 278, "J": 556, "K": 722, "L": 611, "M": 833, "N": 722, "O": 778, "P": 667, "Q": 778, "R": 722, "S": 667, "T": 611, "U": 722, "V": 667, "W": 944, "X": 667, "Y": 667, "Z": 611, "bracketleft": 333, "backslash": 278, "bracketright": 333, "asciicircum": 584, "underscore": 556, "quoteleft": 278, "a": 556, "b": 611, "c": 556, "d": 611, "e": 556, "f": 333, "g": 611, "h": 611, "i": 278, "j": 278, "k": 556, "l": 278, "m": 889, "n": 611, "o": 611, "p": 611, "q": 611, "r": 389, "s": 556, "t": 333, "u": 611, "v": 556, "w": 778, "x": 556, "y": 556, "z": 500, "braceleft": 389, "bar": 280, "braceright": 389, "asciitilde": 584, "exclamdown": 333, "cent": 556, "sterling": 556, "fraction": 167, "yen": 556, "florin": 556, "section": 556, "currency": 556, "quotesingle": 238, "quotedblleft": 500, "guillemotleft": 556, "guilsinglleft": 333, "guilsinglright": 333, "fi": 611, "fl": 611, "endash": 556, "dagger": 556, "daggerdbl": 556, "periodcentered": 278, "paragraph": 556, "bullet": 350, "quotesinglbase": 278, "quotedblbase": 500, "quotedblright": 500, "guillemotright": 556, "ellipsis": 1000, "perthousand": 1000, "questiondown": 611, "grave": 333, "acute": 333, "circumflex": 333, "tilde": 333, "macron": 333, "breve": 333, "dotaccent": 333, "dieresis": 333, "ring": 333, "cedilla": 333, "hungarumlaut": 333, "ogonek": 333, "caron": 333, "emdash": 1000, "AE": 1000, "ordfeminine": 370, "Lslash": 611, "Oslash": 778, "OE": 1000, "ordmasculine": 365, "ae": 889, "dotlessi": 278, "lslash": 278, "oslash": 611, "oe": 944, "germandbls": 611, "Idieresis": 278, "eacute": 556, "abreve": 556, "uhungarumlaut": 611, "ecaron": 556, "Ydieresis": 667, "divide": 584, "Yacute": 667, "Acircumflex": 722, "aacute": 556, "Ucircumflex": 722, "yacute": 556, "scommaaccent": 556, "ecircumflex": 556, "Uring": 722, "Udieresis": 722, "aogonek": 556, "Uacute": 722, "uogonek": 611, "Edieresis": 667, "Dcroat": 722, "commaaccent": 250, "copyright": 737, "Emacron": 667, "ccaron": 556, "aring": 556, "Ncommaaccent": 722, "lacute": 278, "agrave": 556, "Tcommaaccent": 611, "Cacute": 722, "atilde": 556, "Edotaccent": 667, "scaron": 556, "scedilla": 556, "iacute": 278, "lozenge": 494, "Rcaron": 722, "Gcommaaccent": 778, "ucircumflex": 611, "acircumflex": 556, "Amacron": 722, "rcaron": 389, "ccedilla": 556, "Zdotaccent": 611, "Thorn": 667, "Omacron": 778, "Racute": 722, "Sacute": 667, "dcaron": 743, "Umacron": 722, "uring": 611, "threesuperior": 333, "Ograve": 778, "Agrave": 722, "Abreve": 722, "multiply": 584, "uacute": 611, "Tcaron": 611, "partialdiff": 494, "ydieresis": 556, "Nacute": 722, "icircumflex": 278, "Ecircumflex": 667, "adieresis": 556, "edieresis": 556, "cacute": 556, "nacute": 611, "umacron": 611, "Ncaron": 722, "Iacute": 278, "plusminus": 584, "brokenbar": 280, "registered": 737, "Gbreve": 778, "Idotaccent": 278, "summation": 600, "Egrave": 667, "racute": 389, "omacron": 611, "Zacute": 611, "Zcaron": 611, "greaterequal": 549, "Eth": 722, "Ccedilla": 722, "lcommaaccent": 278, "tcaron": 389, "eogonek": 556, "Uogonek": 722, "Aacute": 722, "Adieresis": 722, "egrave": 556, "zacute": 500, "iogonek": 278, "Oacute": 778, "oacute": 611, "amacron": 556, "sacute": 556, "idieresis": 278, "Ocircumflex": 778, "Ugrave": 722, "Delta": 612, "thorn": 611, "twosuperior": 333, "Odieresis": 778, "mu": 611, "igrave": 278, "ohungarumlaut": 611, "Eogonek": 667, "dcroat": 611, "threequarters": 834, "Scedilla": 667, "lcaron": 400, "Kcommaaccent": 722, "Lacute": 611, "trademark": 1000, "edotaccent": 556, "Igrave": 278, "Imacron": 278, "Lcaron": 611, "onehalf": 834, "lessequal": 549, "ocircumflex": 611, "ntilde": 611, "Uhungarumlaut": 722, "Eacute": 667, "emacron": 556, "gbreve": 611, "onequarter": 834, "Scaron": 667, "Scommaaccent": 667, "Ohungarumlaut": 778, "degree": 400, "ograve": 611, "Ccaron": 722, "ugrave": 611, "radical": 549, "Dcaron": 722, "rcommaaccent": 389, "Ntilde": 722, "otilde": 611, "Rcommaaccent": 722, "Lcommaaccent": 611, "Atilde": 722, "Aogonek": 722, "Aring": 722, "Otilde": 778, "zdotaccent": 500, "Ecaron": 667, "Iogonek": 278, "kcommaaccent": 556, "minus": 584, "Icircumflex": 278, "ncaron": 611, "tcommaaccent": 333, "logicalnot": 584, "odieresis": 611, "udieresis": 611, "notequal": 549, "gcommaaccent": 611, "eth": 611, "zcaron": 500, "ncommaaccent": 611, "onesuperior": 333, "imacron": 278, "Euro": 556}, }, "Helvetica-Oblique": { NewRectangle(-170.0, -225.0, 1116.0, 931.0), map[string]int{"space": 278, "exclam": 278, "quotedbl": 355, "numbersign": 556, "dollar": 556, "percent": 889, "ampersand": 667, "quoteright": 222, "parenleft": 333, "parenright": 333, "asterisk": 389, "plus": 584, "comma": 278, "hyphen": 333, "period": 278, "slash": 278, "zero": 556, "one": 556, "two": 556, "three": 556, "four": 556, "five": 556, "six": 556, "seven": 556, "eight": 556, "nine": 556, "colon": 278, "semicolon": 278, "less": 584, "equal": 584, "greater": 584, "question": 556, "at": 1015, "A": 667, "B": 667, "C": 722, "D": 722, "E": 667, "F": 611, "G": 778, "H": 722, "I": 278, "J": 500, "K": 667, "L": 556, "M": 833, "N": 722, "O": 778, "P": 667, "Q": 778, "R": 722, "S": 667, "T": 611, "U": 722, "V": 667, "W": 944, "X": 667, "Y": 667, "Z": 611, "bracketleft": 278, "backslash": 278, "bracketright": 278, "asciicircum": 469, "underscore": 556, "quoteleft": 222, "a": 556, "b": 556, "c": 500, "d": 556, "e": 556, "f": 278, "g": 556, "h": 556, "i": 222, "j": 222, "k": 500, "l": 222, "m": 833, "n": 556, "o": 556, "p": 556, "q": 556, "r": 333, "s": 500, "t": 278, "u": 556, "v": 500, "w": 722, "x": 500, "y": 500, "z": 500, "braceleft": 334, "bar": 260, "braceright": 334, "asciitilde": 584, "exclamdown": 333, "cent": 556, "sterling": 556, "fraction": 167, "yen": 556, "florin": 556, "section": 556, "currency": 556, "quotesingle": 191, "quotedblleft": 333, "guillemotleft": 556, "guilsinglleft": 333, "guilsinglright": 333, "fi": 500, "fl": 500, "endash": 556, "dagger": 556, "daggerdbl": 556, "periodcentered": 278, "paragraph": 537, "bullet": 350, "quotesinglbase": 222, "quotedblbase": 333, "quotedblright": 333, "guillemotright": 556, "ellipsis": 1000, "perthousand": 1000, "questiondown": 611, "grave": 333, "acute": 333, "circumflex": 333, "tilde": 333, "macron": 333, "breve": 333, "dotaccent": 333, "dieresis": 333, "ring": 333, "cedilla": 333, "hungarumlaut": 333, "ogonek": 333, "caron": 333, "emdash": 1000, "AE": 1000, "ordfeminine": 370, "Lslash": 556, "Oslash": 778, "OE": 1000, "ordmasculine": 365, "ae": 889, "dotlessi": 278, "lslash": 222, "oslash": 611, "oe": 944, "germandbls": 611, "Idieresis": 278, "eacute": 556, "abreve": 556, "uhungarumlaut": 556, "ecaron": 556, "Ydieresis": 667, "divide": 584, "Yacute": 667, "Acircumflex": 667, "aacute": 556, "Ucircumflex": 722, "yacute": 500, "scommaaccent": 500, "ecircumflex": 556, "Uring": 722, "Udieresis": 722, "aogonek": 556, "Uacute": 722, "uogonek": 556, "Edieresis": 667, "Dcroat": 722, "commaaccent": 250, "copyright": 737, "Emacron": 667, "ccaron": 500, "aring": 556, "Ncommaaccent": 722, "lacute": 222, "agrave": 556, "Tcommaaccent": 611, "Cacute": 722, "atilde": 556, "Edotaccent": 667, "scaron": 500, "scedilla": 500, "iacute": 278, "lozenge": 471, "Rcaron": 722, "Gcommaaccent": 778, "ucircumflex": 556, "acircumflex": 556, "Amacron": 667, "rcaron": 333, "ccedilla": 500, "Zdotaccent": 611, "Thorn": 667, "Omacron": 778, "Racute": 722, "Sacute": 667, "dcaron": 643, "Umacron": 722, "uring": 556, "threesuperior": 333, "Ograve": 778, "Agrave": 667, "Abreve": 667, "multiply": 584, "uacute": 556, "Tcaron": 611, "partialdiff": 476, "ydieresis": 500, "Nacute": 722, "icircumflex": 278, "Ecircumflex": 667, "adieresis": 556, "edieresis": 556, "cacute": 500, "nacute": 556, "umacron": 556, "Ncaron": 722, "Iacute": 278, "plusminus": 584, "brokenbar": 260, "registered": 737, "Gbreve": 778, "Idotaccent": 278, "summation": 600, "Egrave": 667, "racute": 333, "omacron": 556, "Zacute": 611, "Zcaron": 611, "greaterequal": 549, "Eth": 722, "Ccedilla": 722, "lcommaaccent": 222, "tcaron": 317, "eogonek": 556, "Uogonek": 722, "Aacute": 667, "Adieresis": 667, "egrave": 556, "zacute": 500, "iogonek": 222, "Oacute": 778, "oacute": 556, "amacron": 556, "sacute": 500, "idieresis": 278, "Ocircumflex": 778, "Ugrave": 722, "Delta": 612, "thorn": 556, "twosuperior": 333, "Odieresis": 778, "mu": 556, "igrave": 278, "ohungarumlaut": 556, "Eogonek": 667, "dcroat": 556, "threequarters": 834, "Scedilla": 667, "lcaron": 299, "Kcommaaccent": 667, "Lacute": 556, "trademark": 1000, "edotaccent": 556, "Igrave": 278, "Imacron": 278, "Lcaron": 556, "onehalf": 834, "lessequal": 549, "ocircumflex": 556, "ntilde": 556, "Uhungarumlaut": 722, "Eacute": 667, "emacron": 556, "gbreve": 556, "onequarter": 834, "Scaron": 667, "Scommaaccent": 667, "Ohungarumlaut": 778, "degree": 400, "ograve": 556, "Ccaron": 722, "ugrave": 556, "radical": 453, "Dcaron": 722, "rcommaaccent": 333, "Ntilde": 722, "otilde": 556, "Rcommaaccent": 722, "Lcommaaccent": 556, "Atilde": 667, "Aogonek": 667, "Aring": 667, "Otilde": 778, "zdotaccent": 500, "Ecaron": 667, "Iogonek": 278, "kcommaaccent": 500, "minus": 584, "Icircumflex": 278, "ncaron": 556, "tcommaaccent": 278, "logicalnot": 584, "odieresis": 556, "udieresis": 556, "notequal": 549, "gcommaaccent": 556, "eth": 556, "zcaron": 500, "ncommaaccent": 556, "onesuperior": 333, "imacron": 278, "Euro": 556}, }, "Helvetica": { NewRectangle(-166.0, -225.0, 1000.0, 931.0), map[string]int{"space": 278, "exclam": 278, "quotedbl": 355, "numbersign": 556, "dollar": 556, "percent": 889, "ampersand": 667, "quoteright": 222, "parenleft": 333, "parenright": 333, "asterisk": 389, "plus": 584, "comma": 278, "hyphen": 333, "period": 278, "slash": 278, "zero": 556, "one": 556, "two": 556, "three": 556, "four": 556, "five": 556, "six": 556, "seven": 556, "eight": 556, "nine": 556, "colon": 278, "semicolon": 278, "less": 584, "equal": 584, "greater": 584, "question": 556, "at": 1015, "A": 667, "B": 667, "C": 722, "D": 722, "E": 667, "F": 611, "G": 778, "H": 722, "I": 278, "J": 500, "K": 667, "L": 556, "M": 833, "N": 722, "O": 778, "P": 667, "Q": 778, "R": 722, "S": 667, "T": 611, "U": 722, "V": 667, "W": 944, "X": 667, "Y": 667, "Z": 611, "bracketleft": 278, "backslash": 278, "bracketright": 278, "asciicircum": 469, "underscore": 556, "quoteleft": 222, "a": 556, "b": 556, "c": 500, "d": 556, "e": 556, "f": 278, "g": 556, "h": 556, "i": 222, "j": 222, "k": 500, "l": 222, "m": 833, "n": 556, "o": 556, "p": 556, "q": 556, "r": 333, "s": 500, "t": 278, "u": 556, "v": 500, "w": 722, "x": 500, "y": 500, "z": 500, "braceleft": 334, "bar": 260, "braceright": 334, "asciitilde": 584, "exclamdown": 333, "cent": 556, "sterling": 556, "fraction": 167, "yen": 556, "florin": 556, "section": 556, "currency": 556, "quotesingle": 191, "quotedblleft": 333, "guillemotleft": 556, "guilsinglleft": 333, "guilsinglright": 333, "fi": 500, "fl": 500, "endash": 556, "dagger": 556, "daggerdbl": 556, "periodcentered": 278, "paragraph": 537, "bullet": 350, "quotesinglbase": 222, "quotedblbase": 333, "quotedblright": 333, "guillemotright": 556, "ellipsis": 1000, "perthousand": 1000, "questiondown": 611, "grave": 333, "acute": 333, "circumflex": 333, "tilde": 333, "macron": 333, "breve": 333, "dotaccent": 333, "dieresis": 333, "ring": 333, "cedilla": 333, "hungarumlaut": 333, "ogonek": 333, "caron": 333, "emdash": 1000, "AE": 1000, "ordfeminine": 370, "Lslash": 556, "Oslash": 778, "OE": 1000, "ordmasculine": 365, "ae": 889, "dotlessi": 278, "lslash": 222, "oslash": 611, "oe": 944, "germandbls": 611, "Idieresis": 278, "eacute": 556, "abreve": 556, "uhungarumlaut": 556, "ecaron": 556, "Ydieresis": 667, "divide": 584, "Yacute": 667, "Acircumflex": 667, "aacute": 556, "Ucircumflex": 722, "yacute": 500, "scommaaccent": 500, "ecircumflex": 556, "Uring": 722, "Udieresis": 722, "aogonek": 556, "Uacute": 722, "uogonek": 556, "Edieresis": 667, "Dcroat": 722, "commaaccent": 250, "copyright": 737, "Emacron": 667, "ccaron": 500, "aring": 556, "Ncommaaccent": 722, "lacute": 222, "agrave": 556, "Tcommaaccent": 611, "Cacute": 722, "atilde": 556, "Edotaccent": 667, "scaron": 500, "scedilla": 500, "iacute": 278, "lozenge": 471, "Rcaron": 722, "Gcommaaccent": 778, "ucircumflex": 556, "acircumflex": 556, "Amacron": 667, "rcaron": 333, "ccedilla": 500, "Zdotaccent": 611, "Thorn": 667, "Omacron": 778, "Racute": 722, "Sacute": 667, "dcaron": 643, "Umacron": 722, "uring": 556, "threesuperior": 333, "Ograve": 778, "Agrave": 667, "Abreve": 667, "multiply": 584, "uacute": 556, "Tcaron": 611, "partialdiff": 476, "ydieresis": 500, "Nacute": 722, "icircumflex": 278, "Ecircumflex": 667, "adieresis": 556, "edieresis": 556, "cacute": 500, "nacute": 556, "umacron": 556, "Ncaron": 722, "Iacute": 278, "plusminus": 584, "brokenbar": 260, "registered": 737, "Gbreve": 778, "Idotaccent": 278, "summation": 600, "Egrave": 667, "racute": 333, "omacron": 556, "Zacute": 611, "Zcaron": 611, "greaterequal": 549, "Eth": 722, "Ccedilla": 722, "lcommaaccent": 222, "tcaron": 317, "eogonek": 556, "Uogonek": 722, "Aacute": 667, "Adieresis": 667, "egrave": 556, "zacute": 500, "iogonek": 222, "Oacute": 778, "oacute": 556, "amacron": 556, "sacute": 500, "idieresis": 278, "Ocircumflex": 778, "Ugrave": 722, "Delta": 612, "thorn": 556, "twosuperior": 333, "Odieresis": 778, "mu": 556, "igrave": 278, "ohungarumlaut": 556, "Eogonek": 667, "dcroat": 556, "threequarters": 834, "Scedilla": 667, "lcaron": 299, "Kcommaaccent": 667, "Lacute": 556, "trademark": 1000, "edotaccent": 556, "Igrave": 278, "Imacron": 278, "Lcaron": 556, "onehalf": 834, "lessequal": 549, "ocircumflex": 556, "ntilde": 556, "Uhungarumlaut": 722, "Eacute": 667, "emacron": 556, "gbreve": 556, "onequarter": 834, "Scaron": 667, "Scommaaccent": 667, "Ohungarumlaut": 778, "degree": 400, "ograve": 556, "Ccaron": 722, "ugrave": 556, "radical": 453, "Dcaron": 722, "rcommaaccent": 333, "Ntilde": 722, "otilde": 556, "Rcommaaccent": 722, "Lcommaaccent": 556, "Atilde": 667, "Aogonek": 667, "Aring": 667, "Otilde": 778, "zdotaccent": 500, "Ecaron": 667, "Iogonek": 278, "kcommaaccent": 500, "minus": 584, "Icircumflex": 278, "ncaron": 556, "tcommaaccent": 278, "logicalnot": 584, "odieresis": 556, "udieresis": 556, "notequal": 549, "gcommaaccent": 556, "eth": 556, "zcaron": 500, "ncommaaccent": 556, "onesuperior": 333, "imacron": 278, "Euro": 556}, }, "Symbol": { NewRectangle(-180.0, -293.0, 1090.0, 1010.0), map[string]int{"space": 250, "exclam": 333, "universal": 713, "numbersign": 500, "existential": 549, "percent": 833, "ampersand": 778, "suchthat": 439, "parenleft": 333, "parenright": 333, "asteriskmath": 500, "plus": 549, "comma": 250, "minus": 549, "period": 250, "slash": 278, "zero": 500, "one": 500, "two": 500, "three": 500, "four": 500, "five": 500, "six": 500, "seven": 500, "eight": 500, "nine": 500, "colon": 278, "semicolon": 278, "less": 549, "equal": 549, "greater": 549, "question": 444, "congruent": 549, "Alpha": 722, "Beta": 667, "Chi": 722, "Delta": 612, "Epsilon": 611, "Phi": 763, "Gamma": 603, "Eta": 722, "Iota": 333, "theta1": 631, "Kappa": 722, "Lambda": 686, "Mu": 889, "Nu": 722, "Omicron": 722, "Pi": 768, "Theta": 741, "Rho": 556, "Sigma": 592, "Tau": 611, "Upsilon": 690, "sigma1": 439, "Omega": 768, "Xi": 645, "Psi": 795, "Zeta": 611, "bracketleft": 333, "therefore": 863, "bracketright": 333, "perpendicular": 658, "underscore": 500, "radicalex": 500, "alpha": 631, "beta": 549, "chi": 549, "delta": 494, "epsilon": 439, "phi": 521, "gamma": 411, "eta": 603, "iota": 329, "phi1": 603, "kappa": 549, "lambda": 549, "mu": 576, "nu": 521, "omicron": 549, "pi": 549, "theta": 521, "rho": 549, "sigma": 603, "tau": 439, "upsilon": 576, "omega1": 713, "omega": 686, "xi": 493, "psi": 686, "zeta": 494, "braceleft": 480, "bar": 200, "braceright": 480, "similar": 549, "Euro": 750, "Upsilon1": 620, "minute": 247, "lessequal": 549, "fraction": 167, "infinity": 713, "florin": 500, "club": 753, "diamond": 753, "heart": 753, "spade": 753, "arrowboth": 1042, "arrowleft": 987, "arrowup": 603, "arrowright": 987, "arrowdown": 603, "degree": 400, "plusminus": 549, "second": 411, "greaterequal": 549, "multiply": 549, "proportional": 713, "partialdiff": 494, "bullet": 460, "divide": 549, "notequal": 549, "equivalence": 549, "approxequal": 549, "ellipsis": 1000, "arrowvertex": 603, "arrowhorizex": 1000, "carriagereturn": 658, "aleph": 823, "Ifraktur": 686, "Rfraktur": 795, "weierstrass": 987, "circlemultiply": 768, "circleplus": 768, "emptyset": 823, "intersection": 768, "union": 768, "propersuperset": 713, "reflexsuperset": 713, "notsubset": 713, "propersubset": 713, "reflexsubset": 713, "element": 713, "notelement": 713, "angle": 768, "gradient": 713, "registerserif": 790, "copyrightserif": 790, "trademarkserif": 890, "product": 823, "radical": 549, "dotmath": 250, "logicalnot": 713, "logicaland": 603, "logicalor": 603, "arrowdblboth": 1042, "arrowdblleft": 987, "arrowdblup": 603, "arrowdblright": 987, "arrowdbldown": 603, "lozenge": 494, "angleleft": 329, "registersans": 790, "copyrightsans": 790, "trademarksans": 786, "summation": 713, "parenlefttp": 384, "parenleftex": 384, "parenleftbt": 384, "bracketlefttp": 384, "bracketleftex": 384, "bracketleftbt": 384, "bracelefttp": 494, "braceleftmid": 494, "braceleftbt": 494, "braceex": 494, "angleright": 329, "integral": 274, "integraltp": 686, "integralex": 686, "integralbt": 686, "parenrighttp": 384, "parenrightex": 384, "parenrightbt": 384, "bracketrighttp": 384, "bracketrightex": 384, "bracketrightbt": 384, "bracerighttp": 494, "bracerightmid": 494, "bracerightbt": 494, "apple": 790}, }, "Times-Bold": { NewRectangle(-168.0, -218.0, 1000.0, 935.0), map[string]int{"space": 250, "exclam": 333, "quotedbl": 555, "numbersign": 500, "dollar": 500, "percent": 1000, "ampersand": 833, "quoteright": 333, "parenleft": 333, "parenright": 333, "asterisk": 500, "plus": 570, "comma": 250, "hyphen": 333, "period": 250, "slash": 278, "zero": 500, "one": 500, "two": 500, "three": 500, "four": 500, "five": 500, "six": 500, "seven": 500, "eight": 500, "nine": 500, "colon": 333, "semicolon": 333, "less": 570, "equal": 570, "greater": 570, "question": 500, "at": 930, "A": 722, "B": 667, "C": 722, "D": 722, "E": 667, "F": 611, "G": 778, "H": 778, "I": 389, "J": 500, "K": 778, "L": 667, "M": 944, "N": 722, "O": 778, "P": 611, "Q": 778, "R": 722, "S": 556, "T": 667, "U": 722, "V": 722, "W": 1000, "X": 722, "Y": 722, "Z": 667, "bracketleft": 333, "backslash": 278, "bracketright": 333, "asciicircum": 581, "underscore": 500, "quoteleft": 333, "a": 500, "b": 556, "c": 444, "d": 556, "e": 444, "f": 333, "g": 500, "h": 556, "i": 278, "j": 333, "k": 556, "l": 278, "m": 833, "n": 556, "o": 500, "p": 556, "q": 556, "r": 444, "s": 389, "t": 333, "u": 556, "v": 500, "w": 722, "x": 500, "y": 500, "z": 444, "braceleft": 394, "bar": 220, "braceright": 394, "asciitilde": 520, "exclamdown": 333, "cent": 500, "sterling": 500, "fraction": 167, "yen": 500, "florin": 500, "section": 500, "currency": 500, "quotesingle": 278, "quotedblleft": 500, "guillemotleft": 500, "guilsinglleft": 333, "guilsinglright": 333, "fi": 556, "fl": 556, "endash": 500, "dagger": 500, "daggerdbl": 500, "periodcentered": 250, "paragraph": 540, "bullet": 350, "quotesinglbase": 333, "quotedblbase": 500, "quotedblright": 500, "guillemotright": 500, "ellipsis": 1000, "perthousand": 1000, "questiondown": 500, "grave": 333, "acute": 333, "circumflex": 333, "tilde": 333, "macron": 333, "breve": 333, "dotaccent": 333, "dieresis": 333, "ring": 333, "cedilla": 333, "hungarumlaut": 333, "ogonek": 333, "caron": 333, "emdash": 1000, "AE": 1000, "ordfeminine": 300, "Lslash": 667, "Oslash": 778, "OE": 1000, "ordmasculine": 330, "ae": 722, "dotlessi": 278, "lslash": 278, "oslash": 500, "oe": 722, "germandbls": 556, "Idieresis": 389, "eacute": 444, "abreve": 500, "uhungarumlaut": 556, "ecaron": 444, "Ydieresis": 722, "divide": 570, "Yacute": 722, "Acircumflex": 722, "aacute": 500, "Ucircumflex": 722, "yacute": 500, "scommaaccent": 389, "ecircumflex": 444, "Uring": 722, "Udieresis": 722, "aogonek": 500, "Uacute": 722, "uogonek": 556, "Edieresis": 667, "Dcroat": 722, "commaaccent": 250, "copyright": 747, "Emacron": 667, "ccaron": 444, "aring": 500, "Ncommaaccent": 722, "lacute": 278, "agrave": 500, "Tcommaaccent": 667, "Cacute": 722, "atilde": 500, "Edotaccent": 667, "scaron": 389, "scedilla": 389, "iacute": 278, "lozenge": 494, "Rcaron": 722, "Gcommaaccent": 778, "ucircumflex": 556, "acircumflex": 500, "Amacron": 722, "rcaron": 444, "ccedilla": 444, "Zdotaccent": 667, "Thorn": 611, "Omacron": 778, "Racute": 722, "Sacute": 556, "dcaron": 672, "Umacron": 722, "uring": 556, "threesuperior": 300, "Ograve": 778, "Agrave": 722, "Abreve": 722, "multiply": 570, "uacute": 556, "Tcaron": 667, "partialdiff": 494, "ydieresis": 500, "Nacute": 722, "icircumflex": 278, "Ecircumflex": 667, "adieresis": 500, "edieresis": 444, "cacute": 444, "nacute": 556, "umacron": 556, "Ncaron": 722, "Iacute": 389, "plusminus": 570, "brokenbar": 220, "registered": 747, "Gbreve": 778, "Idotaccent": 389, "summation": 600, "Egrave": 667, "racute": 444, "omacron": 500, "Zacute": 667, "Zcaron": 667, "greaterequal": 549, "Eth": 722, "Ccedilla": 722, "lcommaaccent": 278, "tcaron": 416, "eogonek": 444, "Uogonek": 722, "Aacute": 722, "Adieresis": 722, "egrave": 444, "zacute": 444, "iogonek": 278, "Oacute": 778, "oacute": 500, "amacron": 500, "sacute": 389, "idieresis": 278, "Ocircumflex": 778, "Ugrave": 722, "Delta": 612, "thorn": 556, "twosuperior": 300, "Odieresis": 778, "mu": 556, "igrave": 278, "ohungarumlaut": 500, "Eogonek": 667, "dcroat": 556, "threequarters": 750, "Scedilla": 556, "lcaron": 394, "Kcommaaccent": 778, "Lacute": 667, "trademark": 1000, "edotaccent": 444, "Igrave": 389, "Imacron": 389, "Lcaron": 667, "onehalf": 750, "lessequal": 549, "ocircumflex": 500, "ntilde": 556, "Uhungarumlaut": 722, "Eacute": 667, "emacron": 444, "gbreve": 500, "onequarter": 750, "Scaron": 556, "Scommaaccent": 556, "Ohungarumlaut": 778, "degree": 400, "ograve": 500, "Ccaron": 722, "ugrave": 556, "radical": 549, "Dcaron": 722, "rcommaaccent": 444, "Ntilde": 722, "otilde": 500, "Rcommaaccent": 722, "Lcommaaccent": 667, "Atilde": 722, "Aogonek": 722, "Aring": 722, "Otilde": 778, "zdotaccent": 444, "Ecaron": 667, "Iogonek": 389, "kcommaaccent": 556, "minus": 570, "Icircumflex": 389, "ncaron": 556, "tcommaaccent": 333, "logicalnot": 570, "odieresis": 500, "udieresis": 556, "notequal": 549, "gcommaaccent": 500, "eth": 500, "zcaron": 444, "ncommaaccent": 556, "onesuperior": 300, "imacron": 278, "Euro": 500}, }, "Times-BoldItalic": { NewRectangle(-200.0, -218.0, 996.0, 921.0), map[string]int{"space": 250, "exclam": 389, "quotedbl": 555, "numbersign": 500, "dollar": 500, "percent": 833, "ampersand": 778, "quoteright": 333, "parenleft": 333, "parenright": 333, "asterisk": 500, "plus": 570, "comma": 250, "hyphen": 333, "period": 250, "slash": 278, "zero": 500, "one": 500, "two": 500, "three": 500, "four": 500, "five": 500, "six": 500, "seven": 500, "eight": 500, "nine": 500, "colon": 333, "semicolon": 333, "less": 570, "equal": 570, "greater": 570, "question": 500, "at": 832, "A": 667, "B": 667, "C": 667, "D": 722, "E": 667, "F": 667, "G": 722, "H": 778, "I": 389, "J": 500, "K": 667, "L": 611, "M": 889, "N": 722, "O": 722, "P": 611, "Q": 722, "R": 667, "S": 556, "T": 611, "U": 722, "V": 667, "W": 889, "X": 667, "Y": 611, "Z": 611, "bracketleft": 333, "backslash": 278, "bracketright": 333, "asciicircum": 570, "underscore": 500, "quoteleft": 333, "a": 500, "b": 500, "c": 444, "d": 500, "e": 444, "f": 333, "g": 500, "h": 556, "i": 278, "j": 278, "k": 500, "l": 278, "m": 778, "n": 556, "o": 500, "p": 500, "q": 500, "r": 389, "s": 389, "t": 278, "u": 556, "v": 444, "w": 667, "x": 500, "y": 444, "z": 389, "braceleft": 348, "bar": 220, "braceright": 348, "asciitilde": 570, "exclamdown": 389, "cent": 500, "sterling": 500, "fraction": 167, "yen": 500, "florin": 500, "section": 500, "currency": 500, "quotesingle": 278, "quotedblleft": 500, "guillemotleft": 500, "guilsinglleft": 333, "guilsinglright": 333, "fi": 556, "fl": 556, "endash": 500, "dagger": 500, "daggerdbl": 500, "periodcentered": 250, "paragraph": 500, "bullet": 350, "quotesinglbase": 333, "quotedblbase": 500, "quotedblright": 500, "guillemotright": 500, "ellipsis": 1000, "perthousand": 1000, "questiondown": 500, "grave": 333, "acute": 333, "circumflex": 333, "tilde": 333, "macron": 333, "breve": 333, "dotaccent": 333, "dieresis": 333, "ring": 333, "cedilla": 333, "hungarumlaut": 333, "ogonek": 333, "caron": 333, "emdash": 1000, "AE": 944, "ordfeminine": 266, "Lslash": 611, "Oslash": 722, "OE": 944, "ordmasculine": 300, "ae": 722, "dotlessi": 278, "lslash": 278, "oslash": 500, "oe": 722, "germandbls": 500, "Idieresis": 389, "eacute": 444, "abreve": 500, "uhungarumlaut": 556, "ecaron": 444, "Ydieresis": 611, "divide": 570, "Yacute": 611, "Acircumflex": 667, "aacute": 500, "Ucircumflex": 722, "yacute": 444, "scommaaccent": 389, "ecircumflex": 444, "Uring": 722, "Udieresis": 722, "aogonek": 500, "Uacute": 722, "uogonek": 556, "Edieresis": 667, "Dcroat": 722, "commaaccent": 250, "copyright": 747, "Emacron": 667, "ccaron": 444, "aring": 500, "Ncommaaccent": 722, "lacute": 278, "agrave": 500, "Tcommaaccent": 611, "Cacute": 667, "atilde": 500, "Edotaccent": 667, "scaron": 389, "scedilla": 389, "iacute": 278, "lozenge": 494, "Rcaron": 667, "Gcommaaccent": 722, "ucircumflex": 556, "acircumflex": 500, "Amacron": 667, "rcaron": 389, "ccedilla": 444, "Zdotaccent": 611, "Thorn": 611, "Omacron": 722, "Racute": 667, "Sacute": 556, "dcaron": 608, "Umacron": 722, "uring": 556, "threesuperior": 300, "Ograve": 722, "Agrave": 667, "Abreve": 667, "multiply": 570, "uacute": 556, "Tcaron": 611, "partialdiff": 494, "ydieresis": 444, "Nacute": 722, "icircumflex": 278, "Ecircumflex": 667, "adieresis": 500, "edieresis": 444, "cacute": 444, "nacute": 556, "umacron": 556, "Ncaron": 722, "Iacute": 389, "plusminus": 570, "brokenbar": 220, "registered": 747, "Gbreve": 722, "Idotaccent": 389, "summation": 600, "Egrave": 667, "racute": 389, "omacron": 500, "Zacute": 611, "Zcaron": 611, "greaterequal": 549, "Eth": 722, "Ccedilla": 667, "lcommaaccent": 278, "tcaron": 366, "eogonek": 444, "Uogonek": 722, "Aacute": 667, "Adieresis": 667, "egrave": 444, "zacute": 389, "iogonek": 278, "Oacute": 722, "oacute": 500, "amacron": 500, "sacute": 389, "idieresis": 278, "Ocircumflex": 722, "Ugrave": 722, "Delta": 612, "thorn": 500, "twosuperior": 300, "Odieresis": 722, "mu": 576, "igrave": 278, "ohungarumlaut": 500, "Eogonek": 667, "dcroat": 500, "threequarters": 750, "Scedilla": 556, "lcaron": 382, "Kcommaaccent": 667, "Lacute": 611, "trademark": 1000, "edotaccent": 444, "Igrave": 389, "Imacron": 389, "Lcaron": 611, "onehalf": 750, "lessequal": 549, "ocircumflex": 500, "ntilde": 556, "Uhungarumlaut": 722, "Eacute": 667, "emacron": 444, "gbreve": 500, "onequarter": 750, "Scaron": 556, "Scommaaccent": 556, "Ohungarumlaut": 722, "degree": 400, "ograve": 500, "Ccaron": 667, "ugrave": 556, "radical": 549, "Dcaron": 722, "rcommaaccent": 389, "Ntilde": 722, "otilde": 500, "Rcommaaccent": 667, "Lcommaaccent": 611, "Atilde": 667, "Aogonek": 667, "Aring": 667, "Otilde": 722, "zdotaccent": 389, "Ecaron": 667, "Iogonek": 389, "kcommaaccent": 500, "minus": 606, "Icircumflex": 389, "ncaron": 556, "tcommaaccent": 278, "logicalnot": 606, "odieresis": 500, "udieresis": 556, "notequal": 549, "gcommaaccent": 500, "eth": 500, "zcaron": 389, "ncommaaccent": 556, "onesuperior": 300, "imacron": 278, "Euro": 500}, }, "Times-Italic": { NewRectangle(-169.0, -217.0, 1010.0, 883.0), map[string]int{"space": 250, "exclam": 333, "quotedbl": 420, "numbersign": 500, "dollar": 500, "percent": 833, "ampersand": 778, "quoteright": 333, "parenleft": 333, "parenright": 333, "asterisk": 500, "plus": 675, "comma": 250, "hyphen": 333, "period": 250, "slash": 278, "zero": 500, "one": 500, "two": 500, "three": 500, "four": 500, "five": 500, "six": 500, "seven": 500, "eight": 500, "nine": 500, "colon": 333, "semicolon": 333, "less": 675, "equal": 675, "greater": 675, "question": 500, "at": 920, "A": 611, "B": 611, "C": 667, "D": 722, "E": 611, "F": 611, "G": 722, "H": 722, "I": 333, "J": 444, "K": 667, "L": 556, "M": 833, "N": 667, "O": 722, "P": 611, "Q": 722, "R": 611, "S": 500, "T": 556, "U": 722, "V": 611, "W": 833, "X": 611, "Y": 556, "Z": 556, "bracketleft": 389, "backslash": 278, "bracketright": 389, "asciicircum": 422, "underscore": 500, "quoteleft": 333, "a": 500, "b": 500, "c": 444, "d": 500, "e": 444, "f": 278, "g": 500, "h": 500, "i": 278, "j": 278, "k": 444, "l": 278, "m": 722, "n": 500, "o": 500, "p": 500, "q": 500, "r": 389, "s": 389, "t": 278, "u": 500, "v": 444, "w": 667, "x": 444, "y": 444, "z": 389, "braceleft": 400, "bar": 275, "braceright": 400, "asciitilde": 541, "exclamdown": 389, "cent": 500, "sterling": 500, "fraction": 167, "yen": 500, "florin": 500, "section": 500, "currency": 500, "quotesingle": 214, "quotedblleft": 556, "guillemotleft": 500, "guilsinglleft": 333, "guilsinglright": 333, "fi": 500, "fl": 500, "endash": 500, "dagger": 500, "daggerdbl": 500, "periodcentered": 250, "paragraph": 523, "bullet": 350, "quotesinglbase": 333, "quotedblbase": 556, "quotedblright": 556, "guillemotright": 500, "ellipsis": 889, "perthousand": 1000, "questiondown": 500, "grave": 333, "acute": 333, "circumflex": 333, "tilde": 333, "macron": 333, "breve": 333, "dotaccent": 333, "dieresis": 333, "ring": 333, "cedilla": 333, "hungarumlaut": 333, "ogonek": 333, "caron": 333, "emdash": 889, "AE": 889, "ordfeminine": 276, "Lslash": 556, "Oslash": 722, "OE": 944, "ordmasculine": 310, "ae": 667, "dotlessi": 278, "lslash": 278, "oslash": 500, "oe": 667, "germandbls": 500, "Idieresis": 333, "eacute": 444, "abreve": 500, "uhungarumlaut": 500, "ecaron": 444, "Ydieresis": 556, "divide": 675, "Yacute": 556, "Acircumflex": 611, "aacute": 500, "Ucircumflex": 722, "yacute": 444, "scommaaccent": 389, "ecircumflex": 444, "Uring": 722, "Udieresis": 722, "aogonek": 500, "Uacute": 722, "uogonek": 500, "Edieresis": 611, "Dcroat": 722, "commaaccent": 250, "copyright": 760, "Emacron": 611, "ccaron": 444, "aring": 500, "Ncommaaccent": 667, "lacute": 278, "agrave": 500, "Tcommaaccent": 556, "Cacute": 667, "atilde": 500, "Edotaccent": 611, "scaron": 389, "scedilla": 389, "iacute": 278, "lozenge": 471, "Rcaron": 611, "Gcommaaccent": 722, "ucircumflex": 500, "acircumflex": 500, "Amacron": 611, "rcaron": 389, "ccedilla": 444, "Zdotaccent": 556, "Thorn": 611, "Omacron": 722, "Racute": 611, "Sacute": 500, "dcaron": 544, "Umacron": 722, "uring": 500, "threesuperior": 300, "Ograve": 722, "Agrave": 611, "Abreve": 611, "multiply": 675, "uacute": 500, "Tcaron": 556, "partialdiff": 476, "ydieresis": 444, "Nacute": 667, "icircumflex": 278, "Ecircumflex": 611, "adieresis": 500, "edieresis": 444, "cacute": 444, "nacute": 500, "umacron": 500, "Ncaron": 667, "Iacute": 333, "plusminus": 675, "brokenbar": 275, "registered": 760, "Gbreve": 722, "Idotaccent": 333, "summation": 600, "Egrave": 611, "racute": 389, "omacron": 500, "Zacute": 556, "Zcaron": 556, "greaterequal": 549, "Eth": 722, "Ccedilla": 667, "lcommaaccent": 278, "tcaron": 300, "eogonek": 444, "Uogonek": 722, "Aacute": 611, "Adieresis": 611, "egrave": 444, "zacute": 389, "iogonek": 278, "Oacute": 722, "oacute": 500, "amacron": 500, "sacute": 389, "idieresis": 278, "Ocircumflex": 722, "Ugrave": 722, "Delta": 612, "thorn": 500, "twosuperior": 300, "Odieresis": 722, "mu": 500, "igrave": 278, "ohungarumlaut": 500, "Eogonek": 611, "dcroat": 500, "threequarters": 750, "Scedilla": 500, "lcaron": 300, "Kcommaaccent": 667, "Lacute": 556, "trademark": 980, "edotaccent": 444, "Igrave": 333, "Imacron": 333, "Lcaron": 611, "onehalf": 750, "lessequal": 549, "ocircumflex": 500, "ntilde": 500, "Uhungarumlaut": 722, "Eacute": 611, "emacron": 444, "gbreve": 500, "onequarter": 750, "Scaron": 500, "Scommaaccent": 500, "Ohungarumlaut": 722, "degree": 400, "ograve": 500, "Ccaron": 667, "ugrave": 500, "radical": 453, "Dcaron": 722, "rcommaaccent": 389, "Ntilde": 667, "otilde": 500, "Rcommaaccent": 611, "Lcommaaccent": 556, "Atilde": 611, "Aogonek": 611, "Aring": 611, "Otilde": 722, "zdotaccent": 389, "Ecaron": 611, "Iogonek": 333, "kcommaaccent": 444, "minus": 675, "Icircumflex": 333, "ncaron": 500, "tcommaaccent": 278, "logicalnot": 675, "odieresis": 500, "udieresis": 500, "notequal": 549, "gcommaaccent": 500, "eth": 500, "zcaron": 389, "ncommaaccent": 500, "onesuperior": 300, "imacron": 278, "Euro": 500}, }, "Times-Roman": { NewRectangle(-168.0, -218.0, 1000.0, 898.0), map[string]int{"space": 250, "exclam": 333, "quotedbl": 408, "numbersign": 500, "dollar": 500, "percent": 833, "ampersand": 778, "quoteright": 333, "parenleft": 333, "parenright": 333, "asterisk": 500, "plus": 564, "comma": 250, "hyphen": 333, "period": 250, "slash": 278, "zero": 500, "one": 500, "two": 500, "three": 500, "four": 500, "five": 500, "six": 500, "seven": 500, "eight": 500, "nine": 500, "colon": 278, "semicolon": 278, "less": 564, "equal": 564, "greater": 564, "question": 444, "at": 921, "A": 722, "B": 667, "C": 667, "D": 722, "E": 611, "F": 556, "G": 722, "H": 722, "I": 333, "J": 389, "K": 722, "L": 611, "M": 889, "N": 722, "O": 722, "P": 556, "Q": 722, "R": 667, "S": 556, "T": 611, "U": 722, "V": 722, "W": 944, "X": 722, "Y": 722, "Z": 611, "bracketleft": 333, "backslash": 278, "bracketright": 333, "asciicircum": 469, "underscore": 500, "quoteleft": 333, "a": 444, "b": 500, "c": 444, "d": 500, "e": 444, "f": 333, "g": 500, "h": 500, "i": 278, "j": 278, "k": 500, "l": 278, "m": 778, "n": 500, "o": 500, "p": 500, "q": 500, "r": 333, "s": 389, "t": 278, "u": 500, "v": 500, "w": 722, "x": 500, "y": 500, "z": 444, "braceleft": 480, "bar": 200, "braceright": 480, "asciitilde": 541, "exclamdown": 333, "cent": 500, "sterling": 500, "fraction": 167, "yen": 500, "florin": 500, "section": 500, "currency": 500, "quotesingle": 180, "quotedblleft": 444, "guillemotleft": 500, "guilsinglleft": 333, "guilsinglright": 333, "fi": 556, "fl": 556, "endash": 500, "dagger": 500, "daggerdbl": 500, "periodcentered": 250, "paragraph": 453, "bullet": 350, "quotesinglbase": 333, "quotedblbase": 444, "quotedblright": 444, "guillemotright": 500, "ellipsis": 1000, "perthousand": 1000, "questiondown": 444, "grave": 333, "acute": 333, "circumflex": 333, "tilde": 333, "macron": 333, "breve": 333, "dotaccent": 333, "dieresis": 333, "ring": 333, "cedilla": 333, "hungarumlaut": 333, "ogonek": 333, "caron": 333, "emdash": 1000, "AE": 889, "ordfeminine": 276, "Lslash": 611, "Oslash": 722, "OE": 889, "ordmasculine": 310, "ae": 667, "dotlessi": 278, "lslash": 278, "oslash": 500, "oe": 722, "germandbls": 500, "Idieresis": 333, "eacute": 444, "abreve": 444, "uhungarumlaut": 500, "ecaron": 444, "Ydieresis": 722, "divide": 564, "Yacute": 722, "Acircumflex": 722, "aacute": 444, "Ucircumflex": 722, "yacute": 500, "scommaaccent": 389, "ecircumflex": 444, "Uring": 722, "Udieresis": 722, "aogonek": 444, "Uacute": 722, "uogonek": 500, "Edieresis": 611, "Dcroat": 722, "commaaccent": 250, "copyright": 760, "Emacron": 611, "ccaron": 444, "aring": 444, "Ncommaaccent": 722, "lacute": 278, "agrave": 444, "Tcommaaccent": 611, "Cacute": 667, "atilde": 444, "Edotaccent": 611, "scaron": 389, "scedilla": 389, "iacute": 278, "lozenge": 471, "Rcaron": 667, "Gcommaaccent": 722, "ucircumflex": 500, "acircumflex": 444, "Amacron": 722, "rcaron": 333, "ccedilla": 444, "Zdotaccent": 611, "Thorn": 556, "Omacron": 722, "Racute": 667, "Sacute": 556, "dcaron": 588, "Umacron": 722, "uring": 500, "threesuperior": 300, "Ograve": 722, "Agrave": 722, "Abreve": 722, "multiply": 564, "uacute": 500, "Tcaron": 611, "partialdiff": 476, "ydieresis": 500, "Nacute": 722, "icircumflex": 278, "Ecircumflex": 611, "adieresis": 444, "edieresis": 444, "cacute": 444, "nacute": 500, "umacron": 500, "Ncaron": 722, "Iacute": 333, "plusminus": 564, "brokenbar": 200, "registered": 760, "Gbreve": 722, "Idotaccent": 333, "summation": 600, "Egrave": 611, "racute": 333, "omacron": 500, "Zacute": 611, "Zcaron": 611, "greaterequal": 549, "Eth": 722, "Ccedilla": 667, "lcommaaccent": 278, "tcaron": 326, "eogonek": 444, "Uogonek": 722, "Aacute": 722, "Adieresis": 722, "egrave": 444, "zacute": 444, "iogonek": 278, "Oacute": 722, "oacute": 500, "amacron": 444, "sacute": 389, "idieresis": 278, "Ocircumflex": 722, "Ugrave": 722, "Delta": 612, "thorn": 500, "twosuperior": 300, "Odieresis": 722, "mu": 500, "igrave": 278, "ohungarumlaut": 500, "Eogonek": 611, "dcroat": 500, "threequarters": 750, "Scedilla": 556, "lcaron": 344, "Kcommaaccent": 722, "Lacute": 611, "trademark": 980, "edotaccent": 444, "Igrave": 333, "Imacron": 333, "Lcaron": 611, "onehalf": 750, "lessequal": 549, "ocircumflex": 500, "ntilde": 500, "Uhungarumlaut": 722, "Eacute": 611, "emacron": 444, "gbreve": 500, "onequarter": 750, "Scaron": 556, "Scommaaccent": 556, "Ohungarumlaut": 722, "degree": 400, "ograve": 500, "Ccaron": 667, "ugrave": 500, "radical": 453, "Dcaron": 722, "rcommaaccent": 333, "Ntilde": 722, "otilde": 500, "Rcommaaccent": 667, "Lcommaaccent": 611, "Atilde": 722, "Aogonek": 722, "Aring": 722, "Otilde": 722, "zdotaccent": 444, "Ecaron": 611, "Iogonek": 333, "kcommaaccent": 500, "minus": 564, "Icircumflex": 333, "ncaron": 500, "tcommaaccent": 278, "logicalnot": 564, "odieresis": 500, "udieresis": 500, "notequal": 549, "gcommaaccent": 500, "eth": 500, "zcaron": 444, "ncommaaccent": 500, "onesuperior": 300, "imacron": 278, "Euro": 500}, }, "ZapfDingbats": { NewRectangle(-1.0, -143.0, 981.0, 820.0), map[string]int{"space": 278, "a1": 974, "a2": 961, "a202": 974, "a3": 980, "a4": 719, "a5": 789, "a119": 790, "a118": 791, "a117": 690, "a11": 960, "a12": 939, "a13": 549, "a14": 855, "a15": 911, "a16": 933, "a105": 911, "a17": 945, "a18": 974, "a19": 755, "a20": 846, "a21": 762, "a22": 761, "a23": 571, "a24": 677, "a25": 763, "a26": 760, "a27": 759, "a28": 754, "a6": 494, "a7": 552, "a8": 537, "a9": 577, "a10": 692, "a29": 786, "a30": 788, "a31": 788, "a32": 790, "a33": 793, "a34": 794, "a35": 816, "a36": 823, "a37": 789, "a38": 841, "a39": 823, "a40": 833, "a41": 816, "a42": 831, "a43": 923, "a44": 744, "a45": 723, "a46": 749, "a47": 790, "a48": 792, "a49": 695, "a50": 776, "a51": 768, "a52": 792, "a53": 759, "a54": 707, "a55": 708, "a56": 682, "a57": 701, "a58": 826, "a59": 815, "a60": 789, "a61": 789, "a62": 707, "a63": 687, "a64": 696, "a65": 689, "a66": 786, "a67": 787, "a68": 713, "a69": 791, "a70": 785, "a71": 791, "a72": 873, "a73": 761, "a74": 762, "a203": 762, "a75": 759, "a204": 759, "a76": 892, "a77": 892, "a78": 788, "a79": 784, "a81": 438, "a82": 138, "a83": 277, "a84": 415, "a97": 392, "a98": 392, "a99": 668, "a100": 668, "a89": 390, "a90": 390, "a93": 317, "a94": 317, "a91": 276, "a92": 276, "a205": 509, "a85": 509, "a206": 410, "a86": 410, "a87": 234, "a88": 234, "a95": 334, "a96": 334, "a101": 732, "a102": 544, "a103": 544, "a104": 910, "a106": 667, "a107": 760, "a108": 760, "a112": 776, "a111": 595, "a110": 694, "a109": 626, "a120": 788, "a121": 788, "a122": 788, "a123": 788, "a124": 788, "a125": 788, "a126": 788, "a127": 788, "a128": 788, "a129": 788, "a130": 788, "a131": 788, "a132": 788, "a133": 788, "a134": 788, "a135": 788, "a136": 788, "a137": 788, "a138": 788, "a139": 788, "a140": 788, "a141": 788, "a142": 788, "a143": 788, "a144": 788, "a145": 788, "a146": 788, "a147": 788, "a148": 788, "a149": 788, "a150": 788, "a151": 788, "a152": 788, "a153": 788, "a154": 788, "a155": 788, "a156": 788, "a157": 788, "a158": 788, "a159": 788, "a160": 894, "a161": 838, "a163": 1016, "a164": 458, "a196": 748, "a165": 924, "a192": 748, "a166": 918, "a167": 927, "a168": 928, "a169": 928, "a170": 834, "a171": 873, "a172": 828, "a173": 924, "a162": 924, "a174": 917, "a175": 930, "a176": 931, "a177": 463, "a178": 883, "a179": 836, "a193": 836, "a180": 867, "a199": 867, "a181": 696, "a200": 696, "a182": 874, "a201": 874, "a183": 760, "a184": 946, "a197": 771, "a185": 865, "a194": 771, "a198": 888, "a186": 967, "a195": 888, "a187": 831, "a188": 873, "a189": 927, "a190": 970, "a191": 918}, }, }
CoreFontMetrics represents font metrics for the Adobe standard type 1 core fonts.
var DeadlineExceeded error = deadlineExceededError{}
DeadlineExceeded is the error returned by [ContextContext.Err] when the context is canceled due to its deadline passing.
var DestinationTypeStrings = map[DestinationType]string{ DestXYZ: "XYZ", DestFit: "Fit", DestFitH: "FitH", DestFitV: "FitV", DestFitR: "FitR", DestFitB: "FitB", DestFitBH: "FitBH", DestFitBV: "FitBV", }
DestinationTypeStrings manages string representations for destination
var ErrBookmarksRepair = errors.New("pdfcpu: bookmarks repair failed")
var (
ErrCorruptFontDict = errors.New("pdfcpu: corrupt fontDict")
)
var ErrInvalidColor = errors.New("pdfcpu: invalid color constant")
var ErrInvalidUTF16BE = errors.New("pdfcpu: invalid UTF-16BE detected")
ErrInvalidUTF16BE represents an error that gets raised for invalid UTF-16BE byte sequences.
var ErrNoContent = errors.New("pdfcpu: page without content")
var ErrUnknownEncryption = errors.New("pdfcpu: unknown encryption")
var ErrUnsupportedFilter = errors.New("pdfcpu: filter not supported")
ErrUnsupportedFilter signals unsupported filter encountered.
var PaperSize = map[string]*Dim{}/* 150 elements not displayed */
PaperSize is a map of known paper sizes in user units (=72 dpi pixels).
var SignatureReasonStrings = map[SignatureReason]string{ SignatureReasonUnknown: "no reason", SignatureReasonDocNotModified: "document has not been modified", SignatureReasonDocModified: "document has been modified", SignatureReasonSignatureForged: "signer's signature is not authentic", SignatureReasonTimestampTokenInvalid: "timestamp token is invalid", SignatureReasonCertInvalid: "signer's certificate is invalid", SignatureReasonCertNotTrusted: "signer's certificate chain is not in the trusted list of Root CAs", SignatureReasonCertExpired: "signer's certificate or one of its parent certificates has expired", SignatureReasonCertRevoked: "signer's certificate or one of its parent certificates has been revoked", SignatureReasonInternal: "internal error", SignatureReasonSelfSignedCertErr: "signer's self signed certificate is not trusted", }
SignatureReasonStrings manages string representations for signature reasons.
var SignatureStatusStrings = map[SignatureStatus]string{ SignatureStatusUnknown: "validity of the signature is unknown", SignatureStatusValid: "signature is valid", SignatureStatusInvalid: "signature is invalid", }
SignatureStatusStrings manages string representations for signature statuses.
var UserFontDir string
UserFontDir is the location for installed TTF or OTF font files.
var VersionStr = "v0.11.0 dev"
VersionStr is the current pdfcpu version.
Functions ¶
func AfterFunc ¶
func AfterFunc(ctx ContextContext, f func()) (stop func() bool)
AfterFunc arranges to call f in its own goroutine after ctx is canceled. If ctx is already canceled, AfterFunc calls f immediately in its own goroutine.
Multiple calls to AfterFunc on a context operate independently; one does not replace another.
Calling the returned stop function stops the association of ctx with f. It returns true if the call stopped f from being run. If stop returns false, either the context is canceled and f has been started in its own goroutine; or f was already stopped. The stop function does not wait for f to complete before returning. If the caller needs to know whether f is completed, it must coordinate with f explicitly.
If ctx has a "AfterFunc(func()) func() bool" method, AfterFunc will use it to schedule the call.
func AnchorPosition ¶
func BestFitRectIntoRect ¶
func ByteForOctalString ¶
Convert a 1,2 or 3 digit unescaped octal string into the corresponding byte value.
func CJKEncoding ¶
CJKEncodings returns true for supported encodings.
func CP1252ToUTF8 ¶
CP1252ToUTF8 converts CP1252 to UTF-8. Unused
func CSVSafeString ¶
func Cause ¶
func Cause(c ContextContext) error
Cause returns a non-nil error explaining why c was canceled. The first cancellation of c or one of its parents sets the cause. If that cancellation happened via a call to CancelCauseFunc(err), then Cause returns err. Otherwise Cause(c) returns the same value as c.Err(). Cause returns nil if c has not been canceled yet.
func CheckConfigVersion ¶
func CheckConfigVersion(v string)
CheckConfigVersion prints a warning if the configuration is outdated.
func CoreWriteContext ¶
WriteContext generates a PDF file for the cross reference table contained in Context.
func DateString ¶
DateString returns a string representation of t.
func DecodeName ¶
DecodeName applies name decoding according to PDF spec.
func DecodeUTF16String ¶
DecodeUTF16String decodes a UTF16BE string from a hex string.
func DetectKeywordsWithContext ¶
func DetectKeywordsWithContext(c ContextContext, line string) (endInd int, streamInd int, err error)
func EncodeName ¶
EncodeName applies name encoding according to PDF spec.
func EncodeUTF16String ¶
func EqualFontDicts ¶
EqualFontDicts returns true, if two font dicts are equal.
func EqualObjects ¶
EqualObjects returns true if two objects are equal in the context of given xrefTable. Some object and an indirect reference to it are treated as equal. Objects may in fact be object trees.
func EqualSlices ¶
func EqualStreamDicts ¶
func EqualStreamDicts(sd1, sd2 *StreamDict, xRefTable *XRefTable) (bool, error)
EqualStreamDicts returns true if two stream dicts are equal and contain the same bytes.
func EscapedUTF16String ¶
func FreeTextIntentName ¶
func FreeTextIntentName(fti FreeTextIntent) string
func HexLiteralToString ¶
func HexLiteralToString(hl HexLiteral) (string, error)
HexLiteralToString returns a possibly UTF16 encoded string for a hex string.
func IndRefMemberOf ¶
func IndRefMemberOf(i IndirectRef, arr Array) bool
IntMemberOf returns true if list contains i.
func IntMemberOf ¶
IntMemberOf returns true if list contains i.
func IsCoreFont ¶
IsCoreFont returns true for the 14 PDF standard Type 1 fonts.
func IsStringUTF16BE ¶
IsStringUTF16BE checks a string for Big Endian byte order BOM.
func LineEndingStyleName ¶
func LineEndingStyleName(les LineEndingStyle) string
func LineIntentName ¶
func LineIntentName(li LineIntent) string
func Lines ¶
Lines is a split function for a Scanner that returns each line of text, stripped of any trailing end-of-line marker. The returned line may be empty. The end-of-line marker is one carriage return followed by one newline or one carriage return or one newline. The last non-empty line of input will be returned even if it has no newline.
func ModelRemoveKeywords ¶
func NormalizeCoord ¶
NormalizeCoord transfers P(x,y) from pdfcpu user space into PDF user space, which uses a coordinate system with origin in the lower left corner of r.
pdfcpu user space coordinate systems have the origin in one of four corners of r:
LowerLeft corner (default = PDF user space)
x extends to the right, y extends upward
LowerRight corner:
x extends to the left, y extends upward
UpperLeft corner:
x extends to the right, y extends downward
UpperRight corner:
x extends to the left, y extends downward
func NormalizeOffset ¶
Normalize offset transfers x and y into offsets in the PDF user space.
func Optimize ¶
func Optimize(input []byte, conf *Configuration) ([]byte, error)
Optimize optimizes a PDF represented as a byte slice and returns the optimized byte slice.
func OptimizeXRefTable ¶
OptimizeXRefTable optimizes an xRefTable by locating and getting rid of redundant embedded fonts and images.
func ParseObjectAttributes ¶
ParseObjectAttributes parses object number and generation of the next object for given string buffer.
func Permissions ¶
Permissions returns a list of set permissions.
func PermissionsList ¶
PermissionsList returns a list of set permissions.
func PolyLineIntentName ¶
func PolyLineIntentName(pi PolyLineIntent) string
func PolygonIntentName ¶
func PolygonIntentName(pi PolygonIntent) string
func ProcessRefCounts ¶
func ReadFont ¶
Read reads in the font file bytes from gob Note: For WASM compatibility, this function is disabled. Font operations are not supported in WASM mode.
func RemoveControlChars ¶
func ScriptForEncoding ¶
func StringLiteralToString ¶
func StringLiteralToString(sl StringLiteral) (string, error)
StringLiteralToString returns the best possible string rep for a string literal.
func StringOrHexLiteral ¶
func SupportedScript ¶
func SupportsDecodeParms ¶
func ToUserSpace ¶
func ToUserSpace(f float64, unit DisplayUnit) float64
func UTF8ToCP1252 ¶
UTF8ToCP1252 converts UTF-8 to CP1252. Unused
func UpdateUserfont ¶
func UpdateUserfont(xRefTable *XRefTable, fontName string, f FontResource) error
UpdateUserfont updates the fontdict for fontName via supplied font resource.
func WithCancel ¶
func WithCancel(parent ContextContext) (ctx ContextContext, cancel CancelFunc)
WithCancel returns a derived context that points to the parent context but has a new Done channel. The returned context's Done channel is closed when the returned cancel function is called or when the parent context's Done channel is closed, whichever happens first.
Canceling this context releases resources associated with it, so code should call cancel as soon as the operations running in this ContextContext complete.
func WithCancelCause ¶
func WithCancelCause(parent ContextContext) (ctx ContextContext, cancel CancelCauseFunc)
WithCancelCause behaves like WithCancel but returns a CancelCauseFunc instead of a CancelFunc. Calling cancel with a non-nil error (the "cause") records that error in ctx; it can then be retrieved using Cause(ctx). Calling cancel with nil sets the cause to Canceled.
Example use:
ctx, cancel := context.WithCancelCause(parent) cancel(myError) ctx.Err() // returns context.Canceled context.Cause(ctx) // returns myError
func WithDeadline ¶
func WithDeadline(parent ContextContext, d time.Time) (ContextContext, CancelFunc)
WithDeadline returns a derived context that points to the parent context but has the deadline adjusted to be no later than d. If the parent's deadline is already earlier than d, WithDeadline(parent, d) is semantically equivalent to parent. The returned [ContextContext.Done] channel is closed when the deadline expires, when the returned cancel function is called, or when the parent context's Done channel is closed, whichever happens first.
Canceling this context releases resources associated with it, so code should call cancel as soon as the operations running in this ContextContext complete.
func WithDeadlineCause ¶
func WithDeadlineCause(parent ContextContext, d time.Time, cause error) (ContextContext, CancelFunc)
WithDeadlineCause behaves like WithDeadline but also sets the cause of the returned ContextContext when the deadline is exceeded. The returned CancelFunc does not set the cause.
func WithTimeout ¶
func WithTimeout(parent ContextContext, timeout time.Duration) (ContextContext, CancelFunc)
WithTimeout returns WithDeadline(parent, time.Now().Add(timeout)).
Canceling this context releases resources associated with it, so code should call cancel as soon as the operations running in this ContextContext complete:
func slowOperationWithTimeout(ctx context.ContextContext) (Result, error) {
ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond)
defer cancel() // releases resources if slowOperation completes before timeout elapses
return slowOperation(ctx)
}
func WithTimeoutCause ¶
func WithTimeoutCause(parent ContextContext, timeout time.Duration, cause error) (ContextContext, CancelFunc)
WithTimeoutCause behaves like WithTimeout but also sets the cause of the returned ContextContext when the timeout expires. The returned CancelFunc does not set the cause.
func XRefTableValidation ¶
XRefTable validates a PDF cross reference table obeying the validation mode.
Types ¶
type Alt ¶
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 Anchor ¶
type Anchor int
Anchor represents symbolic positions within a rectangular region.
const ( TopLeft Anchor = iota TopCenter TopRight Left Center // default Right BottomLeft BottomCenter BottomRight Full // special case, no anchor needed, imageSize = pageSize )
These are the defined anchors for relative positioning.
func ParseAnchor ¶
func ParsePositionAnchor ¶
type Annot ¶
type Annot struct {
IndRefs *[]IndirectRef
Map AnnotMap
}
type AnnotMap ¶
type AnnotMap map[int]AnnotationRenderer
AnnotMap represents annotations by object number of the corresponding annotation dict.
type AnnotationFlags ¶
type AnnotationFlags int
AnnotationFlags represents the PDF annotation flags.
const ( AnnInvisible AnnotationFlags = 1 << iota AnnHidden AnnPrint AnnNoZoom AnnNoRotate AnnNoView AnnReadOnly AnnLocked AnnToggleNoView AnnLockedContents )
type AnnotationInterface ¶
type AnnotationInterface struct {
SubType AnnotationType // The type of annotation that this dictionary describes.
CustomSubType string // Out of spec annot type.
Rect Rectangle // The annotation rectangle, defining the location of the annotation on the page in default user space units.
APObjNr int // The objNr of the appearance stream dict.
Contents string // Text that shall be displayed for the annotation.
NM string // (Since V1.4) The annotation name, a text string uniquely identifying it among all the annotations on its page.
ModificationDate string // M - The date and time when the annotation was most recently modified.
P *IndirectRef // An indirect reference to the page object with which this annotation is associated.
F AnnotationFlags // A set of flags specifying various characteristics of the annotation.
C *SimpleColor // The background color of the annotation’s icon when closed, pop up title bar color, link ann border
BorderRadX float64 // Border radius X
BorderRadY float64 // Border radius Y
BorderWidth float64 // Border width
Hash uint32
}
AnnotationInterface represents a PDF annotation.
func NewAnnotation ¶
func NewAnnotation( typ AnnotationType, customTyp string, rect Rectangle, apObjNr int, contents, id string, modDate string, f AnnotationFlags, col *SimpleColor, borderRadX float64, borderRadY float64, borderWidth float64, ) AnnotationInterface
NewAnnotation returns a new annotation.
func NewAnnotationForRawType ¶
func NewAnnotationForRawType( typ string, rect Rectangle, apObjNr int, contents, id string, modDate string, f AnnotationFlags, col *SimpleColor, borderRadX float64, borderRadY float64, borderWidth float64, ) AnnotationInterface
NewAnnotationForRawType returns a new annotation of a specific type.
func (AnnotationInterface) APObjNrInt ¶
func (ann AnnotationInterface) APObjNrInt() int
func (AnnotationInterface) ContentString ¶
func (ann AnnotationInterface) ContentString() string
ContentString returns a string representation of ann's contents.
func (AnnotationInterface) CustomTypeString ¶
func (ann AnnotationInterface) CustomTypeString() string
ContentString returns a string representation of ann's contents.
func (AnnotationInterface) HashString ¶
func (ann AnnotationInterface) HashString() uint32
HashString returns the annotation hash.
func (AnnotationInterface) ID ¶
func (ann AnnotationInterface) ID() string
ID returns the annotation id.
func (AnnotationInterface) RectString ¶
func (ann AnnotationInterface) RectString() string
RectString returns ann's positioning rectangle.
func (AnnotationInterface) RenderDict ¶
func (ann AnnotationInterface) RenderDict(xRefTable *XRefTable, pageIndRef *IndirectRef) (Dict, error)
func (AnnotationInterface) Type ¶
func (ann AnnotationInterface) Type() AnnotationType
Type returns ann's type.
func (AnnotationInterface) TypeString ¶
func (ann AnnotationInterface) TypeString() string
TypeString returns a string representation of ann's type.
type AnnotationRenderer ¶
type AnnotationRenderer interface {
RenderDict(xRefTable *XRefTable, pageIndRef *IndirectRef) (Dict, error)
Type() AnnotationType
RectString() string
APObjNrInt() int
ID() string
ContentString() string
CustomTypeString() string
}
AnnotationRenderer is the interface for PDF annotations.
func Annotation ¶
func Annotation(xRefTable *XRefTable, d Dict) (AnnotationRenderer, error)
Annotation returns an annotation renderer. Validation sets up a cache of annotation renderers.
type AnnotationType ¶
type AnnotationType int
AnnotationType represents the various PDF annotation
const ( AnnText AnnotationType = iota AnnLink AnnFreeText AnnLine AnnSquare AnnCircle AnnPolygon AnnPolyLine AnnHighLight AnnUnderline AnnSquiggly AnnStrikeOut AnnStamp AnnCaret AnnInk AnnPopup AnnFileAttachment AnnSound AnnMovie AnnWidget AnnScreen AnnPrinterMark AnnTrapNet AnnWatermark Ann3D AnnRedact AnnCustom )
type Array ¶
type Array []Object
Array represents a PDF array object.
func NewHexLiteralArray ¶
NewHexLiteralArray returns a PDFArray with HexLiteralLiteral entries.
func NewIntegerArray ¶
NewIntegerArray returns a PDFArray with Integer entries.
func NewNameArray ¶
NewNameArray returns a PDFArray with Name entries.
func NewNumberArray ¶
NewNumberArray returns a PDFArray with Float entries.
func NewStringLiteralArray ¶
NewStringLiteralArray returns a PDFArray with StringLiteral entries.
type Boolean ¶
type Boolean bool
Boolean represents a PDF boolean object.
type BorderStyle ¶
type BorderStyle int
BorderStyle (see table 168)
const ( BSSolid BorderStyle = iota BSDashed BSBeveled BSInset BSUnderline )
type Box ¶
type Box struct {
Rect *Rectangle `json:"rect"` // Rectangle in user space.
Inherited bool `json:"-"` // Media box and Crop box may be inherited.
RefBox string `json:"-"` // Use position of another box,
// Margins to parent box in points.
// Relative to parent box if 0 < x < 0.5
MLeft, MRight float64 `json:"-"`
MTop, MBot float64 `json:"-"`
// Relative position within parent box
Dim *Dim `json:"-"` // dimensions
Pos Anchor `json:"-"` // position anchor within parent box, one of tl,tc,tr,l,c,r,bl,bc,br.
Dx, Dy int `json:"-"` // anchor offset
}
type CancelCauseFunc ¶
type CancelCauseFunc func(cause error)
A CancelCauseFunc behaves like a CancelFunc but additionally sets the cancellation cause. This cause can be retrieved by calling Cause on the canceled ContextContext or on any of its derived Contexts.
If the context has already been canceled, CancelCauseFunc does not set the cause. For example, if childContext is derived from parentContext:
- if parentContext is canceled with cause1 before childContext is canceled with cause2, then Cause(parentContext) == Cause(childContext) == cause1
- if childContext is canceled with cause2 before parentContext is canceled with cause1, then Cause(parentContext) == cause1 and Cause(childContext) == cause2
type CancelFunc ¶
type CancelFunc func()
A CancelFunc tells an operation to abandon its work. A CancelFunc does not wait for the work to stop. A CancelFunc may be called by multiple goroutines simultaneously. After the first call, subsequent calls to a CancelFunc do nothing.
type CaretAnnotation ¶
type CaretAnnotation struct {
MarkupAnnotation
RD *Rectangle // A set of four numbers that shall describe the numerical differences between two rectangles: the Rect entry of the annotation and the actual boundaries of the underlying caret.
Paragraph bool // A new paragraph symbol (¶) shall be associated with the caret.
}
func NewCaretAnnotation ¶
func NewCaretAnnotation( rect Rectangle, apObjNr int, contents, id string, modDate string, f AnnotationFlags, col *SimpleColor, borderRadX float64, borderRadY float64, borderWidth float64, title string, popupIndRef *IndirectRef, ca *float64, rc, subject string, rd *Rectangle, paragraph bool, ) CaretAnnotation
func (CaretAnnotation) RenderDict ¶
func (ann CaretAnnotation) RenderDict(xRefTable *XRefTable, pageIndRef *IndirectRef) (Dict, error)
type CertificateDetails ¶
type CertificateDetails struct {
Leaf bool
SelfSigned bool
Subject string
Issuer string
SerialNumber string
ValidFrom time.Time
ValidThru time.Time
Expired bool
Qualified bool
CA bool
Usage string
Version int
SignAlg string
KeySize int
Revocation RevocationDetails
Trust TrustDetails
IssuerCertificate *CertificateDetails
}
func (CertificateDetails) String ¶
func (cd CertificateDetails) String() string
type CircleAnnotation ¶
type CircleAnnotation struct {
MarkupAnnotation
FillCol *SimpleColor
Margins Array
BorderWidth float64
BorderStyle BorderStyle
CloudyBorder bool
CloudyBorderIntensity int // 0,1,2
}
CircleAnnotation represents a square annotation.
func NewCircleAnnotation ¶
func NewCircleAnnotation( rect Rectangle, apObjNr int, contents, id string, modDate string, f AnnotationFlags, col *SimpleColor, title string, popupIndRef *IndirectRef, ca *float64, rc, subject string, fillCol *SimpleColor, MLeft, MTop, MRight, MBot float64, borderWidth float64, borderStyle BorderStyle, cloudyBorder bool, cloudyBorderIntensity int, ) CircleAnnotation
NewCircleAnnotation returns a new circle annotation.
func (CircleAnnotation) RenderDict ¶
func (ann CircleAnnotation) RenderDict(xRefTable *XRefTable, pageIndRef *IndirectRef) (Dict, error)
RenderDict renders ann into a page annotation dict.
type CommandMode ¶
type CommandMode int
CommandMode specifies the operation being executed.
const ( VALIDATE CommandMode = iota LISTINFO OPTIMIZE SPLIT SPLITBYPAGENR MERGECREATE MERGECREATEZIP MERGEAPPEND EXTRACTIMAGES EXTRACTFONTS EXTRACTPAGES EXTRACTCONTENT EXTRACTMETADATA TRIM LISTATTACHMENTS EXTRACTATTACHMENTS ADDATTACHMENTS ADDATTACHMENTSPORTFOLIO REMOVEATTACHMENTS LISTPERMISSIONS SETPERMISSIONS ADDWATERMARKS REMOVEWATERMARKS IMPORTIMAGES INSERTPAGESBEFORE INSERTPAGESAFTER REMOVEPAGES LISTKEYWORDS ADDKEYWORDS REMOVEKEYWORDS LISTPROPERTIES ADDPROPERTIES REMOVEPROPERTIES COLLECT CROP LISTBOXES ADDBOXES REMOVEBOXES LISTANNOTATIONS ADDANNOTATIONS REMOVEANNOTATIONS ROTATE NUP BOOKLET LISTBOOKMARKS ADDBOOKMARKS REMOVEBOOKMARKS IMPORTBOOKMARKS EXPORTBOOKMARKS LISTIMAGES UPDATEIMAGES CREATE DUMP LISTFORMFIELDS REMOVEFORMFIELDS LOCKFORMFIELDS UNLOCKFORMFIELDS RESETFORMFIELDS EXPORTFORMFIELDS FILLFORMFIELDS MULTIFILLFORMFIELDS ENCRYPT DECRYPT CHANGEUPW CHANGEOPW CHEATSHEETSFONTS INSTALLFONTS LISTFONTS RESIZE POSTER NDOWN CUT LISTPAGELAYOUT SETPAGELAYOUT RESETPAGELAYOUT LISTPAGEMODE SETPAGEMODE RESETPAGEMODE LISTVIEWERPREFERENCES SETVIEWERPREFERENCES RESETVIEWERPREFERENCES ZOOM ADDSIGNATURE VALIDATESIGNATURE LISTCERTIFICATES INSPECTCERTIFICATES IMPORTCERTIFICATES VALIDATESIGNATURES )
The available commands.
type Configuration ¶
type Configuration struct {
// Location of corresponding config.yml
Path string
CreationDate string
Version string
// Check filename extensions.
CheckFileNameExt bool
// Enables PDF V1.5 compatible processing of object streams, xref streams, hybrid PDF files.
Reader15 bool
// Enables decoding of all streams (fontfiles, images..) for logging purposes.
DecodeAllStreams bool
// Validate against ISO-32000: strict or relaxed.
ValidationMode int
// Enable validation right before writing.
PostProcessValidate bool
// Check for broken links in LinkedAnnotations/URIActions.
ValidateLinks bool
// End of line char sequence for writing.
Eol string
// Turns on object stream generation.
// A signal for compressing any new non-stream-object into an object stream.
// true enforces WriteXRefStream to true.
// false does not prevent xRefStream generation.
WriteObjectStream bool
// Switches between xRefSection (<=V1.4) and objectStream/xRefStream (>=V1.5) writing.
WriteXRefStream bool
// Turns on stats collection.
// TODO Decision - unused.
CollectStats bool
// A CSV-filename holding the statistics.
StatsFileName string
// Supplied user password.
UserPW string
UserPWNew *string
// Supplied owner password.
OwnerPW string
OwnerPWNew *string
// EncryptUsingAES ensures AES encryption.
// true: AES encryption
// false: RC4 encryption.
EncryptUsingAES bool
// AES:40,128,256 RC4:40,128
EncryptKeyLength int
// Supplied user access permissions, see Table 22.
Permissions PermissionFlags // int16
// Command being executed.
Cmd CommandMode
// Display unit in effect.
Unit DisplayUnit
// Timestamp format.
TimestampFormat string
// Date format.
DateFormat string
// Optimize after reading and validating the xreftable but before processing.
Optimize bool
// Optimize after processing but before writing.
// TODO add to config.yml
OptimizeBeforeWriting bool
// Optimize page resources via content stream analysis. (assuming Optimize == true || OptimizeBeforeWriting == true)
OptimizeResourceDicts bool
// Optimize duplicate content streams across pages. (assuming Optimize == true || OptimizeBeforeWriting == true)
OptimizeDuplicateContentStreams bool
// Merge creates bookmarks.
CreateBookmarks bool
// PDF Viewer is expected to supply appearance streams for form fields.
NeedAppearances bool
// Internet availability.
Offline bool
// HTTP timeout in seconds.
Timeout int
// Http timeout in seconds for CRL revocation checking.
TimeoutCRL int
// Http timeout in seconds for OCSP revocation checking.
TimeoutOCSP int
// Preferred certificate revocation checking mechanism: CRL, OSCP
PreferredCertRevocationChecker int
}
Configuration of a ContextContext.
func NewAESConfiguration ¶
func NewAESConfiguration(userPW, ownerPW string, keyLength int) *Configuration
NewAESConfiguration returns a default configuration for AES encryption.
func NewDefaultConfiguration ¶
func NewDefaultConfiguration() *Configuration
NewDefaultConfiguration returns the default pdfcpu configuration.
func NewRC4Configuration ¶
func NewRC4Configuration(userPW, ownerPW string, keyLength int) *Configuration
NewRC4Configuration returns a default configuration for RC4 encryption.
func (*Configuration) ApplyReducedFeatureSet ¶
func (c *Configuration) ApplyReducedFeatureSet() bool
ApplyReducedFeatureSet returns true if complex entries like annotations shall not be written.
func (*Configuration) EolString ¶
func (c *Configuration) EolString() string
EolString returns a string rep for the eol in effect.
func (*Configuration) PreferredCertRevocationCheckerString ¶
func (c *Configuration) PreferredCertRevocationCheckerString() string
PreferredCertRevocationCheckerString returns a string rep for the preferred certificate revocation checker in effect.
func (*Configuration) SetUnit ¶
func (c *Configuration) SetUnit(s string)
SetUnit configures the display unit.
func (*Configuration) UnitString ¶
func (c *Configuration) UnitString() string
UnitString returns a string rep for the display unit in effect.
func (*Configuration) ValidationModeString ¶
func (c *Configuration) ValidationModeString() string
ValidationModeString returns a string rep for the validation mode in effect.
type Context ¶
type Context struct {
*Configuration
*XRefTable
Read *ReadContextType
Optimize *OptimizationContext
Write *WriteContext
WritingPages bool // true, when writing page dicts.
Dest bool // true when writing a destination within a page.
}
func NewContext ¶
func NewContext(rs io.ReadSeeker, conf *Configuration) (*Context, error)
NewContext initializes a new Context.
func Read ¶
func Read(rs io.ReadSeeker, conf *Configuration) (*Context, error)
func ReadAndValidate ¶
func ReadAndValidate(rs io.ReadSeeker, conf *Configuration) (ctx *Context, err error)
ReadAndValidate returns a Context of rs ready for processing.
func ReadContext ¶
func ReadContext(rs io.ReadSeeker, conf *Configuration) (*Context, error)
ReadContext uses an io.ReadSeeker to build an internal structure holding its cross reference table aka the ContextContext.
func ReadValidateAndOptimize ¶
func ReadValidateAndOptimize(rs io.ReadSeeker, conf *Configuration) (ctx *Context, err error)
func ReadWithContext ¶
func ReadWithContext(c ContextContext, rs io.ReadSeeker, conf *Configuration) (*Context, error)
Read takes a readSeeker and generates a PDF model context, an in-memory representation containing a cross reference table. If the passed Go context is cancelled, reading will be interrupted.
func (*Context) AddPageBoundaries ¶
func (ctx *Context) AddPageBoundaries(selectedPages IntSet, pb *PageBoundaries) error
AddPageBoundaries adds page boundaries specified by pb for selected pages.
func (*Context) ListPageBoundaries ¶
func (ctx *Context) ListPageBoundaries(selectedPages IntSet, wantPB *PageBoundaries) ([]string, error)
ListPageBoundaries lists page boundaries specified in wantPB for selected pages.
func (*Context) RemovePageBoundaries ¶
func (ctx *Context) RemovePageBoundaries(selectedPages IntSet, pb *PageBoundaries) error
RemovePageBoundaries removes page boundaries specified by pb for selected pages. The media box is mandatory (inherited or not) and can't be removed. A removed crop box defaults to the media box. Removed trim/bleed/art boxes default to the crop box.
type ContextContext ¶
type ContextContext interface {
// Deadline returns the time when work done on behalf of this context
// should be canceled. Deadline returns ok==false when no deadline is
// set. Successive calls to Deadline return the same results.
Deadline() (deadline time.Time, ok bool)
// Done returns a channel that's closed when work done on behalf of this
// context should be canceled. Done may return nil if this context can
// never be canceled. Successive calls to Done return the same value.
// The close of the Done channel may happen asynchronously,
// after the cancel function returns.
//
// WithCancel arranges for Done to be closed when cancel is called;
// WithDeadline arranges for Done to be closed when the deadline
// expires; WithTimeout arranges for Done to be closed when the timeout
// elapses.
//
// Done is provided for use in select statements:
//
// // Stream generates values with DoSomething and sends them to out
// // until DoSomething returns an error or ctx.Done is closed.
// func Stream(ctx context.ContextContext, out chan<- Value) error {
// for {
// v, err := DoSomething(ctx)
// if err != nil {
// return err
// }
// select {
// case <-ctx.Done():
// return ctx.Err()
// case out <- v:
// }
// }
// }
//
// See https://blog.golang.org/pipelines for more examples of how to use
// a Done channel for cancellation.
Done() <-chan struct{}
// If Done is not yet closed, Err returns nil.
// If Done is closed, Err returns a non-nil error explaining why:
// DeadlineExceeded if the context's deadline passed,
// or Canceled if the context was canceled for some other reason.
// After Err returns a non-nil error, successive calls to Err return the same error.
Err() error
// Value returns the value associated with this context for key, or nil
// if no value is associated with key. Successive calls to Value with
// the same key returns the same result.
//
// Use context values only for request-scoped data that transits
// processes and API boundaries, not for passing optional parameters to
// functions.
//
// A key identifies a specific value in a ContextContext. Functions that wish
// to store values in ContextContext typically allocate a key in a global
// variable then use that key as the argument to context.WithValue and
// ContextContext.Value. A key can be any type that supports equality;
// packages should define keys as an unexported type to avoid
// collisions.
//
// Packages that define a ContextContext key should provide type-safe accessors
// for the values stored using that key:
//
// // Package user defines a User type that's stored in Contexts.
// package user
//
// import "context"
//
// // User is the type of value stored in the Contexts.
// type User struct {...}
//
// // key is an unexported type for keys defined in this package.
// // This prevents collisions with keys defined in other packages.
// type key int
//
// // userKey is the key for user.User values in Contexts. It is
// // unexported; clients use user.NewContext and user.FromContext
// // instead of using this key directly.
// var userKey key
//
// // NewContext returns a new ContextContext that carries value u.
// func NewContext(ctx context.ContextContext, u *User) context.ContextContext {
// return context.WithValue(ctx, userKey, u)
// }
//
// // FromContext returns the User value stored in ctx, if any.
// func FromContext(ctx context.ContextContext) (*User, bool) {
// u, ok := ctx.Value(userKey).(*User)
// return u, ok
// }
Value(key any) any
}
A ContextContext carries a deadline, a cancellation signal, and other values across API boundaries.
ContextContext's methods may be called by multiple goroutines simultaneously.
func Background ¶
func Background() ContextContext
Background returns a non-nil, empty ContextContext. It is never canceled, has no values, and has no deadline. It is typically used by the main function, initialization, and tests, and as the top-level ContextContext for incoming requests.
func TODO ¶
func TODO() ContextContext
TODO returns a non-nil, empty ContextContext. Code should use context.TODO when it's unclear which ContextContext to use or it is not yet available (because the surrounding function has not yet been extended to accept a ContextContext parameter).
func WithValue ¶
func WithValue(parent ContextContext, key, val any) ContextContext
WithValue returns a derived context that points to the parent ContextContext. In the derived context, the value associated with key is val.
Use context Values only for request-scoped data that transits processes and APIs, not for passing optional parameters to functions.
The provided key must be comparable and should not be of type string or any other built-in type to avoid collisions between packages using context. Users of WithValue should define their own types for keys. To avoid allocating when assigning to an interface{}, context keys often have concrete type struct{}. Alternatively, exported context key variables' static type should be a pointer or interface.
func WithoutCancel ¶
func WithoutCancel(parent ContextContext) ContextContext
WithoutCancel returns a derived context that points to the parent context and is not canceled when parent is canceled. The returned context returns no Deadline or Err, and its Done channel is nil. Calling Cause on the returned context returns nil.
type Creator ¶
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 DecodeLazyObjectStreamObjectFunc ¶
type DecodeLazyObjectStreamObjectFunc func(c ContextContext, s string) (Object, error)
type Desc ¶
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 ¶
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 Destination ¶
type Destination struct {
Typ DestinationType
PageNr int
Left, Bottom, Right, Top int
Zoom float32
}
Destination represents a PDF destination.
func (Destination) Array ¶
func (dest Destination) Array(indRef IndirectRef) Array
func (Destination) Name ¶
func (dest Destination) Name() NameType
func (Destination) String ¶
func (dest Destination) String() string
type DestinationType ¶
type DestinationType int
DestinationType represents the various PDF destination
const ( DestXYZ DestinationType = iota // [page /XYZ left top zoom] DestFit // [page /Fit] DestFitH // [page /FitH top] DestFitV // [page /FitV left] DestFitR // [page /FitR left bottom right top] DestFitB // [page /FitB] DestFitBH // [page /FitBH top] DestFitBV // [page /FitBV left] )
See table 151
type Dict ¶
Dict represents a PDF dict object.
func FontDescriptor ¶
FontDescriptor gets the font descriptor for this
func FontResources ¶
FontResources returns a font resource dict for a font map.
func (Dict) ArrayEntry ¶
ArrayEntry expects and returns a Array entry for given key.
func (Dict) BooleanEntry ¶
BooleanEntry expects and returns a BooleanEntry for given key.
func (Dict) HexLiteralEntry ¶
func (d Dict) HexLiteralEntry(key string) *HexLiteral
HexLiteralEntry returns a HexLiteral object for given key.
func (*Dict) IncrementBy ¶
IncrementBy increments the integer value for given key by i.
func (Dict) IndirectRefEntry ¶
func (d Dict) IndirectRefEntry(key string) *IndirectRef
IndirectRefEntry returns an indirectRefEntry for given key for this dictionary.
func (Dict) InsertBool ¶
InsertBool adds a new bool entry to this PDFDict.
func (Dict) InsertFloat ¶
InsertFloat adds a new float entry to this PDFDict.
func (Dict) InsertName ¶
InsertName adds a new name entry to this PDFDict.
func (Dict) InsertString ¶
InsertString adds a new string entry to this PDFDict.
func (Dict) Int64Entry ¶
Int64Entry expects and returns a Integer entry representing an int64 value for given key.
func (Dict) IsLinearizationParmDict ¶
IsLinearizationParmDict returns true if this dict has an int entry for key "Linearized".
func (Dict) Length ¶
Length returns a *int64 for entry with key "Length". Stream length may be referring to an indirect object.
func (Dict) NewIDForPrefix ¶
NewIDForPrefix returns next id with prefix.
func (Dict) PDFString ¶
PDFString returns a string representation as found in and written to a PDF file.
func (Dict) StreamDictEntry ¶
func (d Dict) StreamDictEntry(key string) *StreamDict
StreamDictEntry expects and returns a StreamDict entry for given key. unused.
func (Dict) StringEntry ¶
StringEntry expects and returns a StringLiteral entry for given key.
func (Dict) StringEntryBytes ¶
StringEntryBytes returns the byte slice representing the string value for key.
func (Dict) StringLiteralEntry ¶
func (d Dict) StringLiteralEntry(key string) *StringLiteral
StringLiteralEntry returns a StringLiteral object for given key.
func (Dict) StringOrHexLiteralEntry ¶
type Dim ¶
Dim represents the dimensions of a rectangular view medium like a PDF page, a sheet of paper or an image grid in user space, inches, centimetres or millimetres.
func (Dim) AspectRatio ¶
AspectRatio returns the relation between width and height.
func (Dim) ConvertToUnit ¶
func (d Dim) ConvertToUnit(unit DisplayUnit) Dim
ConvertToUnit converts d to unit.
func (Dim) ToCentimetres ¶
ToCentimetres converts d to centimetres.
func (Dim) ToMillimetres ¶
ToMillimetres converts d to millimetres.
type DisplayUnit ¶
type DisplayUnit int
DisplayUnit is the metric unit used to output paper sizes.
const ( POINTS DisplayUnit = iota INCHES CENTIMETRES MILLIMETRES )
Options for display unit in effect.
type DuplicateImageObject ¶
type DuplicateImageObject struct {
ImageDict *StreamDict
NewObjNr int
}
DuplicateImageObject represents a redundant image.
type Enc ¶
type Enc struct {
O, U []byte
OE, UE []byte
Perms []byte
L, P, R, V int
Emd bool // encrypt meta data
ID []byte
}
Enc wraps around all defined encryption attributes.
type Filter ¶
type Filter interface {
Encode(r io.Reader) (io.Reader, error)
Decode(r io.Reader) (io.Reader, error)
// DecodeLength will decode at least maxLen bytes. For filters where decoding
// parts doesn't make sense (e.g. DCT), the whole stream is decoded.
// If maxLen < 0 is passed, the whole stream is decoded.
DecodeLength(r io.Reader, maxLen int64) (io.Reader, error)
}
Filter defines an interface for encoding/decoding PDF object streams.
type Float ¶
type Float float64
Float represents a PDF float object.
type FontObject ¶
type FontObject struct {
ResourceNames []string
Prefix string
FontName string
FontDict Dict
Data []byte
Extension string
Embedded bool
}
FontObject represents a font used in a PDF file.
func (*FontObject) AddResourceName ¶
func (fo *FontObject) AddResourceName(resourceName string)
AddResourceName adds a resourceName referring to this font.
func (FontObject) Encoding ¶
func (fo FontObject) Encoding() string
Encoding returns the Encoding of this font.
func (FontObject) ResourceNamesString ¶
func (fo FontObject) ResourceNamesString() string
ResourceNamesString returns a string representation of all the resource names of this font.
func (FontObject) String ¶
func (fo FontObject) String() string
func (FontObject) SubType ¶
func (fo FontObject) SubType() string
SubType returns the SubType of this font.
type FontResource ¶
type FontResource struct {
Res Resource
Lang string
CIDSet *IndirectRef
FontFile *IndirectRef
ToUnicode *IndirectRef
W *IndirectRef
}
type FreeTextAnnotation ¶
type FreeTextAnnotation struct {
MarkupAnnotation
Text string // Rich text string, see XFA 3.3
HAlign HAlignment // Code specifying the form of quadding (justification)
FontName string // font name
FontSize int // font size
FontCol *SimpleColor // font color
DS string // Default style string
Intent string // Description of the intent of the free text annotation
CallOutLine Array // if intent is FreeTextCallout
CallOutLineEndingStyle string
Margins Array
BorderWidth float64
BorderStyle BorderStyle
CloudyBorder bool
CloudyBorderIntensity int // 0,1,2
}
FreeText AnnotationInterface displays text directly on the page.
func NewFreeTextAnnotation ¶
func NewFreeTextAnnotation( rect Rectangle, apObjNr int, contents, id string, modDate string, f AnnotationFlags, col *SimpleColor, title string, popupIndRef *IndirectRef, ca *float64, rc, subject string, text string, hAlign HAlignment, fontName string, fontSize int, fontCol *SimpleColor, ds string, intent *FreeTextIntent, callOutLine Array, callOutLineEndingStyle *LineEndingStyle, MLeft, MTop, MRight, MBot float64, borderWidth float64, borderStyle BorderStyle, cloudyBorder bool, cloudyBorderIntensity int, ) FreeTextAnnotation
NewFreeTextAnnotation returns a new free text annotation.
func (FreeTextAnnotation) RenderDict ¶
func (ann FreeTextAnnotation) RenderDict(xRefTable *XRefTable, pageIndRef *IndirectRef) (Dict, error)
RenderDict renders ann into a PDF annotation dict.
type FreeTextIntent ¶
type FreeTextIntent int
FreeTextIntent represents the various free text annotation intents.
const ( IntentFreeText FreeTextIntent = 1 << iota IntentFreeTextCallout IntentFreeTextTypeWriter )
type HAlignment ¶
type HAlignment int
HAlignment represents the horizontal alignment of text.
const ( AlignLeft HAlignment = iota AlignCenter AlignRight AlignJustify )
These are the options for horizontal aligned text.
func ParseHorAlignment ¶
func ParseHorAlignment(s string) (HAlignment, error)
type HexLiteral ¶
type HexLiteral string
HexLiteral represents a PDF hex literal object.
func NewHexLiteral ¶
func NewHexLiteral(b []byte) HexLiteral
NewHexLiteral creates a new HexLiteral for b..
func (HexLiteral) Bytes ¶
func (hexliteral HexLiteral) Bytes() ([]byte, error)
Bytes returns the byte representation.
func (HexLiteral) Clone ¶
func (hexliteral HexLiteral) Clone() Object
Clone returns a clone of hexliteral.
func (HexLiteral) PDFString ¶
func (hexliteral HexLiteral) PDFString() string
PDFString returns the string representation as found in and written to a PDF file.
func (HexLiteral) String ¶
func (hexliteral HexLiteral) String() string
func (HexLiteral) Value ¶
func (hexliteral HexLiteral) Value() string
Value returns a string value for this PDF object.
type HighlightAnnotation ¶
type HighlightAnnotation struct {
TextMarkupAnnotation
}
func NewHighlightAnnotation ¶
func NewHighlightAnnotation( rect Rectangle, apObjNr int, contents, id string, modDate string, f AnnotationFlags, col *SimpleColor, borderRadX float64, borderRadY float64, borderWidth float64, title string, popupIndRef *IndirectRef, ca *float64, rc, subject string, quad QuadPoints, ) HighlightAnnotation
type ImageObject ¶
type ImageObject struct {
ResourceNames map[int]string
ImageDict *StreamDict
}
ImageObject represents an image used in a PDF file.
func (*ImageObject) AddResourceName ¶
func (io *ImageObject) AddResourceName(pageNr int, resourceName string)
AddResourceName adds a resourceName to this imageObject's ResourceNames map.
func (ImageObject) ResourceNamesString ¶
func (io ImageObject) ResourceNamesString() string
ResourceNamesString returns a string representation of the ResourceNames for this image.
type IndirectRef ¶
IndirectRef represents a PDF indirect object.
func CIDFontDescriptor ¶
func CIDFontDescriptor(xRefTable *XRefTable, ttf TTFLight, fontName, baseFontName, fontLang string, embed bool) (*IndirectRef, error)
CIDFontDescriptor returns a font descriptor describing the CIDFont’s default metrics other than its glyph widths.
func CIDFontDict ¶
func CIDFontDict(xRefTable *XRefTable, ttf TTFLight, fontName, baseFontName, lang string, parms *cjk) (*IndirectRef, error)
CIDFontDict returns the descendant font dict with special encoding for Type0 fonts.
func CIDFontFile ¶
func CIDFontFile(xRefTable *XRefTable, fontName string, subFont bool) (*IndirectRef, error)
CIDFontFile returns a TrueType font file or subfont file for fontName.
func CIDSet ¶
func CIDSet(xRefTable *XRefTable, ttf TTFLight, fontName string, indRef *IndirectRef) (*IndirectRef, error)
CIDSet computes a CIDSet for used glyphs and updates or returns a new object.
func CIDWidths ¶
func CIDWidths(xRefTable *XRefTable, ttf TTFLight, fontName string, subFont bool, indRef *IndirectRef) (*IndirectRef, error)
CIDWidths returns the value for W in a CIDFontDict.
func EnsureFontDict ¶
func EnsureFontDict(xRefTable *XRefTable, fontName, lang, script string, field bool, indRef *IndirectRef) (*IndirectRef, error)
EnsureFontDict ensures a font dict for fontName, lang, script.
func NewFontDescriptor ¶
func NewFontDescriptor(xRefTable *XRefTable, ttf TTFLight, fontName, fontLang string) (*IndirectRef, error)
FontDescriptor returns a TrueType font descriptor describing font’s default metrics other than its glyph widths.
func NewIndirectRef ¶
func NewIndirectRef(objectNumber, generationNumber int) *IndirectRef
NewIndirectRef returns a new PDFIndirectRef object.
func PDFDocEncoding ¶
func PDFDocEncoding(xRefTable *XRefTable) (*IndirectRef, error)
func Widths ¶
func Widths(xRefTable *XRefTable, ttf TTFLight, first, last int) (*IndirectRef, error)
Widths returns the value for Widths in a TrueType FontDict.
func (IndirectRef) PDFString ¶
func (ir IndirectRef) PDFString() string
PDFString returns a string representation as found in and written to a PDF file.
func (IndirectRef) String ¶
func (ir IndirectRef) String() string
type InheritedPageAttrs ¶
InheritedPageAttrs represents all inherited page attributes.
type InkAnnotation ¶
type InkAnnotation struct {
MarkupAnnotation
InkList []InkPath // Array of n arrays, each representing a stroked path of points in user space.
BorderWidth float64
BorderStyle BorderStyle
}
func NewInkAnnotation ¶
func NewInkAnnotation( rect Rectangle, apObjNr int, contents, id string, modDate string, f AnnotationFlags, col *SimpleColor, title string, popupIndRef *IndirectRef, ca *float64, rc, subject string, ink []InkPath, borderWidth float64, borderStyle BorderStyle, ) InkAnnotation
func (InkAnnotation) RenderDict ¶
func (ann InkAnnotation) RenderDict(xRefTable *XRefTable, pageIndRef *IndirectRef) (Dict, error)
type InkPath ¶
type InkPath []float64
A series of alternating x and y coordinates in PDF user space, specifying points along the path.
type Integer ¶
type Integer int
Integer represents a PDF integer object.
type LazyObjectStreamObject ¶
type LazyObjectStreamObject struct {
// contains filtered or unexported fields
}
func (LazyObjectStreamObject) Clone ¶
func (l LazyObjectStreamObject) Clone() Object
func (*LazyObjectStreamObject) DecodedObject ¶
func (l *LazyObjectStreamObject) DecodedObject(c ContextContext) (Object, error)
func (*LazyObjectStreamObject) GetData ¶
func (l *LazyObjectStreamObject) GetData() ([]byte, error)
func (LazyObjectStreamObject) PDFString ¶
func (l LazyObjectStreamObject) PDFString() string
func (LazyObjectStreamObject) String ¶
func (l LazyObjectStreamObject) String() string
type LineAnnotation ¶
type LineAnnotation struct {
MarkupAnnotation
P1, P2 Point // Two points in default user space.
LineEndings Array // Optional array of two names that shall specify the line ending styles.
LeaderLineLength float64 // Length of leader lines in default user space that extend from each endpoint of the line perpendicular to the line itself.
LeaderLineOffset float64 // Non-negative number that shall represent the length of the leader line offset, which is the amount of empty space between the endpoints of the annotation and the beginning of the leader lines.
LeaderLineExtensionLength float64 // Non-negative number that shall represents the length of leader line extensions that extend from the line proper 180 degrees from the leader lines,
Intent string // Optional description of the intent of the line annotation.
Measure Dict // Optional measure dictionary that shall specify the scale and units that apply to the line annotation.
Caption bool // Use text specified by "Contents" or "RC" as caption.
CaptionPositionTop bool // if true the caption shall be on top of the line else caption shall be centred inside the line.
CaptionOffsetX float64
CaptionOffsetY float64
FillCol *SimpleColor
BorderWidth float64
BorderStyle BorderStyle
}
LineAnnotation represents a line annotation.
func NewLineAnnotation ¶
func NewLineAnnotation( rect Rectangle, apObjNr int, contents, id string, modDate string, f AnnotationFlags, col *SimpleColor, title string, popupIndRef *IndirectRef, ca *float64, rc, subject string, p1, p2 Point, beginLineEndingStyle *LineEndingStyle, endLineEndingStyle *LineEndingStyle, leaderLineLength float64, leaderLineOffset float64, leaderLineExtensionLength float64, intent *LineIntent, measure Dict, caption bool, captionPosTop bool, captionOffsetX float64, captionOffsetY float64, fillCol *SimpleColor, borderWidth float64, borderStyle BorderStyle, ) LineAnnotation
NewLineAnnotation returns a new line annotation.
func (LineAnnotation) RenderDict ¶
func (ann LineAnnotation) RenderDict(xRefTable *XRefTable, pageIndRef *IndirectRef) (Dict, error)
RenderDict renders ann into a PDF annotation dict.
type LineEndingStyle ¶
type LineEndingStyle int
LineEndingStyle (see table 179)
const ( LESquare LineEndingStyle = iota LECircle LEDiamond LEOpenArrow LEClosedArrow LENone LEButt LEROpenArrow LERClosedArrow LESlash )
type LineIntent ¶
type LineIntent int
LineIntent represents the various line annotation intents.
const ( IntentLineArrow LineIntent = 1 << iota IntentLineDimension )
type LineJoinStyle ¶
type LineJoinStyle int
LineJoinStyle represents the shape to be used at the corners of paths that are stroked (see 8.4.3.4)
const ( LJMiter LineJoinStyle = iota LJRound LJBevel )
Render mode
type LinkAnnotation ¶
type LinkAnnotation struct {
AnnotationInterface
Dest *Destination // internal link
URI string // external link
Quad QuadPoints // shall be ignored if any coordinate lies outside the region specified by Rect.
Border bool // render border using borderColor.
BorderWidth float64
BorderStyle BorderStyle
}
LinkAnnotation represents a PDF link annotation.
func NewLinkAnnotation ¶
func NewLinkAnnotation( rect Rectangle, apObjNr int, contents, id string, modDate string, f AnnotationFlags, borderCol *SimpleColor, dest *Destination, uri string, quad QuadPoints, border bool, borderWidth float64, borderStyle BorderStyle, ) LinkAnnotation
NewLinkAnnotation returns a new link annotation.
func (LinkAnnotation) ContentString ¶
func (ann LinkAnnotation) ContentString() string
ContentString returns a string representation of ann's content.
func (LinkAnnotation) RenderDict ¶
func (ann LinkAnnotation) RenderDict(xRefTable *XRefTable, pageIndRef *IndirectRef) (Dict, error)
RenderDict renders ann into a page annotation dict.
type MarkupAnnotation ¶
type MarkupAnnotation struct {
AnnotationInterface
T string // The text label that shall be displayed in the title bar of the annotation’s pop-up window when open and active. This entry shall identify the user who added the annotation.
PopupIndRef *IndirectRef // An indirect reference to a pop-up annotation for entering or editing the text associated with this annotation.
CA *float64 // (Default: 1.0) The constant opacity value that shall be used in painting the annotation.
RC string // A rich text string that shall be displayed in the pop-up window when the annotation is opened.
CreationDate string // The date and time when the annotation was created.
Subj string // Text representing a short description of the subject being addressed by the annotation.
}
MarkupAnnotation represents a PDF markup annotation.
func NewMarkupAnnotation ¶
func NewMarkupAnnotation( subType AnnotationType, rect Rectangle, apObjNr int, contents, id string, modDate string, f AnnotationFlags, col *SimpleColor, borderRadX float64, borderRadY float64, borderWidth float64, title string, popupIndRef *IndirectRef, ca *float64, rc, subject string, ) MarkupAnnotation
NewMarkupAnnotation returns a new markup annotation.
func (MarkupAnnotation) ContentString ¶
func (ann MarkupAnnotation) ContentString() string
ContentString returns a string representation of ann's content.
func (MarkupAnnotation) RenderDict ¶
func (ann MarkupAnnotation) RenderDict(xRefTable *XRefTable, pageIndRef *IndirectRef) (Dict, error)
type NameType ¶
type NameType string
Name represents a PDF name object.
type Node ¶
type Node struct {
Kids []*Node // Mirror of the name tree's Kids array, an array of indirect references.
Names []entry // Mirror of the name tree's Names array.
Kmin, Kmax string // Mirror of the name tree's Limit array[Kmin,Kmax].
D Dict // The PDF dict representing this name tree node.
}
Node is an opinionated implementation of the PDF name tree. pdfcpu caches all name trees found in the PDF catalog with this data structure. The PDF spec does not impose any rules regarding a strategy for the creation of nodes. A binary tree was chosen where each leaf node has a limited number of entries (maxEntries). Once maxEntries has been reached a leaf node turns into an intermediary node with two kids, which are leaf nodes each of them holding half of the sorted entries of the original leaf node.
func (*Node) Add ¶
func (n *Node) Add(xRefTable *XRefTable, k string, v Object, m NameMap, nameRefDictKeys []string) error
Add adds an entry to a name tree.
func (*Node) AppendToNames ¶
AppendToNames adds an entry to a leaf node (for internalizing name trees).
func (*Node) HandleLeaf ¶
func (n *Node) HandleLeaf(xRefTable *XRefTable, k string, v Object, m NameMap, nameRefDictKeys []string) error
HandleLeaf processes a leaf node.
func (*Node) Process ¶
Process traverses the nametree applying a handler to each entry (key-value pair).
type NonFullScreenPageMode ¶
type NonFullScreenPageMode PageMode
const ( NFSPageModeUseNone NonFullScreenPageMode = iota NFSPageModeUseOutlines NFSPageModeUseThumb NFSPageModeUseOC )
type Object ¶
Object defines an interface for all Objects.
func NewLazyObjectStreamObject ¶
func NewLazyObjectStreamObject(osd *ObjectStreamDictType, startOffset, endOffset int, decodeFunc DecodeLazyObjectStreamObjectFunc) Object
func ParseObject ¶
ParseObject parses next Object from string buffer and returns the updated (left clipped) buffer.
func ParseObjectContext ¶
func ParseObjectContext(c ContextContext, line *string) (Object, error)
ParseObjectContext parses next Object from string buffer and returns the updated (left clipped) buffer. If the passed context is cancelled, parsing will be interrupted.
func ParseObjectWithContext ¶
type ObjectStreamDictType ¶
type ObjectStreamDictType struct {
StreamDict
Prolog []byte
ObjCount int
FirstObjOffset int
ObjArray Array
}
ObjectStreamDictType represents a object stream dictionary.
func NewObjectStreamDict ¶
func NewObjectStreamDict() *ObjectStreamDictType
NewObjectStreamDict creates a new ObjectStreamDictType object.
func ObjectStreamDict ¶
func ObjectStreamDict(sd *StreamDict) (*ObjectStreamDictType, error)
ObjectStreamDict creates a ObjectStreamDictType out of a StreamDict.
func (*ObjectStreamDictType) AddObject ¶
func (osd *ObjectStreamDictType) AddObject(objNumber int, pdfString string) error
AddObject adds another object to this object stream. Relies on decoded content!
func (*ObjectStreamDictType) Finalize ¶
func (osd *ObjectStreamDictType) Finalize()
Finalize prepares the final content of the objectstream.
func (*ObjectStreamDictType) IndexedObject ¶
func (osd *ObjectStreamDictType) IndexedObject(index int) (Object, error)
IndexedObject returns the object at given index from a ObjectStreamDictType.
type OptimizationContext ¶
type OptimizationContext struct {
// Font section
PageFonts []IntSet // For each page a registry of font object numbers.
FontObjects map[int]*FontObject // FontObject lookup table by font object number.
FormFontObjects map[int]*FontObject // FormFontObject lookup table by font object number.
Fonts map[string][]int // All font object numbers registered for a font name.
DuplicateFonts map[int]Dict // Registry of duplicate font dicts.
DuplicateFontObjs IntSet // The set of objects that represents the union of the object graphs of all duplicate font dicts.
// Image section
PageImages []IntSet // For each page a registry of image object numbers.
ImageObjects map[int]*ImageObject // ImageObject lookup table by image object number.
DuplicateImages map[int]*DuplicateImageObject // Registry of duplicate image dicts.
DuplicateImageObjs IntSet // The set of objects that represents the union of the object graphs of all duplicate image dicts.
ContentStreamCache map[int]*StreamDict
FormStreamCache map[int]*StreamDict
DuplicateInfoObjects IntSet // Possible result of manual info dict modification.
NonReferencedObjs []int // Objects that are not referenced.
Cache map[int]bool // For visited objects during optimization.
NullObjNr *int // objNr of a regular null object, to be used for fixing references to free objects.
}
OptimizationContext represents the context for the optimization of a PDF file.
func (*OptimizationContext) DuplicateFontObjectsString ¶
func (oc *OptimizationContext) DuplicateFontObjectsString() (int, string)
DuplicateFontObjectsString returns a formatted string and the number of objs.
func (*OptimizationContext) DuplicateImageObjectsString ¶
func (oc *OptimizationContext) DuplicateImageObjectsString() (int, string)
DuplicateImageObjectsString returns a formatted string and the number of objs.
func (*OptimizationContext) DuplicateInfoObjectsString ¶
func (oc *OptimizationContext) DuplicateInfoObjectsString() (int, string)
DuplicateInfoObjectsString returns a formatted string and the number of objs.
func (*OptimizationContext) IsDuplicateFontObject ¶
func (oc *OptimizationContext) IsDuplicateFontObject(i int) bool
IsDuplicateFontObject returns true if object #i is a duplicate font object.
func (*OptimizationContext) IsDuplicateImageObject ¶
func (oc *OptimizationContext) IsDuplicateImageObject(i int) bool
IsDuplicateImageObject returns true if object #i is a duplicate image object.
func (*OptimizationContext) IsDuplicateInfoObject ¶
func (oc *OptimizationContext) IsDuplicateInfoObject(i int) bool
IsDuplicateInfoObject returns true if object #i is a duplicate info object.
func (*OptimizationContext) NonReferencedObjsString ¶
func (oc *OptimizationContext) NonReferencedObjsString() (int, string)
NonReferencedObjsString returns a formatted string and the number of objs.
type Orientation ¶
type Orientation int
TODO Refactor because of orientation in nup.go
const ( Horizontal Orientation = iota Vertical )
type PageBoundaries ¶
type PageBoundaries struct {
Media *Box `json:"mediaBox,omitempty"`
Crop *Box `json:"cropBox,omitempty"`
Trim *Box `json:"trimBox,omitempty"`
Bleed *Box `json:"bleedBox,omitempty"`
Art *Box `json:"artBox,omitempty"`
Rot int `json:"rot"` // The effective page rotation.
Orientation string `json:"orient"`
}
PageBoundaries represent the defined PDF page boundaries.
func ParseBoxList ¶
func ParseBoxList(s string) (*PageBoundaries, error)
ParseBoxList parses a list of box
func ParsePageBoundaries ¶
func ParsePageBoundaries(s string, unit DisplayUnit) (*PageBoundaries, error)
ParsePageBoundaries parses a list of box definitions and assignments.
func (PageBoundaries) ArtBox ¶
func (pb PageBoundaries) ArtBox() *Rectangle
ArtBox returns the effective artbox for pb.
func (PageBoundaries) BleedBox ¶
func (pb PageBoundaries) BleedBox() *Rectangle
BleedBox returns the effective bleedbox for pb.
func (PageBoundaries) CropBox ¶
func (pb PageBoundaries) CropBox() *Rectangle
CropBox returns the effective cropbox for pb.
func (PageBoundaries) MediaBox ¶
func (pb PageBoundaries) MediaBox() *Rectangle
MediaBox returns the effective mediabox for pb.
func (*PageBoundaries) ResolveBox ¶
func (pb *PageBoundaries) ResolveBox(s string) error
ResolveBox resolves s and tries to assign an empty page boundary.
func (*PageBoundaries) SelectAll ¶
func (pb *PageBoundaries) SelectAll()
SelectAll selects all page boundaries.
func (PageBoundaries) String ¶
func (pb PageBoundaries) String() string
func (PageBoundaries) TrimBox ¶
func (pb PageBoundaries) TrimBox() *Rectangle
TrimBox returns the effective trimbox for pb.
type PageBoundary ¶
type PageBoundary int
const ( MediaBox PageBoundary = iota CropBox TrimBox BleedBox ArtBox )
func PageBoundaryFor ¶
func PageBoundaryFor(s string) *PageBoundary
func (*PageBoundary) String ¶
func (pb *PageBoundary) String() string
type PageLayout ¶
type PageLayout int
const ( PageLayoutSinglePage PageLayout = iota PageLayoutTwoColumnLeft PageLayoutTwoColumnRight PageLayoutTwoPageLeft PageLayoutTwoPageRight )
func PageLayoutFor ¶
func PageLayoutFor(s string) *PageLayout
func (*PageLayout) String ¶
func (pl *PageLayout) String() string
type PageResourceNames ¶
PageResourceNames represents the required resource names for a specific page as extracted from its content streams.
func NewPageResourceNames ¶
func NewPageResourceNames() PageResourceNames
NewPageResourceNames returns initialized pageResourceNames.
func (PageResourceNames) HasContent ¶
func (prn PageResourceNames) HasContent() bool
HasContent returns true in any resource names present.
func (PageResourceNames) HasResources ¶
func (prn PageResourceNames) HasResources(s string) bool
HasResources returns true for any resource names present in resource subDict s.
func (PageResourceNames) Resources ¶
func (prn PageResourceNames) Resources(s string) StringSet
Resources returns a set of all required resource names for subdict s.
func (PageResourceNames) String ¶
func (prn PageResourceNames) String() string
type PaperHandling ¶
type PaperHandling int
const ( Simplex PaperHandling = iota DuplexFlipShortEdge DuplexFlipLongEdge )
func PaperHandlingFor ¶
func PaperHandlingFor(s string) *PaperHandling
func (*PaperHandling) String ¶
func (ph *PaperHandling) String() string
type PermissionFlags ¶
type PermissionFlags int
See table 22 - User access permissions
const ( UnusedFlag1 PermissionFlags = 1 << iota // Bit 1: unused UnusedFlag2 // Bit 2: unused PermissionPrintRev2 // Bit 3: Print (security handlers rev.2), draft print (security handlers >= rev.3) PermissionModify // Bit 4: Modify contents by operations other than controlled by bits 6, 9, 11. PermissionExtract // Bit 5: Copy, extract text & graphics PermissionModAnnFillForm // Bit 6: Add or modify annotations, fill form fields, in conjunction with bit 4 create/mod form fields. UnusedFlag7 // Bit 7: unused UnusedFlag8 // Bit 8: unused PermissionFillRev3 // Bit 9: Fill form fields (security handlers >= rev.3) PermissionExtractRev3 // Bit 10: Copy, extract text & graphics (security handlers >= rev.3) (unused since PDF 2.0) PermissionAssembleRev3 // Bit 11: Assemble document (security handlers >= rev.3) PermissionPrintRev3 // Bit 12: Print (security handlers >= rev.3) )
type PgAnnots ¶
type PgAnnots map[AnnotationType]Annot
PgAnnots represents a map of page annotations by type.
type PolyLineAnnotation ¶
type PolyLineAnnotation struct {
MarkupAnnotation
Vertices Array // Array of numbers specifying the alternating horizontal and vertical coordinates, respectively, of each vertex, in default user space.
Path Array // Array of n arrays, each supplying the operands for a path building operator (m, l or c).
Intent string // Optional description of the intent of the polyline annotation.
Measure Dict // Optional measure dictionary that shall specify the scale and units that apply to the annotation.
FillCol *SimpleColor
BorderWidth float64
BorderStyle BorderStyle
LineEndings Array // Optional array of two names that shall specify the line ending styles.
}
func NewPolyLineAnnotation ¶
func NewPolyLineAnnotation( rect Rectangle, apObjNr int, contents, id string, modDate string, f AnnotationFlags, col *SimpleColor, title string, popupIndRef *IndirectRef, ca *float64, rc, subject string, vertices Array, path Array, intent *PolyLineIntent, measure Dict, fillCol *SimpleColor, borderWidth float64, borderStyle BorderStyle, beginLineEndingStyle *LineEndingStyle, endLineEndingStyle *LineEndingStyle, ) PolyLineAnnotation
NewPolyLineAnnotation returns a new polyline annotation.
func (PolyLineAnnotation) RenderDict ¶
func (ann PolyLineAnnotation) RenderDict(xRefTable *XRefTable, pageIndRef *IndirectRef) (Dict, error)
RenderDict renders ann into a PDF annotation dict.
type PolyLineIntent ¶
type PolyLineIntent int
PolyLineIntent represents the various polyline annotation intents.
const ( IntentPolyLinePolygonCloud PolyLineIntent = 1 << iota IntentPolyLineDimension )
type PolygonAnnotation ¶
type PolygonAnnotation struct {
MarkupAnnotation
Vertices Array // Array of numbers specifying the alternating horizontal and vertical coordinates, respectively, of each vertex, in default user space.
Path Array // Array of n arrays, each supplying the operands for a path building operator (m, l or c).
Intent string // Optional description of the intent of the polygon annotation.
Measure Dict // Optional measure dictionary that shall specify the scale and units that apply to the annotation.
FillCol *SimpleColor
BorderWidth float64
BorderStyle BorderStyle
CloudyBorder bool
CloudyBorderIntensity int // 0,1,2
}
PolygonAnnotation represents a polygon annotation.
func NewPolygonAnnotation ¶
func NewPolygonAnnotation( rect Rectangle, apObjNr int, contents, id string, modDate string, f AnnotationFlags, col *SimpleColor, title string, popupIndRef *IndirectRef, ca *float64, rc, subject string, vertices Array, path Array, intent *PolygonIntent, measure Dict, fillCol *SimpleColor, borderWidth float64, borderStyle BorderStyle, cloudyBorder bool, cloudyBorderIntensity int, ) PolygonAnnotation
NewPolygonAnnotation returns a new polygon annotation.
func (PolygonAnnotation) RenderDict ¶
func (ann PolygonAnnotation) RenderDict(xRefTable *XRefTable, pageIndRef *IndirectRef) (Dict, error)
RenderDict renders ann into a PDF annotation dict.
type PolygonIntent ¶
type PolygonIntent int
PolygonIntent represents the various polygon annotation intents.
const ( IntentPolygonCloud PolygonIntent = 1 << iota IntentPolygonDimension )
type PopupAnnotation ¶
type PopupAnnotation struct {
AnnotationInterface
ParentIndRef *IndirectRef // The optional parent markup annotation with which this pop-up annotation shall be associated.
Open bool // A flag specifying whether the annotation shall initially be displayed open.
}
PopupAnnotation represents PDF Popup annotations.
func NewPopupAnnotation ¶
func NewPopupAnnotation( rect Rectangle, apObjNr int, contents, id string, modDate string, f AnnotationFlags, col *SimpleColor, borderRadX float64, borderRadY float64, borderWidth float64, parentIndRef *IndirectRef, displayOpen bool, ) PopupAnnotation
NewPopupAnnotation returns a new popup annotation.
func (PopupAnnotation) ContentString ¶
func (ann PopupAnnotation) ContentString() string
ContentString returns a string representation of ann's content.
func (PopupAnnotation) RenderDict ¶
func (ann PopupAnnotation) RenderDict(xRefTable *XRefTable, pageIndRef *IndirectRef) (Dict, error)
type PrintScaling ¶
type PrintScaling int
const ( PrintScalingNone PrintScaling = iota PrintScalingAppDefault )
func PrintScalingFor ¶
func PrintScalingFor(s string) *PrintScaling
func (*PrintScaling) String ¶
func (ps *PrintScaling) String() string
type QuadLiteral ¶
type QuadLiteral struct {
P1, P2, P3, P4 Point
}
QuadLiteral is a polygon with four edges and four vertices. The four vertices are assumed to be specified in counter clockwise order.
func NewQuadLiteralForRect ¶
func NewQuadLiteralForRect(r *Rectangle) *QuadLiteral
func (QuadLiteral) Array ¶
func (ql QuadLiteral) Array() Array
Array returns the PDF representation of ql.
func (QuadLiteral) EnclosingRectangle ¶
func (ql QuadLiteral) EnclosingRectangle(f float64) *Rectangle
EnclosingRectangle calculates the rectangle enclosing ql's vertices at a distance f.
type QuadPoints ¶
type QuadPoints []QuadLiteral
QuadPoints is an array of 8 × n numbers specifying the coordinates of n quadrilaterals in default user space.
func (*QuadPoints) AddQuadLiteral ¶
func (qp *QuadPoints) AddQuadLiteral(ql QuadLiteral)
AddQuadLiteral adds a quadliteral to qp.
func (*QuadPoints) Array ¶
func (qp *QuadPoints) Array() Array
Array returns the PDF representation of qp.
type RDF ¶
type RDF struct {
XMLName xml.Name `xml:"http://www.w3.org/1999/02/22-rdf-syntax-ns# RDF"`
Description Description
}
type ReadContextType ¶
type ReadContextType struct {
FileName string // Input PDF-File.
FileSize int64 // Input file size.
RS io.ReadSeeker // Input read seeker.
EolCount int // 1 or 2 characters used for eol.
BinaryTotalSize int64 // total stream data
BinaryImageSize int64 // total image stream data
BinaryFontSize int64 // total font stream data (fontfiles)
BinaryImageDuplSize int64 // total obsolet image stream data after optimization
BinaryFontDuplSize int64 // total obsolet font stream data after optimization
Linearized bool // File is linearized.
Hybrid bool // File is a hybrid PDF file.
UsingObjectStreams bool // File is using object streams.
ObjectStreams IntSet // All object numbers of any object streams found which need to be decoded.
UsingXRefStreams bool // File is using xref streams.
XRefStreams IntSet // All object numbers of any xref streams found.
}
ReadContext represents the context for reading a PDF file.
func (*ReadContextType) IsObjectStreamObject ¶
func (rc *ReadContextType) IsObjectStreamObject(i int) bool
IsObjectStreamObject returns true if object i is a an object stream. All compressed objects are object streams.
func (*ReadContextType) ObjectStreamsString ¶
func (rc *ReadContextType) ObjectStreamsString() (int, string)
ObjectStreamsString returns a formatted string and the number of object stream objects.
func (*ReadContextType) ReadFileSize ¶
func (rc *ReadContextType) ReadFileSize() int
ReadFileSize returns the size of the input file, if there is one.
type Rectangle ¶
Rectangle represents a rectangular region in userspace.
func NewRectangle ¶
NewRectangle returns a new rectangle for given corner coordinates.
func RectForArray ¶
func RectForDim ¶
RectForDim returns a new rectangle for given dimensions.
func RectForFormat ¶
RectForFormat returns a new rectangle for given format.
func RectForWidthAndHeight ¶
RectForWidthAndHeight returns a new rectangle for given dimensions.
func (Rectangle) AspectRatio ¶
AspectRatio returns the relation between width and height of a rectangle.
func (*Rectangle) ConvertToUnit ¶
func (r *Rectangle) ConvertToUnit(unit DisplayUnit) *Rectangle
ConvertToUnit converts r to unit.
func (Rectangle) CroppedCopy ¶
CroppedCopy returns a copy of r with applied margin..
func (Rectangle) Dimensions ¶
Dimensions returns r's dimensions.
func (Rectangle) FitsWithin ¶
FitsWithin returns true if rectangle r fits within rectangle r2.
func (Rectangle) Format ¶
func (r Rectangle) Format(unit DisplayUnit) string
Format returns r's details converted into unit.
func (Rectangle) ScaledHeight ¶
ScaledHeight returns the height for given width according to r's aspect ratio.
func (Rectangle) ScaledWidth ¶
ScaledWidth returns the width for given height according to r's aspect ratio.
func (Rectangle) ShortString ¶
ShortString returns a compact string representation for r.
func (Rectangle) ToCentimetres ¶
ToCentimetres converts r to centimetres.
func (Rectangle) ToMillimetres ¶
ToMillimetres converts r to millimetres.
type RelPosition ¶
type RelPosition int
RelPosition represents the relative position of a text field's label.
const ( RelPosLeft RelPosition = iota RelPosRight RelPosTop RelPosBottom )
These are the options for relative label positions.
func ParseRelPosition ¶
func ParseRelPosition(s string) (RelPosition, error)
type Resource ¶
type Resource struct {
ID string
IndRef *IndirectRef
}
type RevocationDetails ¶
func (RevocationDetails) String ¶
func (rd RevocationDetails) String() string
type Seq ¶
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 Signature ¶
type Signature struct {
Type int
Certified bool
Authoritative bool
Visible bool
Signed bool
ObjNr int
PageNr int
}
Signature represents a digital signature.
func (Signature) String ¶
func (sig Signature) String(status SignatureStatus) string
type SignatureDetails ¶
type SignatureDetails struct {
SubFilter string // Signature Dict SubFilter
SignerIdentity string // extracted from signature
SignerName string // Signature Dict Name
ContactInfo string // Signature Dict ContactInfo
Location string // Signature Dict Location
Reason string // Signature Dict
SigningTime time.Time // Signature Dict M
FieldName string // Signature Field T
Signers []*Signer
}
func (*SignatureDetails) AddSigner ¶
func (sd *SignatureDetails) AddSigner(s *Signer)
func (*SignatureDetails) IsETSI_CAdES_detached ¶
func (sd *SignatureDetails) IsETSI_CAdES_detached() bool
func (*SignatureDetails) IsETSI_RFC3161 ¶
func (sd *SignatureDetails) IsETSI_RFC3161() bool
func (*SignatureDetails) Permissions ¶
func (sd *SignatureDetails) Permissions() int
func (SignatureDetails) String ¶
func (sd SignatureDetails) String() string
type SignatureReason ¶
type SignatureReason int
const ( SignatureReasonUnknown SignatureReason = 1 << iota SignatureReasonDocNotModified SignatureReasonDocModified SignatureReasonSignatureForged SignatureReasonSigningTimeInvalid SignatureReasonTimestampTokenInvalid SignatureReasonCertInvalid SignatureReasonCertNotTrusted SignatureReasonCertExpired SignatureReasonCertRevoked SignatureReasonInternal SignatureReasonSelfSignedCertErr )
func (SignatureReason) String ¶
func (sr SignatureReason) String() string
type SignatureStats ¶
type SignatureStats struct {
FormSigned int
FormSignedVisible int
FormUnsigned int
FormUnsignedVisible int
PageSigned int
PageSignedVisible int
PageUnsigned int
PageUnsignedVisible int
URSigned int
URSignedVisible int
URUnsigned int
URUnsignedVisible int
DTSSigned int
DTSSignedVisible int
DTSUnsigned int
DTSUnsignedVisible int
Total int
}
SignatureStats represents signature stats for a file.
func (SignatureStats) Counter ¶
func (sigStats SignatureStats) Counter(svr *SignatureValidationResult) (*int, *int, *int, *int)
type SignatureStatus ¶
type SignatureStatus int
SignatureStatus represents all possible signature statuses.
const ( SignatureStatusUnknown SignatureStatus = 1 << iota SignatureStatusValid SignatureStatusInvalid )
func (SignatureStatus) String ¶
func (st SignatureStatus) String() string
type SignatureValidationResult ¶
type SignatureValidationResult struct {
Signature
Status SignatureStatus
Reason SignatureReason
Details SignatureDetails
DocModified int
Problems []string
}
func (*SignatureValidationResult) AddProblem ¶
func (svr *SignatureValidationResult) AddProblem(s string)
func (*SignatureValidationResult) Certified ¶
func (svr *SignatureValidationResult) Certified() bool
func (*SignatureValidationResult) Permissions ¶
func (svr *SignatureValidationResult) Permissions() int
func (*SignatureValidationResult) SigningTime ¶
func (svr *SignatureValidationResult) SigningTime() string
func (SignatureValidationResult) String ¶
func (svr SignatureValidationResult) String() string
type Signer ¶
type Signer struct {
Certificate *CertificateDetails
CertificatePathStatus int
HasTimestamp bool
Timestamp time.Time // signature timestamp attribute (which contains a timestamp token)
LTVEnabled bool // needs timestamp token & revocation info
PAdES string // baseline level: B-B, B-T, B-LT, B-LTA
Certified bool // indicated by DocMDP entry
Authoritative bool // true if certified or first (youngest) signature
Permissions int // see table 257
Problems []string
}
func (*Signer) AddProblem ¶
type SimpleColor ¶
type SimpleColor struct {
R, G, B float32 // intensities between 0 and 1.
}
SimpleColor is a simple rgb wrapper.
func NewSimpleColor ¶
func NewSimpleColor(rgb uint32) SimpleColor
NewSimpleColor returns a SimpleColor for rgb in the form 0x00RRGGBB
func NewSimpleColorForArray ¶
func NewSimpleColorForArray(arr Array) SimpleColor
NewSimpleColorForArray returns a SimpleColor for an r,g,b array.
func NewSimpleColorForHexCode ¶
func NewSimpleColorForHexCode(hexCol string) (SimpleColor, error)
NewSimpleColorForHexCode returns a SimpleColor for a #FFFFFF type hexadecimal rgb color representation.
func ParseColor ¶
func ParseColor(s string) (SimpleColor, error)
ParseColor turns a color string into a SimpleColor.
func (SimpleColor) Array ¶
func (sc SimpleColor) Array() Array
func (SimpleColor) String ¶
func (sc SimpleColor) String() string
type SquareAnnotation ¶
type SquareAnnotation struct {
MarkupAnnotation
FillCol *SimpleColor
Margins Array
BorderWidth float64
BorderStyle BorderStyle
CloudyBorder bool
CloudyBorderIntensity int // 0,1,2
}
SquareAnnotation represents a square annotation.
func NewSquareAnnotation ¶
func NewSquareAnnotation( rect Rectangle, apObjNr int, contents, id string, modDate string, f AnnotationFlags, col *SimpleColor, title string, popupIndRef *IndirectRef, ca *float64, rc, subject string, fillCol *SimpleColor, MLeft, MTop, MRight, MBot float64, borderWidth float64, borderStyle BorderStyle, cloudyBorder bool, cloudyBorderIntensity int, ) SquareAnnotation
NewSquareAnnotation returns a new square annotation.
func (SquareAnnotation) RenderDict ¶
func (ann SquareAnnotation) RenderDict(xRefTable *XRefTable, pageIndRef *IndirectRef) (Dict, error)
RenderDict renders ann into a page annotation dict.
type SquigglyAnnotation ¶
type SquigglyAnnotation struct {
TextMarkupAnnotation
}
func NewSquigglyAnnotation ¶
func NewSquigglyAnnotation( rect Rectangle, apObjNr int, contents, id string, modDate string, f AnnotationFlags, col *SimpleColor, borderRadX float64, borderRadY float64, borderWidth float64, title string, popupIndRef *IndirectRef, ca *float64, rc, subject string, quad QuadPoints, ) SquigglyAnnotation
type StreamDict ¶
type StreamDict struct {
Dict
StreamOffset int64
StreamLength *int64
StreamLengthObjNr *int
FilterPipeline []PDFFilter
Raw []byte // Encoded
Content []byte // Decoded
// DCTImage image.Image
IsPageContent bool
CSComponents int
}
StreamDict represents a PDF stream dict object.
func NewStreamDict ¶
func NewStreamDict(d Dict, streamOffset int64, streamLength *int64, streamLengthObjNr *int, filterPipeline []PDFFilter) StreamDict
NewStreamDict creates a new PDFStreamDict for given PDFDict, stream offset and length.
func (*StreamDict) Decode ¶
func (sd *StreamDict) Decode() error
Decode applies sd's filter pipeline to sd.Raw in order to produce sd.Content.
func (*StreamDict) DecodeLength ¶
func (sd *StreamDict) DecodeLength(maxLen int64) ([]byte, error)
func (*StreamDict) Encode ¶
func (sd *StreamDict) Encode() error
Encode applies sd's filter pipeline to sd.Content in order to produce sd.Raw.
func (StreamDict) HasSoleFilterNamed ¶
func (sd StreamDict) HasSoleFilterNamed(filterName string) bool
HasSoleFilterNamed returns true if sd has a filterPipeline with 1 filter named filterName.
func (StreamDict) Image ¶
func (sd StreamDict) Image() bool
type StrikeOutAnnotation ¶
type StrikeOutAnnotation struct {
TextMarkupAnnotation
}
func NewStrikeOutAnnotation ¶
func NewStrikeOutAnnotation( rect Rectangle, apObjNr int, contents, id string, modDate string, f AnnotationFlags, col *SimpleColor, borderRadX float64, borderRadY float64, borderWidth float64, title string, popupIndRef *IndirectRef, ca *float64, rc, subject string, quad QuadPoints, ) StrikeOutAnnotation
type StringLiteral ¶
type StringLiteral string
StringLiteral represents a PDF string literal object.
func (StringLiteral) Clone ¶
func (stringliteral StringLiteral) Clone() Object
Clone returns a clone of stringLiteral.
func (StringLiteral) PDFString ¶
func (stringliteral StringLiteral) PDFString() string
PDFString returns a string representation as found in and written to a PDF file.
func (StringLiteral) String ¶
func (stringliteral StringLiteral) String() string
func (StringLiteral) Value ¶
func (stringliteral StringLiteral) Value() string
Value returns a string value for this PDF object.
type StringSet ¶
StringSet is a set of strings.
func NewStringSet ¶
NewStringSet returns a new StringSet for slice.
type TTFLight ¶
type TTFLight struct {
PostscriptName string // name: NameID 6
Protected bool // OS/2: fsType
UnitsPerEm int // head: unitsPerEm
Ascent int // OS/2: sTypoAscender
Descent int // OS/2: sTypoDescender
CapHeight int // OS/2: sCapHeight
FirstChar uint16 // OS/2: fsFirstCharIndex
LastChar uint16 // OS/2: fsLastCharIndex
UnicodeRange [4]uint32 // OS/2: Unicode Character Range
LLx, LLy, URx, URy float64 // head: xMin, yMin, xMax, yMax (fontbox)
ItalicAngle float64 // post: italicAngle
FixedPitch bool // post: isFixedPitch
Bold bool // OS/2: usWeightClass == 7
HorMetricsCount int // hhea: numOfLongHorMetrics
GlyphCount int // maxp: numGlyphs
GlyphWidths []int // hmtx: fd.HorMetricsCount.advanceWidth
Chars map[uint32]uint16 // cmap: Unicode character to glyph index
ToUnicode map[uint16]uint32 // map glyph index to unicode character
Planes map[int]bool // used Unicode planes
}
TTFLight represents a TrueType font w/o font file.
type TextAnnotation ¶
type TextAnnotation struct {
MarkupAnnotation
Open bool // A flag specifying whether the annotation shall initially be displayed open.
Name string // The name of an icon that shall be used in displaying the annotation. Comment, Key, (Note), Help, NewParagraph, Paragraph, Insert
}
TextAnnotation represents a PDF text annotation aka "Sticky Note".
func NewTextAnnotation ¶
func NewTextAnnotation( rect Rectangle, apObjNr int, contents, id string, modDate string, f AnnotationFlags, col *SimpleColor, title string, popupIndRef *IndirectRef, ca *float64, rc, subject string, borderRadX float64, borderRadY float64, borderWidth float64, displayOpen bool, name string, ) TextAnnotation
NewTextAnnotation returns a new text annotation.
func (TextAnnotation) RenderDict ¶
func (ann TextAnnotation) RenderDict(xRefTable *XRefTable, pageIndRef *IndirectRef) (Dict, error)
RenderDict renders ann into a PDF annotation dict.
type TextMarkupAnnotation ¶
type TextMarkupAnnotation struct {
MarkupAnnotation
Quad QuadPoints
}
func NewTextMarkupAnnotation ¶
func NewTextMarkupAnnotation( subType AnnotationType, rect Rectangle, apObjNr int, contents, id string, modDate string, f AnnotationFlags, col *SimpleColor, borderRadX float64, borderRadY float64, borderWidth float64, title string, popupIndRef *IndirectRef, ca *float64, rc, subject string, quad QuadPoints, ) TextMarkupAnnotation
func (TextMarkupAnnotation) RenderDict ¶
func (ann TextMarkupAnnotation) RenderDict(xRefTable *XRefTable, pageIndRef *IndirectRef) (Dict, error)
type Title ¶
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 TrustDetails ¶
type TrustDetails struct {
Status int
Reason string
SourceObtainedFrom string
AllowSignDocuments bool
AllowCertifyDocuments bool
AllowExecuteDynamicContent bool
AllowExecuteJavaScript bool
AllowExecutePrivilegedSystemOperation bool
}
func (TrustDetails) String ¶
func (td TrustDetails) String() string
type UnderlineAnnotation ¶
type UnderlineAnnotation struct {
TextMarkupAnnotation
}
func NewUnderlineAnnotation ¶
func NewUnderlineAnnotation( rect Rectangle, apObjNr int, contents, id string, modDate string, f AnnotationFlags, col *SimpleColor, borderRadX float64, borderRadY float64, borderWidth float64, title string, popupIndRef *IndirectRef, ca *float64, rc, subject string, quad QuadPoints, ) UnderlineAnnotation
type UserDate ¶
func (*UserDate) UnmarshalXML ¶
type VAlignment ¶
type VAlignment int
VAlignment represents the vertical alignment of text.
const ( AlignBaseline VAlignment = iota AlignTop AlignMiddle AlignBottom )
These are the options for vertical aligned text.
type Version ¶
type Version int
Version is a type for the internal representation of PDF versions.
func PDFVersion ¶
PDFVersion returns the PDFVersion for a version string.
type ViewerPrefJSON ¶
type ViewerPrefJSON struct {
HideToolbar *bool `json:"hideToolbar,omitempty"`
HideMenubar *bool `json:"hideMenubar,omitempty"`
HideWindowUI *bool `json:"hideWindowUI,omitempty"`
FitWindow *bool `json:"fitWindow,omitempty"`
CenterWindow *bool `json:"centerWindow,omitempty"`
DisplayDocTitle *bool `json:"displayDocTitle,omitempty"`
NonFullScreenPageMode string `json:"nonFullScreenPageMode,omitempty"`
Direction string `json:"direction,omitempty"`
ViewArea string `json:"viewArea,omitempty"`
ViewClip string `json:"viewClip,omitempty"`
PrintArea string `json:"printArea,omitempty"`
PrintClip string `json:"printClip,omitempty"`
PrintScaling string `json:"printScaling,omitempty"`
Duplex string `json:"duplex,omitempty"`
PickTrayByPDFSize *bool `json:"pickTrayByPDFSize,omitempty"`
PrintPageRange []int `json:"printPageRange,omitempty"`
NumCopies *int `json:"numCopies,omitempty"`
Enforce []string `json:"enforce,omitempty"`
}
type ViewerPreferences ¶
type ViewerPreferences struct {
HideToolbar *bool
HideMenubar *bool
HideWindowUI *bool
FitWindow *bool
CenterWindow *bool
DisplayDocTitle *bool // since 1.4
NonFullScreenPageMode *NonFullScreenPageMode
Direction *Direction // since 1.3
ViewArea *PageBoundary // since 1.4 to 1.7
ViewClip *PageBoundary // since 1.4 to 1.7
PrintArea *PageBoundary // since 1.4 to 1.7
PrintClip *PageBoundary // since 1.4 to 1.7
PrintScaling *PrintScaling // since 1.6
Duplex *PaperHandling // since 1.7
PickTrayByPDFSize *bool // since 1.7
PrintPageRange Array // since 1.7
NumCopies *Integer // since 1.7
Enforce Array // since 2.0
}
ViewerPreferences see 12.2 Table 147
func DefaultViewerPreferences ¶
func DefaultViewerPreferences(version Version) *ViewerPreferences
func ViewerPreferencesWithDefaults ¶
func ViewerPreferencesWithDefaults(vp *ViewerPreferences, version Version) (*ViewerPreferences, error)
func (ViewerPreferences) List ¶
func (vp ViewerPreferences) List() []string
List generates output for the viewer pref command.
func (*ViewerPreferences) MarshalJSON ¶
func (vp *ViewerPreferences) MarshalJSON() ([]byte, error)
func (*ViewerPreferences) Populate ¶
func (vp *ViewerPreferences) Populate(vp1 *ViewerPreferences)
func (*ViewerPreferences) SetCenterWindow ¶
func (vp *ViewerPreferences) SetCenterWindow(val bool)
func (*ViewerPreferences) SetDisplayDocTitle ¶
func (vp *ViewerPreferences) SetDisplayDocTitle(val bool)
func (*ViewerPreferences) SetFitWindow ¶
func (vp *ViewerPreferences) SetFitWindow(val bool)
func (*ViewerPreferences) SetHideMenuBar ¶
func (vp *ViewerPreferences) SetHideMenuBar(val bool)
func (*ViewerPreferences) SetHideToolBar ¶
func (vp *ViewerPreferences) SetHideToolBar(val bool)
func (*ViewerPreferences) SetHideWindowUI ¶
func (vp *ViewerPreferences) SetHideWindowUI(val bool)
func (*ViewerPreferences) SetNumCopies ¶
func (vp *ViewerPreferences) SetNumCopies(i int)
func (*ViewerPreferences) SetPickTrayByPDFSize ¶
func (vp *ViewerPreferences) SetPickTrayByPDFSize(val bool)
func (ViewerPreferences) String ¶
func (vp ViewerPreferences) String() string
String generates output for the info command.
func (*ViewerPreferences) UnmarshalJSON ¶
func (vp *ViewerPreferences) UnmarshalJSON(data []byte) error
func (*ViewerPreferences) Validate ¶
func (vp *ViewerPreferences) Validate(version Version) error
type WriteContext ¶
type WriteContext struct {
// The PDF-File which gets generated.
*bufio.Writer // A writer associated with the underlying io.Writer.
FileSize int64 // The size of the written file (calculated from Writer).
DirName string // The output directory.
FileName string // The output file name.
SelectedPages IntSet // For split, trim and extract.
BinaryTotalSize int64 // total stream data, counts 100% all stream data written.
BinaryImageSize int64 // total image stream data written = Read.BinaryImageSize.
BinaryFontSize int64 // total font stream data (fontfiles) = copy of Read.BinaryFontSize.
Table map[int]int64 // object write offsets
Offset int64 // current write offset
OffsetSigByteRange int64 // write offset of signature dict value for "ByteRange"
OffsetSigContents int64 // write offset of signature dict value for "Contents"
WriteToObjectStream bool // if true start to embed objects into object streams and obey ObjectStreamMaxObjects.
CurrentObjStream *int // if not nil, any new non-stream-object gets added to the object stream with this object number.
Eol string // end of line char sequence
Increment bool // Write context as PDF increment.
ObjNrs []int // Increment candidate object numbers.
OffsetPrevXRef *int64 // Increment trailer entry "Prev".
}
WriteContext represents the context for writing a PDF file.
func NewWriteContext ¶
func NewWriteContext(eol string) *WriteContext
func (*WriteContext) HasWriteOffset ¶
func (wc *WriteContext) HasWriteOffset(objNumber int) bool
HasWriteOffset returns true if an object has already been written to PDFDestination.
func (*WriteContext) SetWriteOffset ¶
func (wc *WriteContext) SetWriteOffset(objNumber int)
SetWriteOffset saves the current write offset to the PDFDestination.
func (*WriteContext) WriteEol ¶
func (wc *WriteContext) WriteEol() error
WriteEol writes an end of line sequence.
type XRefStreamDict ¶
type XRefStreamDict struct {
StreamDict
Size int
Objects []int
W [3]int
PreviousOffset *int64
}
XRefStreamDict represents a cross reference stream dictionary.
func ParseXRefStreamDict ¶
func ParseXRefStreamDict(sd *StreamDict) (*XRefStreamDict, error)
ParseXRefStreamDict creates a XRefStreamDict out of a StreamDict.
type XRefTable ¶
type XRefTable struct {
Table map[int]*XRefTableEntry
Size *int // from trailer dict.
MaxObjNr int // after reading in all objects from xRef table.
PageCount int // Number of pages.
Root *IndirectRef // Pointer to catalog (reference to root object).
RootDict Dict // Catalog
Names map[string]*Node // Cache for name trees as found in catalog.
Dests Dict // Named destinations
NameRefs map[string]NameMap // Name refs for merging only
Encrypt *IndirectRef // Encrypt dict.
E *Enc
EncKey []byte // Encrypt key.
AES4Strings bool
AES4Streams bool
AES4EmbeddedStreams bool
// PDF Version
HeaderVersion *Version // The PDF version the source is claiming to us as per its header.
RootVersion *Version // Optional PDF version taking precedence over the header version.
// Document information section
ID Array // from trailer
Info *IndirectRef // Infodict (reference to info dict object)
Title string
Subject string
Author string
Creator string
Producer string
CreationDate string
ModDate string
Keywords string
KeywordList StringSet
Properties map[string]string
CatalogXMPMeta *XMPMeta
PageLayout *PageLayout
PageMode *PageMode
ViewerPref *ViewerPreferences
// Linearization section (not yet supported)
OffsetPrimaryHintTable *int64
OffsetOverflowHintTable *int64
LinearizationObjs IntSet
// Page annotation cache
PageAnnots map[int]PgAnnots
// Thumbnail images
PageThumbs map[int]IndirectRef
Signatures map[int]map[int]Signature // form signatures and signatures located via page annotations only keyed by increment #.
URSignature Dict // usage rights signature
CertifiedSigObjNr int // authoritative signature
DSS Dict // document security store, currently unsupported
DTS time.Time // trusted digital timestamp
// Offspec section
AdditionalStreams *Array // array of IndirectRef - trailer :e.g., Oasis "Open Doc"
Tagged bool // File is using tags.
CustomExtensions bool // File is using custom extensions for annotations and/or keywords.
// Validation
CurPage int // current page during validation
CurObj int // current object during validation, the last dereferenced object
Conf *Configuration // current command being executed
ValidationMode int // see Configuration
ValidateLinks bool // check for broken links in LinkAnnotations/URIDicts.
Valid bool // true means successful validated against ISO 32000.
URIs map[int]map[string]string // URIs for link checking
Optimized bool
Watermarked bool
Form Dict
Outlines Dict
SignatureExist bool
AppendOnly bool
// Fonts
UsedGIDs map[string]map[uint16]bool
FillFonts map[string]IndirectRef
}
XRefTable represents a PDF cross reference table plus stats for a PDF file.
func (*XRefTable) AppendContent ¶
AppendContent appends bb to pageDict's content stream.
func (*XRefTable) AppendPages ¶
func (*XRefTable) BindNameTrees ¶
BindNameTrees syncs up the internal name tree cache with the xreftable.
func (*XRefTable) BindPrinterPreferences ¶
func (xRefTable *XRefTable) BindPrinterPreferences(vp *ViewerPreferences, d Dict)
func (*XRefTable) BindViewerPreferences ¶
func (xRefTable *XRefTable) BindViewerPreferences()
func (*XRefTable) CatalogHasPieceInfo ¶
CatalogHasPieceInfo returns true if the root has an entry for \"PieceInfo\".
func (*XRefTable) DeleteDictEntry ¶
func (*XRefTable) DeleteObject ¶
DeleteObject makes a deep remove of o.
func (*XRefTable) DeleteObjectGraph ¶
DeleteObjectGraph deletes all objects reachable by indRef.
func (*XRefTable) Dereference ¶
Dereference resolves an indirect object and returns the resulting PDF object.
func (*XRefTable) DereferenceArray ¶
DereferenceArray resolves and validates an array object, which may be an indirect reference.
func (*XRefTable) DereferenceBoolean ¶
DereferenceBoolean resolves and validates a boolean object, which may be an indirect reference.
func (*XRefTable) DereferenceCSVSafeText ¶
DereferenceCSVSafeText resolves and validates a string or hex literal object to a string.
func (*XRefTable) DereferenceDestArray ¶
DereferenceDestArray resolves the destination for key.
func (*XRefTable) DereferenceDict ¶
DereferenceDict resolves and validates a dictionary object, which may be an indirect reference.
func (*XRefTable) DereferenceDictEntry ¶
DereferenceDictEntry returns a dereferenced dict entry.
func (*XRefTable) DereferenceDictWithIncr ¶
DereferenceDictWithIncr resolves and validates a dictionary object, which may be an indirect reference. It also returns the number of the written PDF Increment this object is part of. The higher the increment number the older the object.
func (*XRefTable) DereferenceFontDict ¶
func (xRefTable *XRefTable) DereferenceFontDict(indRef IndirectRef) (Dict, error)
DereferenceFontDict returns the font dict referenced by indRef.
func (*XRefTable) DereferenceForWrite ¶
func (*XRefTable) DereferenceInteger ¶
DereferenceInteger resolves and validates an integer object, which may be an indirect reference.
func (*XRefTable) DereferenceName ¶
func (xRefTable *XRefTable) DereferenceName(o Object, sinceVersion Version, validate func(string) bool) (n NameType, err error)
DereferenceName resolves and validates a name object, which may be an indirect reference.
func (*XRefTable) DereferenceNumber ¶
DereferenceNumber resolves a number object, which may be an indirect reference and returns a float64.
func (*XRefTable) DereferencePageNodeDict ¶
func (xRefTable *XRefTable) DereferencePageNodeDict(indRef IndirectRef) (Dict, error)
DereferencePageNodeDict returns the page node dict referenced by indRef.
func (*XRefTable) DereferenceStreamDict ¶
func (xRefTable *XRefTable) DereferenceStreamDict(o Object) (*StreamDict, bool, error)
DereferenceStreamDict resolves a stream dictionary object.
func (*XRefTable) DereferenceStringEntryBytes ¶
DereferenceStringEntryBytes returns the bytes of a string entry of d.
func (*XRefTable) DereferenceStringLiteral ¶
func (xRefTable *XRefTable) DereferenceStringLiteral(o Object, sinceVersion Version, validate func(string) bool) (s StringLiteral, err error)
DereferenceStringLiteral resolves and validates a string literal object, which may be an indirect reference.
func (*XRefTable) DereferenceStringOrHexLiteral ¶
func (xRefTable *XRefTable) DereferenceStringOrHexLiteral(obj Object, sinceVersion Version, validate func(string) bool) (s string, err error)
DereferenceStringOrHexLiteral resolves and validates a string or hex literal object, which may be an indirect reference.
func (*XRefTable) DereferenceText ¶
DereferenceText resolves and validates a string or hex literal object to a string.
func (*XRefTable) DereferenceWithIncr ¶
Dereference resolves an indirect object and returns the resulting PDF object. It also returns the number of the written PDF Increment this object is part of. The higher the increment number the older the object.
func (*XRefTable) DereferenceXObjectDict ¶
func (xRefTable *XRefTable) DereferenceXObjectDict(indRef IndirectRef) (*StreamDict, error)
DereferenceXObjectDict resolves an XObject.
func (*XRefTable) DumpObject ¶
func (*XRefTable) EmptyPage ¶
func (xRefTable *XRefTable) EmptyPage(parentIndRef *IndirectRef, mediaBox *Rectangle) (*IndirectRef, error)
func (*XRefTable) EncryptDict ¶
EncryptDict returns a pointer to the root object / catalog.
func (*XRefTable) EnsureCollection ¶
EnsureCollection makes sure there is a Collection entry in the catalog. Needed for portfolio / portable collections eg. for file attachments.
func (*XRefTable) EnsurePageCount ¶
EnsurePageCount evaluates the page count for xRefTable if necessary.
func (*XRefTable) EnsureValidFreeList ¶
EnsureValidFreeList ensures the integrity of the free list associated with the recorded free objects. See 7.5.4 Cross-Reference Table
func (*XRefTable) EnsureVersionForWriting ¶
func (xRefTable *XRefTable) EnsureVersionForWriting()
EnsureVersionForWriting sets the version to the highest supported PDF Version 1.7. This is necessary to allow validation after adding features not supported by the original version of a document as during watermarking.
func (*XRefTable) Find ¶
func (xRefTable *XRefTable) Find(objNr int) (*XRefTableEntry, bool)
Find returns the XRefTable entry for given object number.
func (*XRefTable) FindObject ¶
FindObject returns the object of the XRefTableEntry for a specific object number.
func (*XRefTable) FindTableEntry ¶
func (xRefTable *XRefTable) FindTableEntry(objNr int, genNr int) (*XRefTableEntry, bool)
FindTableEntry returns the XRefTable entry for given object and generation numbers.
func (*XRefTable) FindTableEntryForIndRef ¶
func (xRefTable *XRefTable) FindTableEntryForIndRef(indRef *IndirectRef) (*XRefTableEntry, bool)
FindTableEntryForIndRef returns the XRefTable entry for given indirect reference.
func (*XRefTable) FindTableEntryLight ¶
func (xRefTable *XRefTable) FindTableEntryLight(objNr int) (*XRefTableEntry, bool)
FindTableEntryLight returns the XRefTable entry for given object number.
func (*XRefTable) Free ¶
func (xRefTable *XRefTable) Free(objNr int) (*XRefTableEntry, error)
Free returns the cross ref table entry for given number of a free object.
func (*XRefTable) FreeObject ¶
FreeObject marks an objects xref table entry as free and inserts it into the free list right after the head.
func (*XRefTable) HasUsedGIDs ¶
func (*XRefTable) IDFirstElement ¶
IDFirstElement returns the first element of ID.
func (*XRefTable) IncrementRefCount ¶
func (xRefTable *XRefTable) IncrementRefCount(indRef *IndirectRef)
IncrementRefCount increments the number of references for the object pointed to by indRef.
func (*XRefTable) IndRefForNewObject ¶
func (xRefTable *XRefTable) IndRefForNewObject(obj Object) (*IndirectRef, error)
IndRefForNewObject inserts an object into the xRefTable and returns an indirect reference to it.
func (*XRefTable) InsertAndUseRecycled ¶
func (xRefTable *XRefTable) InsertAndUseRecycled(xRefTableEntry XRefTableEntry) (objNr int, err error)
InsertAndUseRecycled adds given xRefTableEntry into the cross reference table utilizing the freelist.
func (*XRefTable) InsertBlankPages ¶
InsertBlankPages inserts a blank page before or after each selected page.
func (*XRefTable) InsertNew ¶
func (xRefTable *XRefTable) InsertNew(xRefTableEntry XRefTableEntry) (objNr int)
InsertNew adds given xRefTableEntry at next new objNumber into the cross reference table. Only to be called once an xRefTable has been generated completely and all trailer dicts have been processed. xRefTable.Size is the size entry of the first trailer dict processed. Called on creation of new object streams. Called by InsertAndUseRecycled.
func (*XRefTable) InsertObject ¶
InsertObject inserts an object into the xRefTable.
func (*XRefTable) InsertPages ¶
Zip in ctx's pages: for each page weave in the corresponding ctx page as long as there is one.
func (*XRefTable) IsBeingValidated ¶
func (xRefTable *XRefTable) IsBeingValidated(ir IndirectRef) (bool, error)
IsBeingValidated returns true if the object referenced by ir is being validated.
func (*XRefTable) IsLinearizationObject ¶
IsLinearizationObject returns true if object #i is a a linearization object.
func (*XRefTable) IsObjBeingValidated ¶
IsObjBeingValidated returns true if the object with objNr and genNr is being validated.
func (*XRefTable) IsObjValid ¶
IsObjValid returns true if the object with objNr and genNr is valid.
func (*XRefTable) IsValid ¶
func (xRefTable *XRefTable) IsValid(ir IndirectRef) (bool, error)
IsValid returns true if the object referenced by ir is valid.
func (*XRefTable) LinearizationObjsString ¶
LinearizationObjsString returns a formatted string and the number of objs.
func (*XRefTable) LocateNameTree ¶
LocateNameTree locates/ensures a specific name tree.
func (*XRefTable) MissingObjects ¶
MissingObjects returns the number of objects that were not written plus the corresponding comma separated string representation.
func (*XRefTable) NewEmbeddedStreamDict ¶
func (xRefTable *XRefTable) NewEmbeddedStreamDict(r io.Reader, modDate time.Time) (*IndirectRef, error)
NewEmbeddedStreamDict creates and returns an embeddedStreamDict containing the bytes represented by r.
func (*XRefTable) NewFileSpecDict ¶
func (xRefTable *XRefTable) NewFileSpecDict(f, uf, desc string, indRefStreamDict IndirectRef) (Dict, error)
NewFileSpecDict creates and returns a new fileSpec dictionary.
func (*XRefTable) NewStreamDictForBuf ¶
func (xRefTable *XRefTable) NewStreamDictForBuf(buf []byte) (*StreamDict, error)
NewStreamDictForBuf creates a streamDict for buf.
func (*XRefTable) NextForFree ¶
NextForFree returns the number of the object the free object with objNumber links to. This is the successor of this free object in the free list.
func (*XRefTable) PageBoundaries ¶
func (xRefTable *XRefTable) PageBoundaries(selectedPages IntSet) ([]PageBoundaries, error)
PageBoundaries returns a sorted slice with page boundaries for all pages sorted ascending by page number.
func (*XRefTable) PageContent ¶
PageContent returns the content in PDF syntax for page dict d.
func (*XRefTable) PageDict ¶
func (xRefTable *XRefTable) PageDict(pageNr int, consolidateRes bool) (Dict, *IndirectRef, *InheritedPageAttrs, error)
PageDict returns a specific page dict along with the resources, mediaBox and CropBox in effect. consolidateRes ensures optimized resources in InheritedPageAttrs.
func (*XRefTable) PageDictIndRef ¶
func (xRefTable *XRefTable) PageDictIndRef(page int) (*IndirectRef, error)
PageDictIndRef returns the pageDict IndRef for a logical page number.
func (*XRefTable) PageDims ¶
PageDims returns a sorted slice with effective media box dimensions for all pages sorted ascending by page number.
func (*XRefTable) PageNumber ¶
PageNumber returns the logical page number for a page dict object number.
func (*XRefTable) Pages ¶
func (xRefTable *XRefTable) Pages() (*IndirectRef, error)
Pages returns the Pages reference contained in the catalog.
func (*XRefTable) ParseRootVersion ¶
ParseRootVersion returns a string representation for an optional Version entry in the root object.
func (*XRefTable) RectForArray ¶
RectForArray returns a new rectangle for given Array.
func (*XRefTable) RemoveCollection ¶
RemoveCollection removes an existing Collection entry from the catalog.
func (*XRefTable) RemoveEmbeddedFilesNameTree ¶
RemoveEmbeddedFilesNameTree removes both the embedded files name tree and the Collection dict.
func (*XRefTable) RemoveNameTree ¶
RemoveNameTree removes a specific name tree. Also removes a resulting empty names dict.
func (*XRefTable) RemoveSignature ¶
func (xRefTable *XRefTable) RemoveSignature()
func (*XRefTable) SetBeingValidated ¶
func (xRefTable *XRefTable) SetBeingValidated(ir IndirectRef) error
SetBeingValidated marks the xreftable entry of the object referenced by ir as being validated.
func (*XRefTable) SetValid ¶
func (xRefTable *XRefTable) SetValid(ir IndirectRef) error
SetValid marks the xreftable entry of the object referenced by ir as valid.
func (*XRefTable) StreamDictIndRef ¶
func (xRefTable *XRefTable) StreamDictIndRef(bb []byte) (*IndirectRef, error)
StreamDictIndRef creates a new stream dict for bb.
func (*XRefTable) UndeleteObject ¶
UndeleteObject ensures an object is not recorded in the free list. e.g. sometimes caused by indirect references to free objects in the original PDF file.
func (*XRefTable) ValidateVersion ¶
ValidateVersion validates against the xRefTable's version.
func (*XRefTable) Version ¶
Version returns the PDF version of the PDF writer that created this file. Before V1.4 this is the header version. Since V1.4 the catalog may contain a Version entry which takes precedence over the header version.
func (*XRefTable) VersionString ¶
VersionString return a string representation for this PDF files PDF version.
type XRefTableEntry ¶
type XRefTableEntry struct {
Free bool
Offset *int64
Generation *int
Incr int
RefCount int
Object Object
Compressed bool
ObjectStream *int
ObjectStreamInd *int
Valid bool
BeingValidated bool
}
XRefTableEntry represents an entry in the PDF cross reference table.
This may wrap a free object, a compressed object or any in use PDF object:
Dict, StreamDict, ObjectStreamDictType, PDFXRefStreamDict, Array, Integer, Float, Name, StringLiteral, HexLiteral, Boolean
func NewFreeHeadXRefTableEntry ¶
func NewFreeHeadXRefTableEntry() *XRefTableEntry
NewFreeHeadXRefTableEntry returns the xref table entry for object 0 which is per definition the head of the free list (list of free objects).
func NewXRefTableEntryGen0 ¶
func NewXRefTableEntryGen0(obj Object) *XRefTableEntry
NewXRefTableEntryGen0 returns a cross reference table entry for an object with generation 0.