summaryrefslogtreecommitdiff
path: root/source/pdf/pdf-op-run.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-04-13 17:02:43 +0100
committerRobin Watts <robin.watts@artifex.com>2016-04-18 10:51:22 +0100
commit335798189cbd40cd518ce49d1fa4c7eaa2811977 (patch)
tree6436a89506c79174882cc08f0766f328315c1c94 /source/pdf/pdf-op-run.c
parentbf73ce40b26317cc067239c0e183ea4257a25c2f (diff)
downloadmupdf-335798189cbd40cd518ce49d1fa4c7eaa2811977.tar.xz
Fix broken documents after sanitize
The DP and BDC operators, are used in the form: <NAME> <PROPERTIES> <OPERATOR> where <PROPERTIES> can either be a name (that can be looked up to get a dictionary) or an inline dictionary. What the spec doesn't say is that the two are not interchangeable. If you resolve the name to an inline dict, then insert it, Acrobat will give an error for some (but not all) cases. The interpreter currently resolves any references, and passes the resolved version into the operator handling function. This precludes us outputting the original form. We therefore update it to pass both the raw and the cooked versions in. This has no effect on MuPDFs own handling of anything, it just enables the buffer device to output a correct stream.
Diffstat (limited to 'source/pdf/pdf-op-run.c')
-rw-r--r--source/pdf/pdf-op-run.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/pdf/pdf-op-run.c b/source/pdf/pdf-op-run.c
index cb83aa8b..593afe24 100644
--- a/source/pdf/pdf-op-run.c
+++ b/source/pdf/pdf-op-run.c
@@ -1931,7 +1931,7 @@ static void pdf_run_MP(fz_context *ctx, pdf_processor *proc, const char *tag)
{
}
-static void pdf_run_DP(fz_context *ctx, pdf_processor *proc, const char *tag, pdf_obj *properties)
+static void pdf_run_DP(fz_context *ctx, pdf_processor *proc, const char *tag, pdf_obj *raw, pdf_obj *cooked)
{
}
@@ -1939,7 +1939,7 @@ static void pdf_run_BMC(fz_context *ctx, pdf_processor *proc, const char *tag)
{
}
-static void pdf_run_BDC(fz_context *ctx, pdf_processor *proc, const char *tag, pdf_obj *properties)
+static void pdf_run_BDC(fz_context *ctx, pdf_processor *proc, const char *tag, pdf_obj *raw, pdf_obj *cooked)
{
}