Skip to content

Commit 5820e95

Browse files
committed
update to support new merge
1 parent cd38066 commit 5820e95

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

api2pdf/api2pdf.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,14 @@ def HeadlessChrome(self):
2525
def LibreOffice(self):
2626
return Api2Pdf_LibreOffice(self.api_key)
2727

28-
def merge(self, list_of_urls):
29-
return self._make_request(API2PDF_MERGE_ENDPOINT, list_of_urls)
28+
def merge(self, list_of_urls, inline_pdf=False, file_name=None):
29+
payload = {
30+
'urls': list_of_urls,
31+
'inlinePdf': inline_pdf
32+
}
33+
if file_name != None:
34+
payload['fileName'] = file_name
35+
return self._make_request(API2PDF_MERGE_ENDPOINT, payload)
3036

3137
def _make_html_payload(self, html, inline_pdf=False, file_name=None, **options):
3238
payload = {

0 commit comments

Comments
 (0)