unidoc: github.com/unidoc/unidoc/pdf/internal/cmap Index | Files

package cmap

import "github.com/unidoc/unidoc/pdf/internal/cmap"


Package Files

cmap.go const.go parser.go primitives.go utils.go

type CMap Uses

type CMap struct {
    // contains filtered or unexported fields

CMap represents a character code to unicode mapping used in PDF files.

func LoadCmapFromData Uses

func LoadCmapFromData(data []byte) (*CMap, error)

LoadCmapFromData parses CMap data in memory through a byte vector and returns a CMap which can be used for character code to unicode conversion.

func (*CMap) CharcodeBytesToUnicode Uses

func (cmap *CMap) CharcodeBytesToUnicode(src []byte) string

CharcodeBytesToUnicode converts a byte array of charcodes to a unicode string representation.

func (*CMap) CharcodeToUnicode Uses

func (cmap *CMap) CharcodeToUnicode(srcCode uint64) string

CharcodeToUnicode converts a single character code to unicode string. Note that CharcodeBytesToUnicode is typically more efficient.

func (*CMap) Name Uses

func (cmap *CMap) Name() string

Name returns the name of the CMap.

func (*CMap) Type Uses

func (cmap *CMap) Type() int

Type returns the type of the CMap.

Package cmap imports 11 packages (graph) and is imported by 1 packages. Updated 2019-06-03. Refresh now. Tools for package owners.