feat: code imporvements

This commit is contained in:
Shivam Mishra 2019-04-27 16:26:13 +05:30
parent 27fd3f7c99
commit 01a2df7e5a

View file

@ -48,11 +48,8 @@ def get_pdf(html, options=None, output=None):
output.encrypt(options["password"].encode('utf-8'))
return get_file_data_from_writer(output)
# https://pythonhosted.org/PyPDF2/PdfFileWriter.html
# initialize a writer
writer = PdfFileWriter()
# Append pages from the reader object to the writer
writer.appendPagesFromReader(reader)
if "password" in options: