pdfapi

command module
v0.0.0-...-c2679fe Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2019 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

This is xhtmltopdf wrap api

Install

Mac OS

brew install dep
dep ensure
go run server.go

go build server.go && ./server

Debian

sudo apt-get update
sudo apt-get -y upgrade

wget https://dl.google.com/go/go1.13.1.linux-amd64.tar.gz
tar -xvf go1.13.1.linux-amd64.tar.gz
sudo mv go /usr/local

export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH

mkdir -p $HOME/go/src/github.com/clevertechru/
cd $HOME/go/src/github.com/clevertechru/
git clone https://github.com/clevertechru/pdfapi.git && cd ./pdfapi

curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
chmod +x $HOME/go/src/github.com/clevertechru/bin/dep
sudo mv $HOME/go/src/github.com/clevertechru/bin/dep /usr/local/go/bin/
dep ensure

go build server.go && ./server

Use

curl -X POST "http://localhost:1323/pdf?url=yandex.ru" -d '{}' --output report.pdf
curl -X POST "http://localhost:1323/pdf" -d '{"url":"yandex.ru"}' -H 'Content-Type: application/json' --output report.pdf

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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