Documentation ¶
Index ¶
- type DataProtector
- type Image
- type Location
- type MaskBlock
- type MaskPix
- type PdfDtProtector
- func (pdp *PdfDtProtector) ConvertPdfToImages(resolution float64, compressionQuality uint) (imgs []Image, err error)
- func (pdp *PdfDtProtector) DataProtect(imges []Image, maskRows uint, pixsLocation []Location) (maskImgs []Image, err error)
- func (pdp *PdfDtProtector) Destory()
- func (pdp *PdfDtProtector) FindSensitiveData(datas []SensiteiveData) (ppmap map[string][]Location, err error)
- func (pdp *PdfDtProtector) GetPdfPlainText() ([]string, error)
- func (pdp *PdfDtProtector) IsIncludeSensiteiveData(regxExpr string) (include bool, matchs []SensiteiveData, err error)
- func (pdp *PdfDtProtector) PdfOpen(filePath string) (err error)
- func (pdp *PdfDtProtector) ReadAndCachePdfContent() (err error)
- func (pdp *PdfDtProtector) WritePdf(imges []Image) (err error)
- type PixPoint
- type SensiteiveData
- type Text
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataProtector ¶
type DataProtector interface { ReadPdfContent(f *os.File, r *pdfreader.Reader) (string, error) ConvertPdfToImages(filePath string, resolution float64, compressionQuality uint) (imgs []Image, err error) DataProtect(imges []Image, msk MaskBlock, pixs []PixPoint) (maskImgs []Image, err error) WritePdf(imgesPath []string) (err error) Destory() }
type PdfDtProtector ¶
type PdfDtProtector struct { PWidth uint PHeight uint PfontSize float64 // contains filtered or unexported fields }
func NewPdfDtProtector ¶
func NewPdfDtProtector() PdfDtProtector
func (*PdfDtProtector) ConvertPdfToImages ¶
func (pdp *PdfDtProtector) ConvertPdfToImages(resolution float64, compressionQuality uint) (imgs []Image, err error)
func (*PdfDtProtector) DataProtect ¶
func (*PdfDtProtector) Destory ¶
func (pdp *PdfDtProtector) Destory()
func (*PdfDtProtector) FindSensitiveData ¶
func (pdp *PdfDtProtector) FindSensitiveData(datas []SensiteiveData) (ppmap map[string][]Location, err error)
func (*PdfDtProtector) GetPdfPlainText ¶
func (pdp *PdfDtProtector) GetPdfPlainText() ([]string, error)
func (*PdfDtProtector) IsIncludeSensiteiveData ¶
func (pdp *PdfDtProtector) IsIncludeSensiteiveData(regxExpr string) (include bool, matchs []SensiteiveData, err error)
func (*PdfDtProtector) PdfOpen ¶
func (pdp *PdfDtProtector) PdfOpen(filePath string) (err error)
func (*PdfDtProtector) ReadAndCachePdfContent ¶
func (pdp *PdfDtProtector) ReadAndCachePdfContent() (err error)
func (*PdfDtProtector) WritePdf ¶
func (pdp *PdfDtProtector) WritePdf(imges []Image) (err error)
type SensiteiveData ¶
Click to show internal directories.
Click to hide internal directories.