pdflib

package module
v2.0.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

README

pdflib

C bindings to pdflib for Go (Golang).

Installation
go get github.com/abcum/pdflib
Building

go install -tags 'pdflib8' 

go install -tags 'pdflib9' 
Building for Alpine Linux
go build -tags 'alpine' ... 
Requirements
  • Golang >= 1.5

For PDFlib licensing and copyright information, click here.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PDFlib

type PDFlib struct {
	// contains filtered or unexported fields
}

PDFlib represents a PDFlib instance.

func New

func New() *PDFlib

New creates a new PDFlb instance.

func (*PDFlib) AddNamedDest

func (p *PDFlib) AddNamedDest(name, options string) error

AddNamedDest ...

func (*PDFlib) AddPathPoint

func (p *PDFlib) AddPathPoint(path int, x, y float64, kind, options string) (int, error)

AddPathPoint ...

func (*PDFlib) AddTableCell

func (p *PDFlib) AddTableCell(table, col, row int, text, options string) (int, error)

AddTableCell ...

func (*PDFlib) AddTextflow

func (p *PDFlib) AddTextflow(textflow int, text, options string) (int, error)

AddTextflow ...

func (*PDFlib) AddThumbnail

func (p *PDFlib) AddThumbnail(image int) error

AddThumbnail ...

func (*PDFlib) Align

func (p *PDFlib) Align(x, y float64) error

Align ...

func (*PDFlib) Arc

func (p *PDFlib) Arc(x, y, r, alpha, beta float64) error

Arc ...

func (*PDFlib) Arcn

func (p *PDFlib) Arcn(x, y, r, alpha, beta float64) error

Arcn ...

func (*PDFlib) BeginDocument

func (p *PDFlib) BeginDocument(filename, options string) (int, error)

BeginDocument ...

func (*PDFlib) BeginFont

func (p *PDFlib) BeginFont(fontname string, a, b, c, d, e, f float64, options string) error

BeginFont ...

func (*PDFlib) BeginGlyph

func (p *PDFlib) BeginGlyph(glyphname string, wx, llx, lly, urx, ury float64) error

BeginGlyph ...

func (*PDFlib) BeginItem

func (p *PDFlib) BeginItem(tag, options string) (int, error)

BeginItem ..

func (*PDFlib) BeginLayer

func (p *PDFlib) BeginLayer(layer int) error

BeginLayer ..

func (*PDFlib) BeginPageExt

func (p *PDFlib) BeginPageExt(w, h float64, options string) error

BeginPageExt adds a new page to the document, and specify various options.

func (*PDFlib) BeginPattern

func (p *PDFlib) BeginPattern(w, h, xstep, ystep float64, painttype int) (int, error)

BeginPattern ..

func (*PDFlib) BeginTemplate

func (p *PDFlib) BeginTemplate(w, h float64, options string) (int, error)

BeginTemplate ...

func (*PDFlib) Circle

func (p *PDFlib) Circle(x, y, r float64) error

Circle ...

func (*PDFlib) CircularArc

func (p *PDFlib) CircularArc(x1, y1, x2, y2 float64) error

CircularArc ...

func (*PDFlib) Clip

func (p *PDFlib) Clip() error

Clip ...

func (*PDFlib) CloseFont

func (p *PDFlib) CloseFont(font int) error

CloseFont closes an open font handle which has not yet been used in the document.

func (*PDFlib) CloseGraphics

func (p *PDFlib) CloseGraphics(graphics int) error

CloseGraphics closes vector graphics.

func (*PDFlib) CloseImage

func (p *PDFlib) CloseImage(image int) error

CloseImage closes an image ...

func (*PDFlib) ClosePath

func (p *PDFlib) ClosePath() error

ClosePath ...

func (*PDFlib) ClosePathFillStroke

func (p *PDFlib) ClosePathFillStroke() error

ClosePathFillStroke ...

func (*PDFlib) ClosePathStroke

func (p *PDFlib) ClosePathStroke() error

ClosePathStroke ...

func (*PDFlib) ClosePdiDocument

func (p *PDFlib) ClosePdiDocument(doc int) error

ClosePdiDocument ...

func (*PDFlib) ClosePdiPage

func (p *PDFlib) ClosePdiPage(page int) error

ClosePdiPage ...

func (*PDFlib) Concat

func (p *PDFlib) Concat(a, b, c, d, e, f float64) error

Concat ...

func (*PDFlib) ContinueText

func (p *PDFlib) ContinueText(text string) error

ContinueText ...

func (*PDFlib) Create3dView

func (p *PDFlib) Create3dView(username, options string) error

Create3dView ...

func (*PDFlib) CreateAction

func (p *PDFlib) CreateAction(kind, options string) (int, error)

CreateAction ...

func (*PDFlib) CreateAnnotation

func (p *PDFlib) CreateAnnotation(llx, llr, urx, ury float64, kind, options string) error

CreateAnnotation ...

func (*PDFlib) CreateBookmark

func (p *PDFlib) CreateBookmark(text, options string) (int, error)

CreateBookmark ...

func (*PDFlib) CreateField

func (p *PDFlib) CreateField(llx, lly, urx, ury float64, name, kind, options string) error

CreateField ...

func (*PDFlib) CreateFieldgroup

func (p *PDFlib) CreateFieldgroup(name, options string) error

CreateFieldgroup ...

func (*PDFlib) CreateGstate

func (p *PDFlib) CreateGstate(options string) (int, error)

CreateGstate ...

func (*PDFlib) CreatePvf

func (p *PDFlib) CreatePvf(filename string, data []byte, options string) error

CreatePvf ...

func (*PDFlib) CreateTextflow

func (p *PDFlib) CreateTextflow(text, options string) (int, error)

CreateTextflow ...

func (*PDFlib) CurveTo

func (p *PDFlib) CurveTo(x1, y1, x2, y2, x3, y3 float64) error

CurveTo ...

func (*PDFlib) DefineLayer

func (p *PDFlib) DefineLayer(name, options string) (int, error)

DefineLayer ...

func (*PDFlib) Delete

func (p *PDFlib) Delete()

Delete ...

func (*PDFlib) DeletePath

func (p *PDFlib) DeletePath(path int) error

DeletePath ...

func (*PDFlib) DeletePvf

func (p *PDFlib) DeletePvf(filename string) error

DeletePvf ...

func (*PDFlib) DeleteTable

func (p *PDFlib) DeleteTable(table int, options string) error

DeleteTable ...

func (*PDFlib) DeleteTextflow

func (p *PDFlib) DeleteTextflow(textflow int) error

DeleteTextflow ...

func (*PDFlib) DrawPath

func (p *PDFlib) DrawPath(path int, x, y float64, options string) error

DrawPath ...

func (*PDFlib) Ellipse

func (p *PDFlib) Ellipse(x, y, rx, ry float64) error

Ellipse ...

func (*PDFlib) EndDocument

func (p *PDFlib) EndDocument(options string) error

EndDocument ...

func (*PDFlib) EndFont

func (p *PDFlib) EndFont() error

EndFont ...

func (*PDFlib) EndGlyph

func (p *PDFlib) EndGlyph() error

EndGlyph ...

func (*PDFlib) EndItem

func (p *PDFlib) EndItem(id int) error

EndItem ...

func (*PDFlib) EndLayer

func (p *PDFlib) EndLayer() error

EndLayer ...

func (*PDFlib) EndMc

func (p *PDFlib) EndMc() error

EndMc ...

func (*PDFlib) EndPageExt

func (p *PDFlib) EndPageExt(options string) error

EndPageExt ...

func (*PDFlib) EndPath

func (p *PDFlib) EndPath() error

EndPath ...

func (*PDFlib) EndPattern

func (p *PDFlib) EndPattern() error

EndPattern ...

func (*PDFlib) EndTemplateExt

func (p *PDFlib) EndTemplateExt(w, h float64) error

EndTemplateExt ...

func (*PDFlib) Fill

func (p *PDFlib) Fill() error

Fill ...

func (*PDFlib) FillImageblock

func (p *PDFlib) FillImageblock(page int, blockname string, image int, options string) (int, error)

FillImageblock ...

func (*PDFlib) FillPdfblock

func (p *PDFlib) FillPdfblock(page int, blockname string, content int, options string) (int, error)

FillPdfblock ...

func (*PDFlib) FillStroke

func (p *PDFlib) FillStroke() error

FillStroke ...

func (*PDFlib) FillTextblock

func (p *PDFlib) FillTextblock(page int, blockname, text, options string) (int, error)

FillTextblock ...

func (*PDFlib) FitGraphics

func (p *PDFlib) FitGraphics(graphics int, x, y float64, options string) error

FitGraphics places vector graphics on a content stream, subject to various options.

func (*PDFlib) FitImage

func (p *PDFlib) FitImage(image int, x, y float64, options string) error

FitImage ...

func (*PDFlib) FitPdiPage

func (p *PDFlib) FitPdiPage(page int, x, y float64, options string) error

FitPdiPage ...

func (*PDFlib) FitTable

func (p *PDFlib) FitTable(table int, llx, lly, urx, ury float64, options string) (string, error)

FitTable ...

func (*PDFlib) FitTextflow

func (p *PDFlib) FitTextflow(textflow int, llx, lly, urx, ury float64, options string) (string, error)

FitTextflow ...

func (*PDFlib) FitTextline

func (p *PDFlib) FitTextline(text string, x, y float64, options string) error

FitTextline ...

func (*PDFlib) GetBuffer

func (p *PDFlib) GetBuffer() ([]byte, int, error)

GetBuffer ...

func (*PDFlib) GetParameter

func (p *PDFlib) GetParameter(key string, modifier float64) (string, error)

GetParameter ...

func (*PDFlib) GetValue

func (p *PDFlib) GetValue(key string, modifier float64) (float64, error)

GetValue ...

func (*PDFlib) InfoFont

func (p *PDFlib) InfoFont(font int, keyword, options string) (float64, error)

InfoFont ...

func (*PDFlib) InfoGraphics

func (p *PDFlib) InfoGraphics(graphics int, keyword, options string) (float64, error)

InfoGraphics formats vector graphics and query metrics and other properties.

func (*PDFlib) InfoImage

func (p *PDFlib) InfoImage(image int, keyword, options string) (float64, error)

InfoImage ...

func (*PDFlib) InfoMatchbox

func (p *PDFlib) InfoMatchbox(boxname string, num int, keyword string) (float64, error)

InfoMatchbox ...

func (*PDFlib) InfoPath

func (p *PDFlib) InfoPath(path int, keyword, options string) (float64, error)

InfoPath ...

func (*PDFlib) InfoPdiPage

func (p *PDFlib) InfoPdiPage(page int, keyword, options string) (float64, error)

InfoPdiPage ...

func (*PDFlib) InfoTable

func (p *PDFlib) InfoTable(table int, keyword string) (float64, error)

InfoTable ...

func (*PDFlib) InfoTextflow

func (p *PDFlib) InfoTextflow(textflow int, keyword string) (float64, error)

InfoTextflow ...

func (*PDFlib) InfoTextline

func (p *PDFlib) InfoTextline(text, keyword, options string) (float64, error)

InfoTextline ...

func (*PDFlib) InitGraphics

func (p *PDFlib) InitGraphics() error

InitGraphics ...

func (*PDFlib) LineTo

func (p *PDFlib) LineTo(x, y float64) error

LineTo ...

func (*PDFlib) Load3dData

func (p *PDFlib) Load3dData(filename, options string) (int, error)

Load3dData ...

func (*PDFlib) LoadFont

func (p *PDFlib) LoadFont(fontname, encoding, options string) (int, error)

LoadFont ...

func (*PDFlib) LoadGraphics

func (p *PDFlib) LoadGraphics(graphicstype, filename, options string) (int, error)

LoadGraphics opens a disk-based or virtual vector graphics file subject to various options

func (*PDFlib) LoadIccProfile

func (p *PDFlib) LoadIccProfile(profilename, options string) (int, error)

LoadIccProfile ...

func (*PDFlib) LoadImage

func (p *PDFlib) LoadImage(imagetype, filename, options string) (int, error)

LoadImage ...

func (*PDFlib) MakeSpotColor

func (p *PDFlib) MakeSpotColor(spotname string) (int, error)

MakeSpotColor ...

func (*PDFlib) McPoint

func (p *PDFlib) McPoint(tag, options string) error

McPoint ...

func (*PDFlib) MoveTo

func (p *PDFlib) MoveTo(x, y float64) error

MoveTo ...

func (*PDFlib) OpenPdiDocument

func (p *PDFlib) OpenPdiDocument(filename, options string) (int, error)

OpenPdiDocument ...

func (*PDFlib) OpenPdiPage

func (p *PDFlib) OpenPdiPage(doc, page int, options string) (int, error)

OpenPdiPage ...

func (*PDFlib) PcosGetNumber

func (p *PDFlib) PcosGetNumber(doc int, path string) (float64, error)

PcosGetNumber ...

func (*PDFlib) PcosGetStream

func (p *PDFlib) PcosGetStream(doc int, options, path string) (string, error)

PcosGetStream ...

func (*PDFlib) PcosGetString

func (p *PDFlib) PcosGetString(doc int, path string) (string, error)

PcosGetString ...

func (*PDFlib) PocaDelete

func (p *PDFlib) PocaDelete(container int, options string) error

PocaDelete ...

func (*PDFlib) PocaInsert

func (p *PDFlib) PocaInsert(container int, options string) error

PocaInsert ...

func (*PDFlib) PocaNew

func (p *PDFlib) PocaNew(options string) (int, error)

PocaNew ...

func (*PDFlib) PocaRemove

func (p *PDFlib) PocaRemove(container int, options string) error

PocaRemove ...

func (*PDFlib) ProcessPdi

func (p *PDFlib) ProcessPdi(doc, page int, options string) (int, error)

ProcessPdi ...

func (*PDFlib) RCurveTo

func (p *PDFlib) RCurveTo(x1, y1, x2, y2, x3, y3 float64) error

RCurveTo ...

func (*PDFlib) Rect

func (p *PDFlib) Rect(x, y, w, h float64) error

Rect ...

func (*PDFlib) Restore

func (p *PDFlib) Restore() error

Restore ...

func (*PDFlib) ResumePage

func (p *PDFlib) ResumePage(options string) error

ResumePage ...

func (*PDFlib) Rotate

func (p *PDFlib) Rotate(phi float64) error

Rotate ...

func (*PDFlib) Save

func (p *PDFlib) Save() error

Save ...

func (*PDFlib) Scale

func (p *PDFlib) Scale(sx, sy float64) error

Scale ...

func (*PDFlib) SetColor

func (p *PDFlib) SetColor(fstype, colorspace string, c1, c2, c3, c4 float64) error

SetColor ...

func (*PDFlib) SetDash

func (p *PDFlib) SetDash(b, w float64) error

SetDash ...

func (*PDFlib) SetDashPattern

func (p *PDFlib) SetDashPattern(options string) error

SetDashPattern ...

func (*PDFlib) SetFlat

func (p *PDFlib) SetFlat(flatness float64) error

SetFlat ...

func (*PDFlib) SetFont

func (p *PDFlib) SetFont(font int, fontsize float64) error

SetFont ...

func (*PDFlib) SetGraphicsOption

func (p *PDFlib) SetGraphicsOption(options string) error

SetGraphicsOption sets one or more graphics appearance options.

func (*PDFlib) SetGstate

func (p *PDFlib) SetGstate(gstate int) error

SetGstate ...

func (*PDFlib) SetInfo

func (p *PDFlib) SetInfo(key, value string) error

SetInfo ...

func (*PDFlib) SetLayerDependency

func (p *PDFlib) SetLayerDependency(kind, options string) error

SetLayerDependency ...

func (*PDFlib) SetLinecap

func (p *PDFlib) SetLinecap(linecap int) error

SetLinecap ...

func (*PDFlib) SetLinejoin

func (p *PDFlib) SetLinejoin(linejoin int) error

SetLinejoin ...

func (*PDFlib) SetLinewidth

func (p *PDFlib) SetLinewidth(width float64) error

SetLinewidth ...

func (*PDFlib) SetMatrix

func (p *PDFlib) SetMatrix(a, b, c, d, e, f float64) error

SetMatrix ...

func (*PDFlib) SetMiterLimit

func (p *PDFlib) SetMiterLimit(miter float64) error

SetMiterLimit ...

func (*PDFlib) SetOption

func (p *PDFlib) SetOption(options string) error

SetOption ...

func (*PDFlib) SetParameter

func (p *PDFlib) SetParameter(key, value string) error

SetParameter ...

func (*PDFlib) SetTextPos

func (p *PDFlib) SetTextPos(x, y float64) error

SetTextPos ...

func (*PDFlib) SetValue

func (p *PDFlib) SetValue(key string, value float64) error

SetValue ...

func (*PDFlib) Shading

func (p *PDFlib) Shading(shtype string, x0, y0, x1, y1, c1, c2, c3, c4 float64, options string) (int, error)

Shading ...

func (*PDFlib) ShadingPattern

func (p *PDFlib) ShadingPattern(shading int, options string) (int, error)

ShadingPattern ...

func (*PDFlib) Shfill

func (p *PDFlib) Shfill(shading int) error

Shfill ...

func (*PDFlib) Show

func (p *PDFlib) Show(text string) error

Show ...

func (*PDFlib) ShowXY

func (p *PDFlib) ShowXY(text string, x, y float64) error

ShowXY ...

func (*PDFlib) Skew

func (p *PDFlib) Skew(alpha, beta float64) error

Skew ...

func (*PDFlib) StringWidth

func (p *PDFlib) StringWidth(text string, font int, fontsize float64) (float64, error)

StringWidth ...

func (*PDFlib) Stroke

func (p *PDFlib) Stroke() error

Stroke ...

func (*PDFlib) SuspendPage

func (p *PDFlib) SuspendPage(options string) error

SuspendPage ...

func (*PDFlib) Translate

func (p *PDFlib) Translate(tx, ty float64) error

Translate ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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