Skip to content

Commit e366dc8

Browse files
author
Anand
committed
Dont add password to pdf if not given
1 parent 12ba387 commit e366dc8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

actions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ func exportToPDF(fileName string) error {
780780
if _, err = os.Stat(fileName); err == nil {
781781
fmt.Printf("\nFile %s created without password.\n", fileName)
782782

783-
if pdfTkFound {
783+
if pdfTkFound && len(passwd) > 0 {
784784
tmpFile = randomFileName(".", ".pdf")
785785
// fmt.Printf("pdf file => %s\n", tmpFile)
786786
args = []string{fileName, "output", tmpFile, "user_pw", passwd}

0 commit comments

Comments
 (0)