Skip to content

Commit

Permalink
Changed outputted filename
Browse files Browse the repository at this point in the history
Changed the filename of the merged file to match the files that were put in Double PDF (+ between the front and back files)
  • Loading branch information
nraikm authored Apr 25, 2020
1 parent 3869b1d commit ac70aa7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,15 @@ def merge_pdfs(self):
output = self.paths['front']
output = output[:output.rindex("/")]

output += "/merged.pdf"
front_path = self.paths['front']
back_path = self.paths['back']

print(f'{front_path=}')
print(f'{front_path.rindex("/")}')
print(f'{front_path[front_path.rindex("/") + 1: front_path.rindex(".")]}')
file_name = f'{front_path[front_path.rindex("/") + 1: front_path.rindex(".")]} + {back_path[back_path.rindex("/") + 1:back_path.rindex(".")]}.pdf'

output += f'\{file_name}'

for path in self.paths.keys():
pdf_reader = PdfFileReader(self.paths[path])
Expand Down

0 comments on commit ac70aa7

Please sign in to comment.