feat: minor changes to pdf.py
This commit is contained in:
parent
a9ca81370b
commit
02c6abe609
1 changed files with 1 additions and 3 deletions
|
|
@ -9,10 +9,9 @@ from bs4 import BeautifulSoup
|
|||
from PyPDF2 import PdfFileReader, PdfFileWriter
|
||||
import re, io
|
||||
|
||||
def get_pdf(html, options=None, output = None):
|
||||
def get_pdf(html, options=None, output=None):
|
||||
html = scrub_urls(html)
|
||||
html, options = prepare_options(html, options)
|
||||
# fname = os.path.join("/tmp", "frappe-pdf-{0}.pdf".format(frappe.generate_hash()))
|
||||
|
||||
options.update({
|
||||
"disable-javascript": "",
|
||||
|
|
@ -66,7 +65,6 @@ def get_pdf(html, options=None, output = None):
|
|||
def get_file_data_from_writer(writer_obj):
|
||||
|
||||
# https://docs.python.org/3/library/io.html
|
||||
# Create a new stream and write into it
|
||||
stream = io.BytesIO()
|
||||
writer_obj.write(stream)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue