Skip to content

Commit 4ef47ba

Browse files
committed
Use cropbox when generating thumbnails
1 parent b215baf commit 4ef47ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

session/session.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ func (s *Session) Thumbnail(page int) (string, error) {
144144
// Otherwise, run pdftocairo to generate image
145145

146146
cmd := exec.Command("pdftocairo", "-f", strconv.Itoa(page+1), "-png",
147-
"-singlefile", "-scale-to", "200", s.path, thumbPath+".tmp")
147+
"-singlefile", "-cropbox", "-scale-to", "200", s.path, thumbPath+".tmp")
148148
if _, err := cmd.Output(); err != nil {
149149
return "", fmt.Errorf("failed to generate thumb for page %d of '%s': %s", page, s.path, cmdErr(err))
150150
}

0 commit comments

Comments
 (0)