Printing in Corel Draw through CUPS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



10/10/2007

After consulting with some local Linux consultants, we have concluded 
that Corel Draw does not print under WINE because it detects the printer 
as Postscript, converts the file to Postscript, and sends the file to 
CUPS, which then converts the file to Postscript, again, and sends it to 
the printer which prints garbage.

The consultant found a way to make a couple changes to WINE files and 
force CUPS to pass it through and it prints beautifully on a color printer.

Here are his changes:

> in ps.c
>
> Changed
>
> static const char psendpage[] =
> "pgsave restore\n"
> "showpage\n";
>
> to
>
> static const char psendpage[] =
> "showpage\n";
>
> (deleting pgsave restore\n)
>
>
> at the begining of PSDRV_WriteNewPage
> added return 1; to essentially bypass the code.
>
> INT PSDRV_WriteNewPage( PSDRV_PDEVICE *physDev )
> {
>     char *buf;
>     char name[100];
>     signed int xtrans, ytrans, rotation;
>
>     return 1;
>
> ============================================
>
> in escape.c  in the function PSDRV_ExtEscape
>
> commented out all of the code for the POSTSCRIPT_PASSTHROUGH case
> and replaced with a call to PSDRV_WriteSpool
>
>     case POSTSCRIPT_DATA:
>     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.
>          * We have a WORD before the data counting the size, but
>          * cbInput is just this +2.
>          * However Photoshop 7 has a bug that sets cbInput to 2 less 
> than the
>          * length of the string, rather than 2 more.  So we'll use the 
> WORD at
>          * in_data[0] instead.
>          */
>         // if (!physDev->job.in_passthrough) {
>             // WriteSpool16(physDev->job.hJob, (LPSTR)psbegindocument, 
> sizeof(psbegindocument)-1);
>             // physDev->job.in_passthrough = TRUE;
>         // }
>         // return 
> WriteSpool16(physDev->job.hJob,((char*)in_data)+2,*(const WORD*)in_data);
>
>         return PSDRV_WriteSpool(physDev, ((char*)in_data) + 2, cbInput);
>     }
>
My question; Is there a way to force CUPS to pass through a Postscript 
file from Corel Draw and allowing other programs running under WINE to 
use the CUPS drivers as normal? (The consultants changes force the pass 
through on all programs running under WINE).

Possible other solution; Is there a way to force Corel Draw to send a 
format which can be converted or pass through CUPS to the printer?

Charlie Morrison


_______________________________________________
wine-users mailing list
wine-users@xxxxxxxxxx
http://www.winehq.org/mailman/listinfo/wine-users

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux