majogamit commited on
Commit
14e2601
1 Parent(s): 50d6ddc

Update utils/plot.py

Browse files
Files changed (1) hide show
  1. utils/plot.py +8 -8
utils/plot.py CHANGED
@@ -167,18 +167,18 @@ def count_instance(result, filenames, uuid, width_list, orientation_list, image_
167
 
168
  print("This executed 5")
169
 
170
- # pdfs = [f'output/{uuid}/report_ref.pdf', f'output/{uuid}/report_batch.pdf']
171
 
172
- # merger = PdfMerger()
173
 
174
- # for pdf in pdfs:
175
- # merger.append(pdf)
176
 
177
- # merger.write(f'output/{uuid}/report.pdf')
178
- # merger.close()
179
- # options = {'width': 1280, 'disable-smart-width': ''}
180
  imgkit.from_file(f'output/{uuid}/out.html', f'output/{uuid}/out.jpg', options=opt)
181
- return f'output/{uuid}/out.jpg', df
182
 
183
 
184
 
 
167
 
168
  print("This executed 5")
169
 
170
+ pdfs = [f'output/{uuid}/report_ref.pdf', f'output/{uuid}/report_batch.pdf']
171
 
172
+ merger = PdfMerger()
173
 
174
+ for pdf in pdfs:
175
+ merger.append(pdf)
176
 
177
+ merger.write(f'output/{uuid}/report.pdf')
178
+ merger.close()
179
+ options = {'width': 1280, 'disable-smart-width': ''}
180
  imgkit.from_file(f'output/{uuid}/out.html', f'output/{uuid}/out.jpg', options=opt)
181
+ return f'output/{uuid}/report.pdf', df
182
 
183
 
184