shithub: pdffs

Download patch

ref: 262b5d112994da35f04092dfcc43fdf7acface77
parent: 6030d0f343fb59db82e6788b67697dd5c75a149e
author: Noam Preil <noam@pixelhero.dev>
date: Thu Apr 7 09:28:06 EDT 2022

op: gs shim

--- a/op.c
+++ b/op.c
@@ -167,8 +167,15 @@
 static int
 gsstate(Op *op, Page *p)
 {
-	USED(op, p);
-	return 0;
+	char *name = arrayget(p->stack, 0)->name;
+	Object *extgstate;
+	if((extgstate = dictget(dictget(dictget(p->obj, "Resources"), "ExtGState"), name)) == nil){
+		werrstr("extgstate dictionary not found: %s", name);
+		return 0;
+	}
+	fprint(2, "TODO use GS dictionary\n");
+	USED(op, extgstate);
+	return 1;
 }
 
 static int