summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/ghostscript/ghostscript.go10
1 files changed, 4 insertions, 6 deletions
diff --git a/contrib/ghostscript/ghostscript.go b/contrib/ghostscript/ghostscript.go
index f9e5c4f..2b695b8 100644
--- a/contrib/ghostscript/ghostscript.go
+++ b/contrib/ghostscript/ghostscript.go
@@ -36,13 +36,11 @@ func newPdf() (pdf *gofpdf.Fpdf) {
return
}
-func full() {
- const name = "full.pdf"
+func full(name string) {
report(name, newPdf().OutputFileAndClose(name))
}
-func min() {
- const name = "min.pdf"
+func min(name string) {
cmd := exec.Command("gs", "-sDEVICE=pdfwrite",
"-dCompatibilityLevel=1.4",
"-dPDFSETTINGS=/screen", "-dNOPAUSE", "-dQUIET",
@@ -61,6 +59,6 @@ func min() {
}
func main() {
- full()
- min()
+ full("full.pdf")
+ min("min.pdf")
}