Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadPDF ¶
func DownloadPDF(urlStr string, tmp bool, prefix string, progress func(done, total int64)) (string, error)
DownloadPDF fetches the PDF and saves locally. tmp==true → os.TempDir(), else under $PDF_DIR/prefix or $PDF_DIR. progress is an optional callback receiving bytes downloaded and total bytes.
func SetDownloadTimeout ¶ added in v1.0.0
SetDownloadTimeout updates the timeout for DownloadPDF requests.
func SetSniffTimeout ¶ added in v1.0.0
SetSniffTimeout updates the timeout for SniffMime requests.
func SniffHandler ¶ added in v1.0.0
SniffHandler responds with the MIME type of the ?url parameter.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.