File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ pydf is available as a docker image with a very simple http API for generating p
6969
7070Simple ``POST `` (or ``GET `` with data if possible) you HTML data to ``/generate.pdf ``.
7171
72- Arguments can be passed using http headers; any header starting ``pdf- `` will
72+ Arguments can be passed using http headers; any header starting ``pdf- `` or `` pdf_ `` will
7373have that prefix removed, be converted to lower case and passed to wkhtmltopdf.
7474
7575For example:
Original file line number Diff line number Diff line change 44
55To generate PDF POST (or GET with data if possible) you HTML data to /generate.pdf.
66
7- Extra arguments can be passed using http headers; any header starting "pdf-" will
7+ Extra arguments can be passed using http headers; any header starting "pdf-" or "pdf_" will
88have that prefix removed, be converted to lower case and passed to wkhtmltopdf.
99
1010For example:
@@ -32,7 +32,7 @@ async def index(request):
3232async def generate (request ):
3333 config = {}
3434 for k , v in request .headers .items ():
35- if k .startswith ('Pdf-' ):
35+ if k .startswith ('Pdf-' ) or k . startswith ( 'Pdf_' ) :
3636 config [k [4 :].lower ()] = v .lower ()
3737 data = await request .read ()
3838 if not data :
You can’t perform that action at this time.
0 commit comments