Skip to content

Commit

Permalink
Use cropbox when generating thumbnails
Browse files Browse the repository at this point in the history
  • Loading branch information
oxplot committed Mar 31, 2022
1 parent b215baf commit 4ef47ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion session/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func (s *Session) Thumbnail(page int) (string, error) {
// Otherwise, run pdftocairo to generate image

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

0 comments on commit 4ef47ba

Please sign in to comment.