summaryrefslogtreecommitdiff
path: root/cmd/rescribe/gui.go
diff options
context:
space:
mode:
authorNick White <git@njw.name>2022-03-21 13:51:51 +0000
committerNick White <git@njw.name>2022-03-21 13:51:51 +0000
commit76d91ea8f65c6ad52efb24ac2c94b22c2908bc5c (patch)
tree35bc0e895befc1c686a64565f8bdff470a8db1c2 /cmd/rescribe/gui.go
parentaf8650c074bc111200b132b0918d44cacd423b6e (diff)
Only generate full-size PDF if requested
This avoids the issue that large PDFs require a lot of RAM, so there are chances of running out of memory. Plus it's a waste of space and time.
Diffstat (limited to 'cmd/rescribe/gui.go')
-rw-r--r--cmd/rescribe/gui.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd/rescribe/gui.go b/cmd/rescribe/gui.go
index 36b4f16..7c5a727 100644
--- a/cmd/rescribe/gui.go
+++ b/cmd/rescribe/gui.go
@@ -340,8 +340,8 @@ func startGui(log log.Logger, cmd string, gbookcmd string, training string, tess
wipe := widget.NewCheck("Automatically clean image sides", func(bool) {})
- smallpdf := widget.NewCheck("Reduce size of searchable PDF", func(bool) {})
- smallpdf.Checked = true
+ bigpdf := widget.NewCheck("Use highest image quality for searchable PDF (requires lots of RAM)", func(bool) {})
+ bigpdf.Checked = false
trainingLabel := widget.NewLabel("Language / Script")
@@ -532,7 +532,7 @@ func startGui(log log.Logger, cmd string, gbookcmd string, training string, tess
training = training[start:end]
}
- err = startProcess(ctx, log, cmd, bookdir, bookname, training, savedir, tessdir, !wipe.Checked, !smallpdf.Checked)
+ err = startProcess(ctx, log, cmd, bookdir, bookname, training, savedir, tessdir, !wipe.Checked, bigpdf.Checked)
if err != nil && strings.HasSuffix(err.Error(), "context canceled") {
progressBar.SetValue(0.0)
return
@@ -569,8 +569,8 @@ func startGui(log log.Logger, cmd string, gbookcmd string, training string, tess
trainingBits := container.New(layout.NewBorderLayout(nil, nil, trainingLabel, nil), trainingLabel, trainingOpts)
- fullContent = container.NewVBox(choices, chosen, trainingBits, wipe, smallpdf, gobtn, abortbtn, progressBar, detail)
- startContent := container.NewVBox(choices, trainingBits, wipe, smallpdf, gobtn, abortbtn, progressBar, detail)
+ fullContent = container.NewVBox(choices, chosen, trainingBits, wipe, bigpdf, gobtn, abortbtn, progressBar, detail)
+ startContent := container.NewVBox(choices, trainingBits, wipe, bigpdf, gobtn, abortbtn, progressBar, detail)
myWindow.SetContent(startContent)