Documentation
¶
Index ¶
- Constants
- Variables
- type XpdfToolsCommand
- type XpdfToolsExec
- type XpdfToolsHelper
- func (instance *XpdfToolsHelper) BytesToHTML(data []byte, targetDir string) (response string, err error)
- func (instance *XpdfToolsHelper) BytesToPng(data []byte, targetDir string, optArgs ...string) (response string, err error)
- func (instance *XpdfToolsHelper) BytesToText(data []byte) (response string, err error)
- func (instance *XpdfToolsHelper) GetDirBinaries() string
- func (instance *XpdfToolsHelper) GetDirExecutables() string
- func (instance *XpdfToolsHelper) GetDirWorkspace() string
- func (instance *XpdfToolsHelper) IsInstalled() bool
- func (instance *XpdfToolsHelper) PdfFonts(source string) (response string, err error)
- func (instance *XpdfToolsHelper) PdfImages(source, targetDir string) (response string, err error)
- func (instance *XpdfToolsHelper) PdfInfo(source string) (response string, err error)
- func (instance *XpdfToolsHelper) PdfToHTML(source, targetDir string) (response string, err error)
- func (instance *XpdfToolsHelper) PdfToPng(source, targetDir string, optArgs ...string) (response string, err error)
- func (instance *XpdfToolsHelper) PdfToText(source string) (response string, err error)
- func (instance *XpdfToolsHelper) SetDirWorkspace(dir string) *XpdfToolsHelper
Constants ¶
View Source
const DownloadUrlLinux = "https://dl.xpdfreader.com/xpdf-tools-linux-4.05.tar.gz"
View Source
const DownloadUrlMac = "https://dl.xpdfreader.com/xpdf-tools-mac-4.05.tar.gz"
View Source
const DownloadUrlWin = "https://dl.xpdfreader.com/xpdf-tools-win-4.05.zip"
Variables ¶
Functions ¶
This section is empty.
Types ¶
type XpdfToolsCommand ¶
type XpdfToolsCommand string
const ( PdfToText XpdfToolsCommand = "pdftotext" // Pdftotext converts Portable Document Format (PDF) files to plain text. PdfToPs XpdfToolsCommand = "pdftops" // Pdftops converts Portable Document Format (PDF) files to PostScript so they can be printed. PdfToPpm XpdfToolsCommand = "pdftoppm" // Pdftoppm converts Portable Document Format (PDF) files to color image files in Portable Pixmap (PPM) format, grayscale image files in Portable Graymap (PGM) format, or monochrome image files in Portable Bitmap (PBM) format. PdfToPng XpdfToolsCommand = "pdftopng" // Pdftopng converts Portable Document Format (PDF) files to color, grayscale, or monochrome image files in Portable Network Graphics (PNG) format. PdfToHtml XpdfToolsCommand = "pdftohtml" // Pdftohtml converts Portable Document Format (PDF) files to HTML. PdfInfo XpdfToolsCommand = "pdfinfo" // Pdfinfo prints the contents of the ´Info’ dictionary (plus some other useful information) from a Portable Document Format (PDF) file. PdfImages XpdfToolsCommand = "pdfimages" // Pdfimages saves images from a Portable Document Format (PDF) file as Portable Pixmap (PPM), Portable Graymap (PGM), Portable Bitmap (PBM), or JPEG files. PdfFonts XpdfToolsCommand = "pdffonts" // Pdffonts lists the fonts used in a Portable Document Format (PDF) file along with various information for each font. PdfDetach XpdfToolsCommand = "pdfdetach" // Pdfdetach lists or extracts embedded files (attachments) from a Portable Document Format (PDF) file. )
type XpdfToolsExec ¶
type XpdfToolsExec struct {
// contains filtered or unexported fields
}
func NewExec ¶
func NewExec(execPath, dirWork string) *XpdfToolsExec
type XpdfToolsHelper ¶
type XpdfToolsHelper struct {
// contains filtered or unexported fields
}
func New ¶ added in v0.3.42
func New(dirBin string, download bool) (instance *XpdfToolsHelper, err error)
func (*XpdfToolsHelper) BytesToHTML ¶ added in v0.3.42
func (instance *XpdfToolsHelper) BytesToHTML(data []byte, targetDir string) (response string, err error)
func (*XpdfToolsHelper) BytesToPng ¶ added in v0.3.42
func (*XpdfToolsHelper) BytesToText ¶ added in v0.3.42
func (instance *XpdfToolsHelper) BytesToText(data []byte) (response string, err error)
func (*XpdfToolsHelper) GetDirBinaries ¶ added in v0.3.42
func (instance *XpdfToolsHelper) GetDirBinaries() string
func (*XpdfToolsHelper) GetDirExecutables ¶ added in v0.3.42
func (instance *XpdfToolsHelper) GetDirExecutables() string
func (*XpdfToolsHelper) GetDirWorkspace ¶ added in v0.3.42
func (instance *XpdfToolsHelper) GetDirWorkspace() string
func (*XpdfToolsHelper) IsInstalled ¶
func (instance *XpdfToolsHelper) IsInstalled() bool
func (*XpdfToolsHelper) PdfFonts ¶ added in v0.3.42
func (instance *XpdfToolsHelper) PdfFonts(source string) (response string, err error)
func (*XpdfToolsHelper) PdfImages ¶ added in v0.3.42
func (instance *XpdfToolsHelper) PdfImages(source, targetDir string) (response string, err error)
PdfImages extracts images from a PDF file and saves them to a specified target directory. Returns output or an error.
func (*XpdfToolsHelper) PdfInfo ¶ added in v0.3.42
func (instance *XpdfToolsHelper) PdfInfo(source string) (response string, err error)
func (*XpdfToolsHelper) PdfToHTML ¶ added in v0.3.42
func (instance *XpdfToolsHelper) PdfToHTML(source, targetDir string) (response string, err error)
func (*XpdfToolsHelper) PdfToPng ¶ added in v0.3.42
func (instance *XpdfToolsHelper) PdfToPng(source, targetDir string, optArgs ...string) (response string, err error)
func (*XpdfToolsHelper) PdfToText ¶ added in v0.3.42
func (instance *XpdfToolsHelper) PdfToText(source string) (response string, err error)
func (*XpdfToolsHelper) SetDirWorkspace ¶ added in v0.3.42
func (instance *XpdfToolsHelper) SetDirWorkspace(dir string) *XpdfToolsHelper
Click to show internal directories.
Click to hide internal directories.