This commit is contained in:
parent
4df6135c3c
commit
3c8689e4a2
1 changed files with 4 additions and 4 deletions
|
|
@ -84,6 +84,10 @@ def read_options_from_html(html):
|
|||
options = {}
|
||||
soup = BeautifulSoup(html, "html5lib")
|
||||
|
||||
options.update(prepare_header_footer(soup))
|
||||
|
||||
toggle_visible_pdf(soup)
|
||||
|
||||
# extract pdfkit options from html
|
||||
for html_id in ("margin-top", "margin-bottom", "margin-left", "margin-right", "page-size"):
|
||||
try:
|
||||
|
|
@ -93,10 +97,6 @@ def read_options_from_html(html):
|
|||
except:
|
||||
pass
|
||||
|
||||
options.update(prepare_header_footer(soup))
|
||||
|
||||
toggle_visible_pdf(soup)
|
||||
|
||||
return soup.prettify(), options
|
||||
|
||||
def prepare_header_footer(soup):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue