PATCH: wineps passthrough postscript

Marcus Meissner marcus at jet.franken.de
Mon May 7 08:02:47 CDT 2001


Hi,

Debugged a bit around AcroRead32, which uses postscript passtrough printing.

It works now much better, except it somehow cannot upload fonts(?) and
queries support for escapes 4568 and 4567 which are unknown to me.

Ciao, Marcus

Changelog:
	PS passthrough was sending 2 bytes too much.
	Added GETSETPRINTORIENT stub.
	Implemented EPSPRINTING mode changer.

Index: dlls/wineps/escape.c
===================================================================
RCS file: /home/wine/wine/dlls/wineps/escape.c,v
retrieving revision 1.5
diff -u -r1.5 escape.c
--- dlls/wineps/escape.c	2000/12/13 20:20:14	1.5
+++ dlls/wineps/escape.c	2001/05/07 13:59:40
@@ -79,6 +79,7 @@
 	    case SETCHARSET:
 	    case EXT_DEVICE_CAPS:
 	    case SET_BOUNDS:
+            case EPSPRINTING:
             case PASSTHROUGH:
             case POSTSCRIPT_PASSTHROUGH:
 	        return TRUE;
@@ -248,17 +249,37 @@
 	    return 0;
 	}
 
+    case EPSPRINTING:
+	{
+	    UINT16	epsprint = *(UINT16*)MapSL(lpInData);
+	    /* FIXME: In this mode we do not need to send page intros and page
+	     * ends according to the doc. But I just ignore that detail
+	     * for now.
+	     */
+	    TRACE("EPS Printing support %sable.\n",epsprint?"en":"dis");
+	    return 1;
+        }
     case PASSTHROUGH:
     case POSTSCRIPT_PASSTHROUGH:
         {
             /* Write directly to spool file, bypassing normal PS driver
              * processing that is done along with writing PostScript code
              * to the spool.
+	     * (Usually we have a WORD before the data counting the size, but
+	     * cbInput is just this +2.)
              */
-            return WriteSpool16(physDev->job.hJob, ((char *)lpInData) + 2,
-                                cbInput);
+            return WriteSpool16(physDev->job.hJob,((char*)lpInData)+2,cbInput-2);
         }
 
+    case GETSETPRINTORIENT:
+	{
+	    /* If lpInData is present, it is a 20 byte structure, first 32
+	     * bit LONG value is the orientation. if lpInData is NULL, it
+	     * returns the current orientation.
+	     */
+	    FIXME("GETSETPRINTORIENT not implemented (lpInData %ld)!\n",lpInData);
+	    return 1;
+	}
     default:
         FIXME("Unimplemented code 0x%x\n", nEscape);
 	return 0;
Index: graphics/escape.c
===================================================================
RCS file: /home/wine/wine/graphics/escape.c,v
retrieving revision 1.22
diff -u -r1.22 escape.c
--- graphics/escape.c	2001/02/14 23:11:18	1.22
+++ graphics/escape.c	2001/05/07 13:59:41
@@ -50,8 +50,10 @@
     switch (nEscape) {
     	/* Escape(hdc,QUERYESCSUPPORT,LPINT,NULL) */
         /* Escape(hdc,CLIP_TO_PATH,LPINT,NULL) */
+        /* Escape(hdc,EPSPRINTING,LPINT,NULL) */
     case QUERYESCSUPPORT:
     case CLIP_TO_PATH:
+    case EPSPRINTING:
       {
     	LPINT16 x = (LPINT16)SEGPTR_NEW(INT16);
 	*x = *(INT*)lpszInData;
Index: include/wingdi.h
===================================================================
RCS file: /home/wine/wine/include/wingdi.h,v
retrieving revision 1.58
diff -u -r1.58 wingdi.h
--- include/wingdi.h	2001/04/18 17:41:58	1.58
+++ include/wingdi.h	2001/05/07 13:59:48
@@ -327,6 +327,13 @@
 #define CLOSECHANNEL		4112
 #define	POSTSCRIPT_PASSTHROUGH	4115
 #define	ENCAPSULATED_POSTSCRIPT	4116
+#define	POSTSCRIPT_IDENTIFY	4117
+#define	POSTSCRIPT_INJECTION	4118
+
+/* for POSTSCRIPT_IDENTIFY */
+#define PSIDENT_GDICENTRIC	0
+#define PSIDENT_PSCENTRIC	1
+
 
 #define QDI_SETDIBITS           1
 #define QDI_GETDIBITS           2




More information about the wine-patches mailing list