goitopdf

command module
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2021 License: MIT Imports: 3 Imported by: 0

README

goitopdf

A simple CLI tool written in Go to convert images in a specified directory to pdf

Keep Going ;)

Usage

As an executable

goitopdf images_dir output

  • images_dir - path to your images
  • output - path and filename to save your created pdf to
Example

goitopdf "/home/user/my_favorite_manga" ./my_favourite_manga.pdf

As a module

The module provides itopdf package which contains a structure that implements a IToPDF interface.

Basic usage:

package main

import "github.com/br3w0r/goitopdf/itopdf"

func main() {
    pdf := itopdf.NewInstance()
    
    err := pdf.WalkDir("/images/dir/", nil)
    if err != nil {
        panic(err)
    }

    err = pdf.Save("/output/dir/output_name.pdf")
    if err != nil {
        panic(err)
    }
}

You can also implement your images iteration algorithm by using IToPDF's AddImage method.

License

goitopdf is released under the MIT License and is copyrighted by Daniil Dirun.

gofpdf is released under the MIT License. It is copyrighted by Dave Barnes and the contributors acknowledged in the documentation to the library.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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