diff options
author | emkael <emkael@tlen.pl> | 2019-11-07 23:35:22 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2019-11-07 23:35:22 +0100 |
commit | 1268ce872b8dad4821f58839eaefb284a932e6d8 (patch) | |
tree | e17febeebddc0da00751bcc941be89119635dbc1 | |
parent | 78786c9c6ed9df39f1e34b3ad2735f9656adc7cf (diff) |
PDF support in web interface
-rw-r--r-- | http/api/api.py | 2 | ||||
-rw-r--r-- | http/index.html | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/http/api/api.py b/http/api/api.py index 0e5da8d..d5bb239 100644 --- a/http/api/api.py +++ b/http/api/api.py @@ -59,7 +59,7 @@ def handle_upload(response, request): try: return_obj['name'] = params['name'] - converter = DealConverter() + converter = DealConverter(columns=4, orientation='Portrait') parser = converter.detect_format(params['name']) input_file = StringIO(base64.b64decode(params['content'])) dealset = parser.parse_content(input_file) diff --git a/http/index.html b/http/index.html index 51c6b34..2e2ecf7 100644 --- a/http/index.html +++ b/http/index.html @@ -141,6 +141,12 @@ <label class="form-check-label" for="output-rzd">KoPS (RZD)</label> </div> </div> + <div class="col-md-6 col-lg-4"> + <div class="form-check"> + <input class="form-check-input" type="checkbox" name="output" value="pdf" id="output-pdf" /> + <label class="form-check-label" for="output-pdf">Wydruk (PDF)</label> + </div> + </div> </div> </div> <div class="form-group collapse" id="submit-panel"> |