summaryrefslogtreecommitdiff
path: root/source/pdf/pdf-js.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2018-04-24 16:28:27 +0200
committerTor Andersson <tor.andersson@artifex.com>2018-05-09 15:33:15 +0200
commit8fb0e3989a6867b67d5cafb04b622701d383a832 (patch)
treedff2750c2b6eafcad52aa4664def9145bc46b87c /source/pdf/pdf-js.c
parentfd999474e7b8a0f059ac33996692070ec0ad1798 (diff)
downloadmupdf-8fb0e3989a6867b67d5cafb04b622701d383a832.tar.xz
Flesh out some more javascript convenience objects.
Add some missing convenience data objects: font, highlight, position, etc. Add color.convert and color.equal functions.
Diffstat (limited to 'source/pdf/pdf-js.c')
-rw-r--r--source/pdf/pdf-js.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/pdf/pdf-js.c b/source/pdf/pdf-js.c
index a8e1d8a3..49b9c1e6 100644
--- a/source/pdf/pdf-js.c
+++ b/source/pdf/pdf-js.c
@@ -583,7 +583,7 @@ static void preload_helpers(pdf_js *js)
js_dostring(js->imp,
#include "js/util.js.h"
- );
+ );
}
void pdf_drop_js(fz_context *ctx, pdf_js *js)
@@ -696,14 +696,14 @@ void pdf_js_execute(pdf_js *js, char *source)
{
if (js_ploadstring(js->imp, "[pdf]", source))
{
- fz_warn(js->ctx, "%s", js_tostring(js->imp, -1));
+ fz_warn(js->ctx, "%s", js_trystring(js->imp, -1, "Error"));
js_pop(js->imp, 1);
return;
}
js_getregistry(js->imp, "Doc"); /* set 'this' to the Doc object */
if (js_pcall(js->imp, 0))
{
- fz_warn(js->ctx, "%s", js_tostring(js->imp, -1));
+ fz_warn(js->ctx, "%s", js_trystring(js->imp, -1, "Error"));
js_pop(js->imp, 1);
return;
}