add title to result pdf
This commit is contained in:
parent
25ded403b7
commit
5168ee6840
1 changed files with 1 additions and 0 deletions
|
@ -123,6 +123,7 @@ class DocumentWithLabel(BasePileViewMixin):
|
|||
for reader in map(PdfFileReader, (label_stream, document_fp)):
|
||||
for n in range(reader.getNumPages()):
|
||||
writer.addPage(reader.getPage(n))
|
||||
writer.addMetadata({u'/Title': f"/-\\ pile #{document.id}: {document.title}"})
|
||||
final_stream = io.BytesIO()
|
||||
writer.write(final_stream)
|
||||
final_stream.seek(0)
|
||||
|
|
Loading…
Reference in a new issue