Versions in this module Expand all Collapse all v1 v1.0.0 May 5, 2017 Changes in this version + const CnProtectAnnotForms + const CnProtectCopy + const CnProtectModify + const CnProtectPrint + const FontFlagAllCap + const FontFlagFixedPitch + const FontFlagItalic + const FontFlagNonsymbolic + const FontFlagScript + const FontFlagSerif + const FontFlagSymbolic + const ForceBold + const SmallCap + func CompareBytes(sl1, sl2 []byte) (err error) + func ComparePDFFiles(file1Str, file2Str string) (err error) + func ComparePDFs(rdr1, rdr2 io.Reader) (err error) + func GenerateTemplateID() int64 + func MakeFont(fontFileStr, encodingFileStr, dstDirStr string, msgWriter io.Writer, ...) (err error) + func SetDefaultCatalogSort(flag bool) + func SetDefaultCompression(compress bool) + func SetDefaultCreationDate(tm time.Time) + func UnicodeTranslator(r io.Reader) (f func(string) string, err error) + func UnicodeTranslatorFromFile(fileStr string) (f func(string) string, err error) + type FontDescType struct + Ascent int + CapHeight int + Descent int + Flags int + FontBBox fontBoxType + ItalicAngle int + MissingWidth int + StemV int + type FontLoader interface + Open func(name string) (io.Reader, error) + type Fpdf struct + func New(orientationStr, unitStr, sizeStr, fontDirStr string) (f *Fpdf) + func NewCustom(init *InitType) (f *Fpdf) + func (f *Fpdf) AddFont(familyStr, styleStr, fileStr string) + func (f *Fpdf) AddFontFromBytes(familyStr string, styleStr string, jsonFileBytes []byte, zFileBytes []byte) + func (f *Fpdf) AddFontFromReader(familyStr, styleStr string, r io.Reader) + func (f *Fpdf) AddLayer(name string, visible bool) (layerID int) + func (f *Fpdf) AddLink() int + func (f *Fpdf) AddPage() + func (f *Fpdf) AddPageFormat(orientationStr string, size SizeType) + func (f *Fpdf) AliasNbPages(aliasStr string) + func (f *Fpdf) Arc(x, y, rx, ry, degRotate, degStart, degEnd float64, styleStr string) + func (f *Fpdf) ArcTo(x, y, rx, ry, degRotate, degStart, degEnd float64) + func (f *Fpdf) BeginLayer(id int) + func (f *Fpdf) Beziergon(points []PointType, styleStr string) + func (f *Fpdf) Bookmark(txtStr string, level int, y float64) + func (f *Fpdf) Cell(w, h float64, txtStr string) + func (f *Fpdf) CellFormat(w, h float64, txtStr string, borderStr string, ln int, alignStr string, ...) + func (f *Fpdf) Cellf(w, h float64, fmtStr string, args ...interface{}) + func (f *Fpdf) Circle(x, y, r float64, styleStr string) + func (f *Fpdf) ClearError() + func (f *Fpdf) ClipCircle(x, y, r float64, outline bool) + func (f *Fpdf) ClipEllipse(x, y, rx, ry float64, outline bool) + func (f *Fpdf) ClipEnd() + func (f *Fpdf) ClipPolygon(points []PointType, outline bool) + func (f *Fpdf) ClipRect(x, y, w, h float64, outline bool) + func (f *Fpdf) ClipRoundedRect(x, y, w, h, r float64, outline bool) + func (f *Fpdf) ClipText(x, y float64, txtStr string, outline bool) + func (f *Fpdf) Close() + func (f *Fpdf) ClosePath() + func (f *Fpdf) CreateTemplate(fn func(*Tpl)) Template + func (f *Fpdf) CreateTemplateCustom(corner PointType, size SizeType, fn func(*Tpl)) Template + func (f *Fpdf) Curve(x0, y0, cx, cy, x1, y1 float64, styleStr string) + func (f *Fpdf) CurveBezierCubic(x0, y0, cx0, cy0, cx1, cy1, x1, y1 float64, styleStr string) + func (f *Fpdf) CurveBezierCubicTo(cx0, cy0, cx1, cy1, x, y float64) + func (f *Fpdf) CurveCubic(x0, y0, cx0, cy0, x1, y1, cx1, cy1 float64, styleStr string) + func (f *Fpdf) CurveTo(cx, cy, x, y float64) + func (f *Fpdf) DrawPath(styleStr string) + func (f *Fpdf) Ellipse(x, y, rx, ry, degRotate float64, styleStr string) + func (f *Fpdf) EndLayer() + func (f *Fpdf) Err() bool + func (f *Fpdf) Error() error + func (f *Fpdf) GetAlpha() (alpha float64, blendModeStr string) + func (f *Fpdf) GetCellMargin() float64 + func (f *Fpdf) GetConversionRatio() float64 + func (f *Fpdf) GetDrawColor() (int, int, int) + func (f *Fpdf) GetFillColor() (int, int, int) + func (f *Fpdf) GetFontDesc(familyStr, styleStr string) FontDescType + func (f *Fpdf) GetFontSize() (ptSize, unitSize float64) + func (f *Fpdf) GetImageInfo(imageStr string) (info *ImageInfoType) + func (f *Fpdf) GetLineWidth() float64 + func (f *Fpdf) GetMargins() (left, top, right, bottom float64) + func (f *Fpdf) GetPageSize() (width, height float64) + func (f *Fpdf) GetStringWidth(s string) float64 + func (f *Fpdf) GetTextColor() (int, int, int) + func (f *Fpdf) GetX() float64 + func (f *Fpdf) GetXY() (float64, float64) + func (f *Fpdf) GetY() float64 + func (f *Fpdf) HTMLBasicNew() (html HTMLBasicType) + func (f *Fpdf) Image(imageNameStr string, x, y, w, h float64, flow bool, tp string, link int, ...) + func (f *Fpdf) ImageOptions(imageNameStr string, x, y, w, h float64, flow bool, options ImageOptions, ...) + func (f *Fpdf) ImageTypeFromMime(mimeStr string) (tp string) + func (f *Fpdf) Line(x1, y1, x2, y2 float64) + func (f *Fpdf) LineTo(x, y float64) + func (f *Fpdf) LinearGradient(x, y, w, h float64, r1, g1, b1 int, r2, g2, b2 int, x1, y1, x2, y2 float64) + func (f *Fpdf) Link(x, y, w, h float64, link int) + func (f *Fpdf) LinkString(x, y, w, h float64, linkStr string) + func (f *Fpdf) Ln(h float64) + func (f *Fpdf) MoveTo(x, y float64) + func (f *Fpdf) MultiCell(w, h float64, txtStr, borderStr, alignStr string, fill bool) + func (f *Fpdf) Ok() bool + func (f *Fpdf) OpenLayerPane() + func (f *Fpdf) Output(w io.Writer) error + func (f *Fpdf) OutputAndClose(w io.WriteCloser) error + func (f *Fpdf) OutputFileAndClose(fileStr string) error + func (f *Fpdf) PageNo() int + func (f *Fpdf) PageSize(pageNum int) (wd, ht float64, unitStr string) + func (f *Fpdf) PointConvert(pt float64) (u float64) + func (f *Fpdf) PointToUnitConvert(pt float64) (u float64) + func (f *Fpdf) Polygon(points []PointType, styleStr string) + func (f *Fpdf) RadialGradient(x, y, w, h float64, r1, g1, b1 int, r2, g2, b2 int, x1, y1, x2, y2, r float64) + func (f *Fpdf) RawWriteBuf(r io.Reader) + func (f *Fpdf) RawWriteStr(str string) + func (f *Fpdf) Rect(x, y, w, h float64, styleStr string) + func (f *Fpdf) RegisterImage(fileStr, tp string) (info *ImageInfoType) + func (f *Fpdf) RegisterImageOptions(fileStr string, options ImageOptions) (info *ImageInfoType) + func (f *Fpdf) RegisterImageOptionsReader(imgName string, options ImageOptions, r io.Reader) (info *ImageInfoType) + func (f *Fpdf) RegisterImageReader(imgName, tp string, r io.Reader) (info *ImageInfoType) + func (f *Fpdf) SVGBasicWrite(sb *SVGBasicType, scale float64) + func (f *Fpdf) SetAcceptPageBreakFunc(fnc func() bool) + func (f *Fpdf) SetAlpha(alpha float64, blendModeStr string) + func (f *Fpdf) SetAuthor(authorStr string, isUTF8 bool) + func (f *Fpdf) SetAutoPageBreak(auto bool, margin float64) + func (f *Fpdf) SetCatalogSort(flag bool) + func (f *Fpdf) SetCellMargin(margin float64) + func (f *Fpdf) SetCompression(compress bool) + func (f *Fpdf) SetCreationDate(tm time.Time) + func (f *Fpdf) SetCreator(creatorStr string, isUTF8 bool) + func (f *Fpdf) SetDashPattern(dashArray []float64, dashPhase float64) + func (f *Fpdf) SetDisplayMode(zoomStr, layoutStr string) + func (f *Fpdf) SetDrawColor(r, g, b int) + func (f *Fpdf) SetError(err error) + func (f *Fpdf) SetErrorf(fmtStr string, args ...interface{}) + func (f *Fpdf) SetFillColor(r, g, b int) + func (f *Fpdf) SetFont(familyStr, styleStr string, size float64) + func (f *Fpdf) SetFontLoader(loader FontLoader) + func (f *Fpdf) SetFontLocation(fontDirStr string) + func (f *Fpdf) SetFontSize(size float64) + func (f *Fpdf) SetFontUnitSize(size float64) + func (f *Fpdf) SetFooterFunc(fnc func()) + func (f *Fpdf) SetHeaderFunc(fnc func()) + func (f *Fpdf) SetKeywords(keywordsStr string, isUTF8 bool) + func (f *Fpdf) SetLeftMargin(margin float64) + func (f *Fpdf) SetLineCapStyle(styleStr string) + func (f *Fpdf) SetLineJoinStyle(styleStr string) + func (f *Fpdf) SetLineWidth(width float64) + func (f *Fpdf) SetLink(link int, y float64, page int) + func (f *Fpdf) SetMargins(left, top, right float64) + func (f *Fpdf) SetProtection(actionFlag byte, userPassStr, ownerPassStr string) + func (f *Fpdf) SetRightMargin(margin float64) + func (f *Fpdf) SetSubject(subjectStr string, isUTF8 bool) + func (f *Fpdf) SetTextColor(r, g, b int) + func (f *Fpdf) SetTitle(titleStr string, isUTF8 bool) + func (f *Fpdf) SetTopMargin(margin float64) + func (f *Fpdf) SetX(x float64) + func (f *Fpdf) SetXY(x, y float64) + func (f *Fpdf) SetY(y float64) + func (f *Fpdf) SplitLines(txt []byte, w float64) [][]byte + func (f *Fpdf) String() string + func (f *Fpdf) Text(x, y float64, txtStr string) + func (f *Fpdf) Transform(tm TransformMatrix) + func (f *Fpdf) TransformBegin() + func (f *Fpdf) TransformEnd() + func (f *Fpdf) TransformMirrorHorizontal(x float64) + func (f *Fpdf) TransformMirrorLine(angle, x, y float64) + func (f *Fpdf) TransformMirrorPoint(x, y float64) + func (f *Fpdf) TransformMirrorVertical(y float64) + func (f *Fpdf) TransformRotate(angle, x, y float64) + func (f *Fpdf) TransformScale(scaleWd, scaleHt, x, y float64) + func (f *Fpdf) TransformScaleX(scaleWd, x, y float64) + func (f *Fpdf) TransformScaleXY(s, x, y float64) + func (f *Fpdf) TransformScaleY(scaleHt, x, y float64) + func (f *Fpdf) TransformSkew(angleX, angleY, x, y float64) + func (f *Fpdf) TransformSkewX(angleX, x, y float64) + func (f *Fpdf) TransformSkewY(angleY, x, y float64) + func (f *Fpdf) TransformTranslate(tx, ty float64) + func (f *Fpdf) TransformTranslateX(tx float64) + func (f *Fpdf) TransformTranslateY(ty float64) + func (f *Fpdf) UnicodeTranslatorFromDescriptor(cpStr string) (rep func(string) string) + func (f *Fpdf) UnitToPointConvert(u float64) (pt float64) + func (f *Fpdf) UseTemplate(t Template) + func (f *Fpdf) UseTemplateScaled(t Template, corner PointType, size SizeType) + func (f *Fpdf) Write(h float64, txtStr string) + func (f *Fpdf) WriteAligned(width, lineHeight float64, textStr, alignStr string) + func (f *Fpdf) WriteLinkID(h float64, displayStr string, linkID int) + func (f *Fpdf) WriteLinkString(h float64, displayStr, targetStr string) + func (f *Fpdf) Writef(h float64, fmtStr string, args ...interface{}) + type FpdfTpl struct + func (t *FpdfTpl) Bytes() []byte + func (t *FpdfTpl) ID() int64 + func (t *FpdfTpl) Images() map[string]*ImageInfoType + func (t *FpdfTpl) Size() (corner PointType, size SizeType) + func (t *FpdfTpl) Templates() []Template + type HTMLBasicSegmentType struct + Attr map[string]string + Cat byte + Str string + func HTMLBasicTokenize(htmlStr string) (list []HTMLBasicSegmentType) + type HTMLBasicType struct + Link struct{ ... } + func (html *HTMLBasicType) Write(lineHt float64, htmlStr string) + type ImageInfoType struct + func (info *ImageInfoType) Extent() (wd, ht float64) + func (info *ImageInfoType) Height() float64 + func (info *ImageInfoType) SetDpi(dpi float64) + func (info *ImageInfoType) Width() float64 + type ImageOptions struct + ImageType string + ReadDpi bool + type InitType struct + FontDirStr string + OrientationStr string + Size SizeType + SizeStr string + UnitStr string + type PointType struct + X float64 + Y float64 + func (p *PointType) Transform(x, y float64) PointType + func (p PointType) XY() (float64, float64) + type SVGBasicSegmentType struct + Arg [6]float64 + Cmd byte + type SVGBasicType struct + Ht float64 + Segments [][]SVGBasicSegmentType + Wd float64 + func SVGBasicFileParse(svgFileStr string) (sig SVGBasicType, err error) + func SVGBasicParse(buf []byte) (sig SVGBasicType, err error) + type SizeType struct + Ht float64 + Wd float64 + func (s *SizeType) Orientation() string + func (s *SizeType) ScaleBy(factor float64) SizeType + func (s *SizeType) ScaleToHeight(height float64) SizeType + func (s *SizeType) ScaleToWidth(width float64) SizeType + type Template interface + Bytes func() []byte + ID func() int64 + Images func() map[string]*ImageInfoType + Size func() (PointType, SizeType) + Templates func() []Template + func CreateTemplate(corner PointType, size SizeType, unitStr, fontDirStr string, fn func(*Tpl)) Template + type Tpl struct + func (t *Tpl) AddPage() + func (t *Tpl) AddPageFormat(orientationStr string, size SizeType) + func (t *Tpl) SetAutoPageBreak(auto bool, margin float64) + type TransformMatrix struct + A float64 + B float64 + C float64 + D float64 + E float64 + F float64 + type TtfType struct + Bold bool + CapHeight int16 + Chars map[uint16]uint16 + Embeddable bool + IsFixedPitch bool + ItalicAngle int16 + PostScriptName string + TypoAscender int16 + TypoDescender int16 + UnderlinePosition int16 + UnderlineThickness int16 + UnitsPerEm uint16 + Widths []uint16 + Xmax int16 + Xmin int16 + Ymax int16 + Ymin int16 + func TtfParse(fileStr string) (TtfRec TtfType, err error)