Documentation ¶
Index ¶
- Constants
- Variables
- func PainterFlagNoSaveRestore(p *painterFlag)
- func PainterFlagNoSaveRestorePrior(p *painterFlag)
- func PainterFlagPrepend(p *painterFlag)
- func PainterFlagRawCoordinates(p *painterFlag)
- type AnnotationFlag
- type AnnotationType
- type AppearanceType
- type Array
- func (array *Array) Append(objects ...Object) error
- func (array *Array) AppendIndirect(objects ...Object) error
- func (array *Array) AppendIndirectSafe(objects ...Object) error
- func (array *Array) At(index int) Object
- func (array *Array) Clear()
- func (array *Array) Copy() (obj Object, err error)
- func (array *Array) Kind() ObjectKind
- func (array *Array) MarshalPDF(w *pdf.Writer) (err error)
- func (array *Array) NumObjects() int
- func (array *Array) Remove(index int) error
- func (array *Array) Set(index int, obj Object)
- func (array *Array) SetIndirect(index int, obj Object) (Object, error)
- func (array *Array) SetIndirectSafe(index int, obj Object) (Object, error)
- type BlendMode
- type Bool
- type CIDToGIDMap
- type CanvasObject
- type Contents
- type DataContainer
- type Dictionary
- func (d *Dictionary) AddKey(name pdf.Name, obj Object)
- func (d *Dictionary) AddKeyIndirect(name pdf.Name, obj Object) error
- func (d *Dictionary) Copy() (Object, error)
- func (d *Dictionary) Int(name pdf.Name, defval int64) int64
- func (d *Dictionary) Key(name pdf.Name) Object
- func (d *Dictionary) Kind() ObjectKind
- func (d *Dictionary) MarshalPDF(w *pdf.Writer) error
- type Document
- type DocumentOptionFunc
- type EncodingMapType
- type Encrypt
- type ExportFormat
- type FieldFlag
- type FieldType
- type FilterType
- type Font
- type FontAutoSelectBehavior
- type FontCreateFlag
- type FontDescriptorFlag
- type FontFileType
- type FontMatchBehaviorFlag
- type FontStretch
- type FontStyle
- type FontType
- type Generation
- type GlyphAccess
- type HighlightingMode
- type HorizontalAlignment
- type IndirectObjectList
- type InfoInitial
- type LineCapStyle
- type LineJoinStyle
- type Matrix2D
- type MemDocument
- type Metadata
- type Metrics
- type Null
- type Number
- type Object
- type ObjectKind
- type Operator
- type PDFALevel
- type PDFVersion
- type Page
- type PageSize
- type Pages
- type Painter
- type PainterFlag
- type Parser
- func (p *Parser) FileSize() int64
- func (p *Parser) GetEncrypt() *Encrypt
- func (p *Parser) HasXRefStream() bool
- func (p *Parser) IsEncrypted() bool
- func (p *Parser) IsStrictParsing() bool
- func (p *Parser) LoadOnDemand() bool
- func (p *Parser) NumIncrementalUpdates() int
- func (p *Parser) Objects() *IndirectObjectList
- func (p *Parser) PDFVersion() PDFVersion
- func (p *Parser) Password() string
- func (p *Parser) TakeEncrypt() *Encrypt
- func (p *Parser) Trailer() Object
- func (p *Parser) XRefOffset() int64
- type ParserObject
- type ParserObjectOption
- type ParserOption
- type PixelFormat
- type RawData
- type Reader
- type Rect
- type Reference
- type RenderingIntent
- type SaveOption
- type Standard14FontType
- type String
- func (s *String) Copy() (Object, error)
- func (s *String) IsHex() bool
- func (s *String) IsZero() bool
- func (s *String) Kind() ObjectKind
- func (s *String) MarshalPDF(w *pdf.Writer) error
- func (s *String) RawData() []byte
- func (s *String) State() StringState
- func (s *String) String() string
- func (s *String) UnmarshalBinary(data []byte) error
- type StringEncoding
- type StringState
- type StrokeStyle
- type TextExtractFlags
- type TextRenderingMode
- type TextStyle
- type Tokenizer
- type VerticalAlignment
- type Writer
- type XObjectType
- type XRefEntry
- type XRefEntryCompressed
- type XRefEntryFree
- type XRefEntryInUse
- type XRefStreamParser
Constants ¶
const ( // BufferSize is used for internal buffers. BufferSize = 4096 // DefaultPDFVersion is the default PDF version // used by new PDF documents. DefaultPDFVersion = pdf.Version14 )
Variables ¶
var ( ErrUnknown = errors.New("unknown error") ErrInvalidHandle = errors.New("invalid handle") ErrFileNotFound = fs.ErrNotExist ErrInvalidDeviceOperation = errors.New("invalid device operation") ErrUnexpectedEOF = io.ErrUnexpectedEOF ErrValueOutOfRange = pdf.ErrValueOutOfRange ErrInternalLogic = errors.New("internal logic") ErrInvalidEnumValue = errors.New("invalid enum value") ErrBrokenFile = errors.New("file is broken") ErrPageNotFound = errors.New("page not found") ErrNoPDFFile = errors.New("not a PDF file") ErrNoXRef = errors.New("no valid XRef") ErrNoTrailer = errors.New("no trailer") ErrNoNumber = errors.New("not a number") ErrNoObject = errors.New("not an object") ErrNoEOFToken = errors.New("EOF token not found") ErrInvalidTrailerSize = errors.New("invalid trailer size") ErrInvalidDataType = errors.New("invalid data type") ErrInvalidXRef = errors.New("invalid XRef") ErrInvalidXRefStream = errors.New("invalid XRef stream") ErrInvalidXRefType = errors.New("invalid XRef type") ErrInvalidPredictor = errors.New("invalid predictor") ErrInvalidStrokeStyle = errors.New("invalid stroke style") ErrInvalidHexString = errors.New("invalid hex string") ErrInvalidStream = errors.New("invalid stream") ErrInvalidStreamLength = errors.New("invalid stream len") ErrInvalidKey = errors.New("invalid key") ErrInvalidName = errors.New("invalid name") ErrInvalidEncryptionDict = errors.New("invalid encryption dict") ErrInvalidPassword = errors.New("invalid password") ErrInvalidFontData = errors.New("invalid font data") ErrInvalidContentStream = errors.New("invalid content stream") ErrUnsupportedVersion = pdf.ErrUnsupportedVersion ErrUnsupportedFilter = errors.New("unsupported filter") ErrUnsupportedFontFormat = errors.New("unsupported font format") ErrUnsupportedImageFormat = errors.New("unsupported image format") ErrActionAlreadyPresent = errors.New("action already present") ErrWrongDestinationType = errors.New("wrong destination type") ErrMissingEndStream = errors.New("missing steram end") ErrDate = errors.New("bad date") ErrFlate = errors.New("flate") ErrFreeType = errors.New("free type") ErrSignature = errors.New("signature") ErrCannotConvertColor = pdf.ErrCannotConvertColor ErrNotImplemented = pdf.ErrNotImplemented ErrDestinationAlreadyPresent = errors.New("destination already present") ErrChangeOnImmutable = errors.New("change on immutable") ErrNotCompiled = errors.New("not compiled") ErrOutlineItemAlreadyPresent = errors.New("outline already present") ErrNotLoadedForUpdate = errors.New("not loaded for update") ErrCannotEncrypUpdate = errors.New("cannot encrypt update") ErrXMPMetadata = errors.New("xmp metadata") )
Functions ¶
func PainterFlagNoSaveRestore ¶
func PainterFlagNoSaveRestore(p *painterFlag)
PainterFlagNoSaveRestore disables Save/Restore of added content in this painting session.
func PainterFlagNoSaveRestorePrior ¶
func PainterFlagNoSaveRestorePrior(p *painterFlag)
PainterFlagNoSaveRestorePrior disables Save/Restore or previous content. Implies PainterFlagRawCoordinates.
func PainterFlagPrepend ¶
func PainterFlagPrepend(p *painterFlag)
PainterFlagPrepend does nothing for now.
func PainterFlagRawCoordinates ¶
func PainterFlagRawCoordinates(p *painterFlag)
PainterFlagRawCoordinates does nothing for now.
Types ¶
type AnnotationFlag ¶
type AnnotationFlag uint32
const ( AnnotationFlagNone AnnotationFlag = 0x0000 AnnotationFlagInvisible AnnotationFlag = 1 << (iota - 1) AnnotationFlagHidden AnnotationFlagPrint AnnotationFlagNoZoom AnnotationFlagNoRotate AnnotationFlagNoView AnnotationFlagReadOnly AnnotationFlagLocked AnnotationFlagToggleNoView AnnotationFlagLockedContents )
type AnnotationType ¶
type AnnotationType uint8
const ( AnnotationTypeUnknown AnnotationType = iota AnnotationTypeText AnnotationTypeLink AnnotationTypeFreeText AnnotationTypeLine AnnotationTypeSquare AnnotationTypeCircle AnnotationTypePolygon AnnotationTypePolyLine AnnotationTypeHighlight AnnotationTypeUnderline AnnotationTypeSquiggly AnnotationTypeStrikeOut AnnotationTypeStamp AnnotationTypeCaret AnnotationTypeInk AnnotationTypePopup AnnotationTypeFileAttachement AnnotationTypeSound AnnotationTypeMovie AnnotationTypeWidget AnnotationTypeScreen AnnotationTypePrinterMark AnnotationTypeTrapNet AnnotationTypeWatermark AnnotationTypeModel3D AnnotationTypeRichMedia AnnotationTypeWebMedia AnnotationTypeRedact AnnotationTypeProjection )
type AppearanceType ¶
type AppearanceType uint8
const ( AppearenceTypeNormal AppearanceType = iota AppearenceTypeRollover AppearenceTypeDown )
type Array ¶
type Array struct { pdf.BaseObject // contains filtered or unexported fields }
func (*Array) AppendIndirect ¶
func (*Array) AppendIndirectSafe ¶
func (*Array) Kind ¶
func (array *Array) Kind() ObjectKind
func (*Array) NumObjects ¶
type BlendMode ¶
type BlendMode uint8
const ( BlendModeNormal BlendMode = iota BlendModeMultiply BlendModeScreen BlendModeOverlay BlendModeDarken BlendModeLighten BlendModeColorDodge BlendModeColorBurn BlendModeHardLight BlendModeSoftLight BlendModeDifference BlendModeExclusion BlendModeHue BlendModeSaturation BlendModeColor BlendModeLuminosity )
type CIDToGIDMap ¶
type CIDToGIDMap []struct { CID, GID uint }
CIDToGIDMap is a backing storage for a CID to GID map.
It must preserve ordering.
type CanvasObject ¶
type CanvasObject interface { }
type DataContainer ¶
type Dictionary ¶
type Dictionary struct { pdf.BaseObject // contains filtered or unexported fields }
Dictionary is the PDF Dictionary data type.
func (*Dictionary) AddKey ¶
func (d *Dictionary) AddKey(name pdf.Name, obj Object)
AddKey adds key to the dictionary.
func (*Dictionary) AddKeyIndirect ¶
func (d *Dictionary) AddKeyIndirect(name pdf.Name, obj Object) error
AddKeyIndirect adds key to the dictionary.
func (*Dictionary) Copy ¶
func (d *Dictionary) Copy() (Object, error)
func (*Dictionary) Int ¶
func (d *Dictionary) Int(name pdf.Name, defval int64) int64
Int finds an object and converts it to int64.
func (*Dictionary) Key ¶
func (d *Dictionary) Key(name pdf.Name) Object
Key finds an object in the dictionry. Nil is returned if the key does not exist.
func (*Dictionary) Kind ¶
func (d *Dictionary) Kind() ObjectKind
Kind returns the kind of the PDFObject.
func (*Dictionary) MarshalPDF ¶
func (d *Dictionary) MarshalPDF(w *pdf.Writer) error
type DocumentOptionFunc ¶
type DocumentOptionFunc func(doc *MemDocument)
func WithAuthor ¶
func WithAuthor(name string) DocumentOptionFunc
func WithCreator ¶
func WithCreator(name string) DocumentOptionFunc
func WithKeyword ¶
func WithKeyword(keywords ...string) DocumentOptionFunc
func WithSubjects ¶
func WithSubjects(subj string) DocumentOptionFunc
func WithTitle ¶
func WithTitle(title string) DocumentOptionFunc
type EncodingMapType ¶
type EncodingMapType uint8
const ( // PDFEncodingMapTypeIndeterminate is for // indeterminate map type, such as identity // encodings. EncodingMapTypeIndeterminate EncodingMapType = iota // PDFEncodingMapTypeSimple is for a legacy // encoding, such as built-in or difference. EncodingMapTypeSimple // PDFEncodingMapTypeCMap is for proper // CMap encoding or pre-defined CMap names. EncodingMapTypeCMap )
type ExportFormat ¶
type ExportFormat uint8
const ( ExportFormatPNG ExportFormat = 1 ExportFormatJPEG ExportFormat = 2 )
type FilterType ¶
type FilterType uint8
const ( FilterTypeNone FilterType = iota FilterTypeASCIIHexDecode FilterTypeASCII85Decode FilterTypeLZWDecode FilterTypeFlateDecode FilterTypeRunLengthDecode FilterTypeCCITTFaxDecode FilterTypeJBIG2Decode FilterTypeDCTDecode FilterTypeJPXDecode FilterTypeCrypt )
type FontAutoSelectBehavior ¶
type FontAutoSelectBehavior uint8
const ( FontAutoSelectBehaviorNone FontAutoSelectBehavior = iota FontAutoSelectBehaviorStandard14 FontAutoSelectBehaviorStandard14Alt )
type FontCreateFlag ¶
type FontCreateFlag uint8
const ( FontCreateFlagNone FontCreateFlag = 0 FontCreateFlagDontEmbed FontCreateFlag = 1 << (iota - 1) FontCreateFlagDontSubset FontCreateFlagPreferNonCID )
type FontDescriptorFlag ¶
type FontDescriptorFlag uint32
const ( FontDescriptorFlagNone FontDescriptorFlag = 0 FontDescriptorFlagFixedPitch FontDescriptorFlag = 1 << (iota - 1) FontDescriptorFlagSerif FontDescriptorFlagSymbolic FontDescriptorFlagScript FontDescriptorFlagNonSymbolic FontDescriptorFlag = 1 << iota FontDescriptorFlagItalic FontDescriptorFlagAllCap FontDescriptorFlag = 1 << (iota + 9) FontDescriptorFlagSmallCap FontDescriptorFlagForceBold )
type FontFileType ¶
type FontFileType uint8
const ( FontFileTypeUnknown FontFileType = iota FontFileTypeType1 FontFileTypeType1CCF FontFileTypeCIDType1 FontFileTypeType3 FontFileTypeTrueType FontFileTypeOpenType )
type FontMatchBehaviorFlag ¶
type FontMatchBehaviorFlag uint8
const ( FontMatchBehaviorFlagNone FontMatchBehaviorFlag = 0 FontMatchBehaviorFlagNormalizePattern FontMatchBehaviorFlag = 1 FontMatchBehaviorFlagMatchPostScriptName FontMatchBehaviorFlag = 2 )
type FontStretch ¶
type FontStretch uint8
const ( FontStretchUnknown FontStretch = iota FontStretchUltraCondensed FontStretchExtraCondensed FontStretchCondensed FontStretchSemiCondensed FontStretchNormal FontStretchSemiExpanded FontStretchExpanded FontStretchExtraExpanded FontStretchUltraExpanded )
type Generation ¶
type Generation = pdf.Generation
type GlyphAccess ¶
type GlyphAccess uint8
const ( GlyphAccessWidth GlyphAccess = 1 GlyphAccessFontProgram GlyphAccess = 2 )
type HighlightingMode ¶
type HighlightingMode uint8
const ( HighlightingModeUnknown HighlightingMode = iota HighlightingModeNone HighlightingModeInvert HighlightingModeInvertOutline HighlightingModePush )
type HorizontalAlignment ¶
type HorizontalAlignment uint8
const ( HorizontalAlignmentLeft HorizontalAlignment = iota HorizontalAlignmentCenter HorizontalAlignmentRight )
type IndirectObjectList ¶
type IndirectObjectList struct{}
func (*IndirectObjectList) AddFreeObject ¶
func (list *IndirectObjectList) AddFreeObject(obj Object)
func (*IndirectObjectList) AddObjectStream ¶
func (list *IndirectObjectList) AddObjectStream(objNum int)
func (*IndirectObjectList) Document ¶
func (list *IndirectObjectList) Document() *Document
func (*IndirectObjectList) PushObject ¶
func (list *IndirectObjectList) PushObject(obj Object)
func (*IndirectObjectList) SafeAddFreeObject ¶
func (list *IndirectObjectList) SafeAddFreeObject(obj Object)
type InfoInitial ¶
type InfoInitial uint8
const ( InfoInitialNone InfoInitial = iota InfoInitialWriteCreationTime InfoInitialWriteModificationTime InfoInitialWriteProducer )
type LineCapStyle ¶
type LineCapStyle uint8
const ( LineCapStyleButt LineCapStyle = iota LineCapStyleRound LineCapStyleSquare )
type LineJoinStyle ¶
type LineJoinStyle uint8
const ( LineJoinStyleMiter LineJoinStyle = iota LineJoinStyleRound LineJoinStyleBevel )
type MemDocument ¶
type MemDocument struct { Metadata Metadata // contains filtered or unexported fields }
func NewMemDocument ¶
func NewMemDocument(options ...DocumentOptionFunc) *MemDocument
func (*MemDocument) AddPage ¶
func (doc *MemDocument) AddPage(size PageSize) *Page
func (*MemDocument) FindFont ¶
func (doc *MemDocument) FindFont(name string) *Font
func (*MemDocument) SaveToFile ¶
func (doc *MemDocument) SaveToFile(filename string) error
type ObjectKind ¶
type ObjectKind = pdf.ObjectKind
type Operator ¶
type Operator uint8
const ( OperatorUnknown Operator = iota // ISO 32008-1:2008 Table 51 – Operator Categories // General graphics state Operatorw OperatorJ Operatorj OperatorM Operatord Operatorri Operatori Operatorgs // Special graphics state Operatorq OperatorQ Operatorcm // Path construction Operatorm Operatorl Operatorc Operatorv Operatory Operatorh Operatorre // Path painting OperatorS Operators Operatorf OperatorF OperatorfStar OperatorB OperatorBStar Operatorb OperatorbStar Operatorn // Clipping paths OperatorW OperatorWStar // Text objects OperatorBT OperatorET // Text state OperatorTc OperatorTw OperatorTz OperatorTL OperatorTf OperatorTr OperatorTs // Text positioning OperatorTd OperatorTD OperatorTm OperatorTStar // Text showing OperatorTj OperatorTJ OperatorQuote OperatorDoubleQuote // Type 3 fonts Operatord0 Operatord1 // Color OperatorCS Operatorcs OperatorSC OperatorSCN Operatorsc Operatorscn OperatorG Operatorg OperatorRG Operatorrg OperatorK Operatork // Shading patterns Operatorsh // Inline images OperatorBI OperatorID OperatorEI // XObjects OperatorDo // Marked content OperatorMP OperatorDP OperatorBMC OperatorBDC OperatorEMC // Compatibility OperatorBX OperatorEX )
type PDFVersion ¶
type PageSize ¶
func PageSizeA0 ¶
func PageSizeA0() PageSize
func PageSizeA1 ¶
func PageSizeA1() PageSize
func PageSizeA2 ¶
func PageSizeA2() PageSize
func PageSizeA3 ¶
func PageSizeA3() PageSize
func PageSizeA4 ¶
func PageSizeA4() PageSize
func PageSizeA5 ¶
func PageSizeA5() PageSize
func PageSizeA6 ¶
func PageSizeA6() PageSize
func PageSizeLegal ¶
func PageSizeLegal() PageSize
func PageSizeLetter ¶
func PageSizeLetter() PageSize
func PageSizeTabloid ¶
func PageSizeTabloid() PageSize
type Painter ¶
type Painter struct {
// contains filtered or unexported fields
}
func NewPainter ¶
func NewPainter(flags ...PainterFlag) *Painter
func (*Painter) FinishDrawing ¶
func (*Painter) SetCanvas ¶
func (p *Painter) SetCanvas(canvas CanvasObject)
type PainterFlag ¶
type PainterFlag func(*painterFlag)
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser reads a PDF file into memory. The file can be modifierd and written back using Writer. Most PDF features are supported.
func Parse ¶
func Parse( r Reader, options ...ParserOption, ) (*Parser, error)
Parse opens a PDF file and parses it.
If loadOnDemand is true all objects will be read from the file at the time they are accessed first. If false all the objects will be read immidiately. This is faster if you do not need the complete PDF file in memory.
func (*Parser) GetEncrypt ¶
GetEncrypt gives the encryption object from the parser.
func (*Parser) HasXRefStream ¶
HasXRefStream returns true if the file has XRef stream.
func (*Parser) IsEncrypted ¶
IsEncrypted returns true if the PDF file is encrypted.
func (*Parser) IsStrictParsing ¶
IsStrictParsing returns true if strict parsing mode is enabled.
func (*Parser) LoadOnDemand ¶
LoadOnDemand returns true if the LoadOnDemand option was applied for Parser.
func (*Parser) NumIncrementalUpdates ¶
NumIncrementalUpdates returns the number of incremental updates that have been applied to the last parsed PDF file.
The function returs 0 if there is no updade has been applied.
func (*Parser) Objects ¶
func (p *Parser) Objects() *IndirectObjectList
Objects returns a reference to the sorted internal objects list.
func (*Parser) PDFVersion ¶
func (p *Parser) PDFVersion() PDFVersion
PDFVersion returns the file format version of the PDF.
func (*Parser) TakeEncrypt ¶
TakeEncrypt gives the encryption object from the parser. The internal handle will be set to nil and the ownership of the object is given to the caller.
Only call this if yout need access to the encryption object.
func (*Parser) XRefOffset ¶
XRefOffset returns the offset to the XRef stream.
type ParserObject ¶
type ParserObject struct { *Dictionary Encrypt Encrypt }
func NewParserObject ¶
func NewParserObject(r Reader, offset int64, options ...ParserObjectOption) (*ParserObject, error)
func (*ParserObject) Parse ¶
func (obj *ParserObject) Parse() error
type ParserObjectOption ¶
type ParserObjectOption func(*ParserObject)
func DelayedLoad ¶
func DelayedLoad(delayed bool) ParserObjectOption
func WithDocument ¶
func WithDocument(doc *Document) ParserObjectOption
func WithReference ¶
func WithReference(ref *Reference) ParserObjectOption
type ParserOption ¶
type ParserOption func(*Parser)
ParserOption is used for PDF file Parser.
func DontIgnoreBrokenObjects ¶
func DontIgnoreBrokenObjects() ParserOption
DontIgnoreBrokenObjects tells the parser to not ignore broken object, i.e. XRef entries that do not point to valid objects.
func LoadOnDemand ¶
func LoadOnDemand() ParserOption
LoadOnDemand tells Parser to read object at the time they are accessed first.
This is faster if you do not need the complete PDF file in memory.
func StrictMode ¶
func StrictMode() ParserOption
StrictMode enables strict parsing mode.
If you enable strict parsing, Parse will fail on a few more common PDF failuers. Please note that Parser is by default very strict already and does not recover from e.g. wrong XREF tables.
type PixelFormat ¶
type PixelFormat uint8
const ( PixelFormatUnknown PixelFormat = 0 PixelFormatGrayscale PixelFormatRGB24 PixelFormatBGR24 PixelFormatRGBA PixelFormatBGRA PixelFormatARGB PixelFormatABGR )
type Reader ¶
type Reader interface { io.ReadSeeker }
type RenderingIntent ¶
type RenderingIntent uint8
const ( RenderingIntentAbsoluteColorimetric RenderingIntent = iota RenderingIntentRelativeColorimetric RenderingIntentPerceptual RenderingIntentSaturation )
type SaveOption ¶
type SaveOption uint8
const ( SaveOptionNone SaveOption = 0 SaveOptionReserved1 SaveOption = 1 << (iota - 1) SaveOptionReserved2 SaveOptionNoFlateCompress SaveOptionNoCollectGarbage SaveOptionNoModifyDateUpdate SaveOptionClean )
type Standard14FontType ¶
type Standard14FontType uint8
const ( Standart14FontTypeUnknown Standard14FontType = iota Standart14FontTypeTimesRoman Standart14FontTypeTimesItalic Standart14FontTypeTimesBold Standart14FontTypeTimesBoldItalic Standart14FontTypeHelvetica Standart14FontTypeHelveticaOblique Standart14FontTypeHelveticaBold Standart14FontTypeHelveticaBoldOblique Standart14FontTypeCourier Standart14FontTypeCourierOblique Standart14FontTypeCourierBold Standart14FontTypeCourierBoldOblique Standart14FontTypeSymbol Standart14FontTypeZapfDingbats )
type String ¶
type String struct { pdf.BaseObject // contains filtered or unexported fields }
func (*String) Kind ¶
func (s *String) Kind() ObjectKind
func (*String) State ¶
func (s *String) State() StringState
func (*String) UnmarshalBinary ¶
type StringEncoding ¶
type StringEncoding uint8
const ( StringEncodingUTF8 StringEncoding = iota StringEncodingUTF16BE StringEncodingUTF16LE StringEncodingPDFDoc )
type StringState ¶
type StringState uint8
const ( // StringStateRawBuffer is for an unvaluated // raw buffer string. StringStateRawBuffer StringState = iota // StringStateASCII is for both an ASCII // and PDFDocEncoding charsets. StringStateASCII // StringStateDocEncoding is for strings // that use the whole PDFDocEncoding charset. StringStateDocEncoding // StringStateUnicode is for strings that // use the whole Unicode charset. StringStateUnicode )
type StrokeStyle ¶
type StrokeStyle uint8
const ( StrokeStyleSolid StrokeStyle = iota StrokeStyleDash StrokeStyleDot StrokeStyleDashDot StrokeStyleDashDotDot )
type TextExtractFlags ¶
type TextExtractFlags uint8
const ( TextExtractFlagNone TextExtractFlags = 0 TextExtractFlagIgnoreCase TextExtractFlags = 1 << (iota - 1) TextExtractFlagKeepWhiteTokens TextExtractFlagTokenizeWords TextExtractFlagMatchWholeWord TextExtractFlagRegexPattern TextExtractFlagComputeBoundingBox TextExtractFlagRawCoordinates TextExtractFlagExtractSubstring )
type TextRenderingMode ¶
type TextRenderingMode uint8
const ( TextRenderingModeFill TextRenderingMode = 0 TextRenderingModeStroke TextRenderingModeFillStroke TextRenderingModeInvisible TextRenderingModeFillAddToClipPath TextRenderingModeStrokeAddToClipPath TextRenderingModeFillStrokeAddToClipPath TextRenderingModeAddToClipPath )
type Tokenizer ¶
type Tokenizer struct {
// contains filtered or unexported fields
}
func NewTokenizer ¶
func NewTokenizer() *Tokenizer
func (*Tokenizer) ReadNextNumber ¶
type VerticalAlignment ¶
type VerticalAlignment uint8
const ( VerticalAligmentTop VerticalAlignment = iota VerticalAligmentCenter VerticalAligmentBottom )
type XObjectType ¶
type XObjectType uint8
const ( XObjectTypeUnknown XObjectType = iota XObjectTypeForm XObjectTypeImage XObjectTypePostScript )
type XRefEntryCompressed ¶
type XRefEntryFree ¶
type XRefEntryFree struct { ObjectNumber int Generation Generation }
type XRefEntryInUse ¶
type XRefEntryInUse struct { Offset int64 Generation Generation }
type XRefStreamParser ¶
type XRefStreamParser struct {
Object
}
func NewXRefStreamParser ¶
func NewXRefStreamParser(doc *Document, r Reader, entries *[]XRefEntry) (*XRefStreamParser, error)
func (*XRefStreamParser) ParseStream ¶
func (parser *XRefStreamParser) ParseStream() error
Source Files ¶
- array.go
- bool.go
- canvas.go
- contents.go
- data_container.go
- decl.go
- dictionary.go
- encrypt.go
- errors.go
- font.go
- indirect_object_list.go
- memory_document.go
- null.go
- number.go
- object.go
- page.go
- page_size.go
- painter.go
- parser.go
- parser_object.go
- parser_option.go
- raw_data.go
- string.go
- tokenizer.go
- write.go
- writer.go
- xref_entry.go
- xref_stream_parser.go