1 Star 0 Fork 300

likestar / PDF-Guru

forked from Kevin2li / PDF-Guru 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
merge.go 558 Bytes
一键复制 编辑 原始数据 按行查看 历史
Kevin2li 提交于 2023-07-18 15:06 . refactor
package main
import "github.com/pkg/errors"
func (a *App) MergePDF(inFiles []string, outFile string, sortMethod string, sortDirection string) error {
if len(inFiles) == 0 {
return errors.New("no input files")
}
args := []string{"merge"}
if sortMethod != "" {
args = append(args, "--sort_method", sortMethod)
}
if sortDirection != "" {
args = append(args, "--sort_direction", sortDirection)
}
if outFile != "" {
args = append(args, "-o", outFile)
}
args = append(args, inFiles...)
logger.Println(args)
return a.cmdRunner(args, "pdf")
}
Go
1
https://gitee.com/lxw804/PDF-Guru.git
git@gitee.com:lxw804/PDF-Guru.git
lxw804
PDF-Guru
PDF-Guru
main

搜索帮助

53164aa7 5694891 3bd8fe86 5694891