go-print-server

module
v0.0.0-...-4042397 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: MIT

README

Web Printing API server written in Go

Usage

This print server provides an API endpoint (optionally protected by basic auth) which enables users to print a PDF file from a given url.

curl -X POST http://localhost:8631/v1/print/url \
   -u 'example:secret' \
   -H 'Content-Type: application/json' \
   -d '{"url":"https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf","preset":"example-preset"}'

Setup

  1. Clone this repo.
  2. $ go mod download
  3. $ cp ./config/config.example.yml ./config/config.yml
  4. Fill out your config.yml.
  5. $ go run ./cmd/print-server/main.go

Directories

Path Synopsis
cmd
internal
app
pkg
httpserver
Package httpserver implements HTTP server.
Package httpserver implements HTTP server.

Jump to

Keyboard shortcuts

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