All Projects → lampnick → Doctron

lampnick / Doctron

Licence: apache-2.0
Docker-powered html convert to pdf(html2pdf), html to image(html2image like jpeg,png),which using chrome(golang) kernel, add watermarks to pdf, convert pdf to images etc.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Doctron

Hrconvert2
A self-hosted, drag-and-drop, & nosql file conversion server that supports 62x file formats.
Stars: ✭ 132 (-6.38%)
Mutual labels:  image, converter, jpeg, pdf-converter
Bimg
Go package for fast high-level image processing powered by libvips C library
Stars: ✭ 1,394 (+888.65%)
Mutual labels:  image, png, jpeg, watermark
Imaginary
Fast, simple, scalable, Docker-ready HTTP microservice for high-level image processing
Stars: ✭ 4,107 (+2812.77%)
Mutual labels:  image, png, jpeg, watermark
Pdfinverter
darken (or lighten) a PDF
Stars: ✭ 139 (-1.42%)
Mutual labels:  image, pdf, png, pdf-generation
Lilliput
Resize images and animated GIFs in Go
Stars: ✭ 1,690 (+1098.58%)
Mutual labels:  image, png, jpeg
Tiny Site
图片优化
Stars: ✭ 65 (-53.9%)
Mutual labels:  image, png, jpeg
Phpchrometopdf
A slim PHP wrapper around google-chrome to convert url to pdf or to take screenshots , easy to use and clean OOP interface
Stars: ✭ 127 (-9.93%)
Mutual labels:  pdf, pdf-generation, headless-chrome
Bbwebimage
A high performance Swift library for downloading, caching and editing web images asynchronously.
Stars: ✭ 128 (-9.22%)
Mutual labels:  image, png, jpeg
Asciidoctor Pdf
📃 Asciidoctor PDF: A native PDF converter for AsciiDoc based on Asciidoctor and Prawn, written entirely in Ruby.
Stars: ✭ 868 (+515.6%)
Mutual labels:  pdf, converter, pdf-generation
Laravel Pdf
A Simple package for easily generating PDF documents from HTML. This package is specially for laravel but you can use this without laravel.
Stars: ✭ 79 (-43.97%)
Mutual labels:  pdf, pdf-generation, pdf-converter
Docnet
DocNET is as fast PDF editing and reading library for modern .NET applications
Stars: ✭ 128 (-9.22%)
Mutual labels:  pdf, jpeg, pdf-converter
Format parser
file metadata parsing, done cheap
Stars: ✭ 46 (-67.38%)
Mutual labels:  pdf, png, jpeg
Pdfsave
Convert websites into readable PDFs
Stars: ✭ 46 (-67.38%)
Mutual labels:  pdf, pdf-generation, pdf-converter
Pyecharts Snapshot
renders the output of pyecharts as png, jpeg, gif, svg, eps, pdf and raw base64
Stars: ✭ 142 (+0.71%)
Mutual labels:  pdf, png, jpeg
Mybox
Easy tools of document, image, file, network, location, color, and media.
Stars: ✭ 45 (-68.09%)
Mutual labels:  image, pdf, converter
Png To Ico
convert png to ico format
Stars: ✭ 88 (-37.59%)
Mutual labels:  image, converter, png
Convert Svg
Node.js packages for converting SVG into other formats using headless Chromium
Stars: ✭ 133 (-5.67%)
Mutual labels:  converter, png, jpeg
Pixterm
Draw images in your ANSI terminal with true color
Stars: ✭ 782 (+454.61%)
Mutual labels:  image, png, jpeg
Scrimage
Java, Scala and Kotlin image processing library
Stars: ✭ 792 (+461.7%)
Mutual labels:  image, png, jpeg
Markdown Themeable Pdf
ARCHIVED. NOT MAINTAINED. Themeable Markdown Converter (Print to PDF, HTML, JPEG or PNG)
Stars: ✭ 130 (-7.8%)
Mutual labels:  pdf, png, jpeg

English | 中文

Table of Contents

Doctron description

Doctron is a Docker-powered,serverless,sample,fast,high quality document convert tool.Supply html convert to pdf(html2pdf), html convert to image(html2image like jpeg,png),which using chrome(Chromium) kernel, add watermarks to pdf, convert pdf to images etc.

Online experience

open the following website to have a try. Conversion may be slower due to low server configuration. Doctron Live Demo

Encourage

If you feel doctron is not bad, give me a star and fork.Star and fork is my greatest encouragement!

Features

  • Html convert to pdf/image using chrome kernel to guarantee what you see is what you get.
  • Easy deployment.(Using docker,kubernetes.)
  • Rich transformation parameters.
  • Customize page size from html convert to pdf or image.
  • Serverless supported.

Installing

  • Using docker
#using default config
docker run -p 8080:8080 --rm --name doctron-alpine lampnick/doctron  
#using custom config
docker run -p 8080:8080 --rm --name doctron-alpine \
-v /path/to/doctron/conf/doctron.yaml:/doctron.yaml \
lampnick/doctron  
  • Using k8s
kubectl apply -f https://raw.githubusercontent.com/lampnick/doctron/master/manifests/k8s-doctron.yaml
  • From source code
git clone https://github.com/lampnick/doctron.git
cd doctron
go run main.go 
  • install doctron using go get
go get -v github.com/lampnick/doctron
When finished then directly run
doctron

Quick Start

Html convert to pdf

basic
http://127.0.0.1:8080/convert/html2pdf?u=doctron&p=lampnick&url=<url>  
custom size
http://127.0.0.1:8080/convert/html2pdf?u=doctron&p=lampnick&url=<url>&marginTop=0&marginLeft=0&marginRight=0&marginbottom=0&paperwidth=4.1  
support params
  • u/username // doctron username
  • p/password // doctron password
  • uploadKey // upload to oss key
  • url // need convert html url
  • landscape // Paper orientation. core.Defaults to false.
  • displayHeaderFooter // Display header and footer. core.Defaults to false.
  • printBackground // Print background graphics. core.Defaults to false.
  • scale // Scale of the webpage rendering. core.Defaults to 1.
  • paperWidth // Paper width in inches. core.Defaults to 8.5 inches.
  • paperHeight // Paper height in inches. core.Defaults to 11 inches.
  • marginTop // Top margin in inches. core.Defaults to 1cm (~0.4 inches).
  • marginBottom // Bottom margin in inches. core.Defaults to 1cm (~0.4 inches).
  • marginLeft // Left margin in inches. core.Defaults to 1cm (~0.4 inches).
  • marginRight // Right margin in inches. core.Defaults to 1cm (~0.4 inches).
  • pageRanges // Paper ranges to print, e.g., '1-5, 8, 11-13'. core.Defaults to the empty string, which means print all pages.
  • ignoreInvalidPageRanges // Whether to silently ignore invalid but successfully parsed page ranges, such as '3-2'. core.Defaults to false.
  • WaitingTime // Waiting time after the page loaded. Default 0 means not wait. unit:Millisecond

Html convert to image

basic
http://127.0.0.1:8080/convert/html2image?u=doctron&p=lampnick&url=<url>  
custom size
http://127.0.0.1:8080/convert/html2image?u=doctron&p=lampnick&url=<url>&customClip=true&clipX=0&clipY=0&clipWidth=400&clipHeight=1500&clipScale=2&format=jpeg&Quality=80  
support params
  • u/username // doctron username
  • p/password // doctron password
  • uploadKey // upload to oss key
  • url // need convert html url
  • format // Image compression format (defaults to png).
  • quality // Compression quality from range [0..100] (jpeg only).
  • customClip //if set this value, the below clip will work,otherwise not work!
  • clipX // Capture the screenshot of a given region only.X offset in device independent pixels (dip).
  • clipY // Capture the screenshot of a given region only.Y offset in device independent pixels (dip).
  • clipWidth // Capture the screenshot of a given region only.Rectangle width in device independent pixels (dip).
  • clipHeight // Capture the screenshot of a given region only.Rectangle height in device independent pixels (dip). WaitingTime // Waiting time after the page loaded. Default 0 means not wait. unit:Millisecond

Pdf add watermark

add image watermark
http://127.0.0.1:8080/convert/pdfAddWatermark?u=doctron&p=lampnick&url=<pdf url>&imageUrl=<image url>
support params
  • u/username // doctron username
  • p/password // doctron password
  • uploadKey // upload to oss key
  • url // need convert html url
  • imageUrl // watermark image url,support png/jpeg

Pdf convert to image

coming soon

Doctron Client

Doctron go client

doctron-client-go

Doctron php client

doctron-client-php

License

Doctron is released under the Apache 2.0 license. See LICENSE.txt

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].