xpdf

package
v0.0.0-...-a5276b2 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

* @Author: wangjun haodreams@163.com * @Date: 2024-07-05 18:25:31 * @LastEditors: wangjun haodreams@163.com * @LastEditTime: 2024-07-09 11:21:27 * @FilePath: \golib\pdflite\pdflite.go * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PdfX

type PdfX struct {
	*gopdf.GoPdf
	// contains filtered or unexported fields
}

func NewPdfX

func NewPdfX(font *xfont.Font, config *gopdf.Config) *PdfX

func (*PdfX) AddImage

func (m *PdfX) AddImage(x, y, width, hight float64, png []byte) (float64, error)

@desc 图片限制长度,到达一定长度添加新页 @param getX(写入pdf的X轴)、getY(写入pdf的Y轴)、getpdf(pdf对象)、buf(图片) @return Y(返回pdfY的轴)

func (*PdfX) Default

func (m *PdfX) Default(rgb *color.RGBA, font *xfont.Font) *PdfX

*

  • @description:输出文本
  • @param {*gopdf.GoPdf} pdf
  • @param {string} text
  • @param {*} x
  • @param {float64} y
  • @param {*color.RGBA} rgb
  • @param {*Font} font
  • @return {*}

func (*PdfX) SetHeight

func (m *PdfX) SetHeight(h float64)

func (*PdfX) Text

func (m *PdfX) Text(x, y float64, text string) float64

Jump to

Keyboard shortcuts

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