diff options
author | Paul Gardiner <paul@glidos.net> | 2012-04-19 16:27:53 +0100 |
---|---|---|
committer | Paul Gardiner <paul@glidos.net> | 2012-05-08 15:12:37 +0100 |
commit | 08a925d3ff7e703e1752dbdcd0f1188ec9cee8d0 (patch) | |
tree | 905e2bc90d26fae02ad1aeb1048a0f44bbdc6e29 /pdf/pdf_js.c | |
parent | 9ebe09595ad8088f518b6397e791aa44c27a374f (diff) | |
download | mupdf-08a925d3ff7e703e1752dbdcd0f1188ec9cee8d0.tar.xz |
Implement dummy JavaScript engine just for the sake of viewing calc.pdf
Diffstat (limited to 'pdf/pdf_js.c')
-rw-r--r-- | pdf/pdf_js.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pdf/pdf_js.c b/pdf/pdf_js.c index 4c2e30ab..408f7bf2 100644 --- a/pdf/pdf_js.c +++ b/pdf/pdf_js.c @@ -46,7 +46,7 @@ static pdf_jsimp_obj *doc_getField(void *jsctx, void *obj, int argc, pdf_jsimp_o pdf_obj *t; field = pdf_array_get(js->form, i); t = pdf_dict_gets(field, "T"); - if (!strcmp(name, pdf_to_name(t))) + if (!strcmp(name, pdf_to_str_buf(t))) break; } @@ -111,4 +111,9 @@ void pdf_drop_js(pdf_js *js) pdf_drop_jsimp(js->imp); fz_free(ctx, js); } +} + +void pdf_js_execute(pdf_js *js, char *code) +{ + pdf_jsimp_execute(js->imp, code); }
\ No newline at end of file |