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
Hello Many, many thanks for the change. I reportet this already at 2005-10-15 in bug #3599. But nobody seemd to take care about this problem. I think this brings the whole thing much furter. Roland Kaeser Charles Morrison <eplurib at earthlink.net> schrieb: 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 at winehq.org http://www.winehq.org/mailman/listinfo/wine-users --------------------------------- Yahoo! Clever - Der einfachste Weg, Fragen zu stellen und Wissenswertes mit Anderen zu teilen. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.winehq.org/pipermail/wine-users/attachments/20071011/67f31e35/attachment.htm
On Do, 2007-10-11 at 09:27 -0400, Charles Morrison wrote:> 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?No Idea yet. Sorry.> 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?Can you switch Corel Draw to postscript level 1? Which "Corel Draw" version do you use? Is a Trial available? http://www.corel.com/servlet/Satellite/us/en/Content/1152796555406 -- By by ... Detlef
Hello>Fixing that bug need someone with: >- high skill about printing in Windows, >- high skill about printing with CUPS >- high skill about postscript >- an affected Application (Correl Draw)Should be just a routine to detect when a app sends postscript to the wine printer. In this case don't change anything and just forward it to the printer. In an other case should it be possible to just apply the previous sended patch from Charles Morrison and this should fix the problem.> 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?No, Corel Draw just detects the postscript printer and generates postscript code.>Can you switch Corel Draw to postscript level 1?Yes this is possible, but then I thing many of the newer features of modern color laser and inkject printers are not avialable.>Which "Corel Draw" version do you use? >Is a Trial available?I tested it with the version 8, 9, 11,12, but only version 9 is currently that stable that real work is possible. It's just a trial for X3 available but it isn't working on wine yet, based on msi problems. Eventually I can give you a version personally to make tests. I have to say that this is my primary and only windows program i use on linux (except of some games which do not count) and I made lot of publications with it since I use on linux (12.2005). So I really depend on this. Currently a kind of printing is possible by exporting the document to a pdf file and print it afterwards but the enhanced printer features on corel are then not usable, such as imposing the pages. Kind regards Roland Kaeser ----- Urspr?ngliche Mail ---- Von: Detlef Riekenberg <wine-users at web.de> An: Charles Morrison <eplurib at earthlink.net> CC: wine-users at winehq.org Gesendet: Freitag, den 12. Oktober 2007, 13:26:36 Uhr Betreff: Re: [Wine] Printing in Corel Draw through CUPS On Do, 2007-10-11 at 09:27 -0400, Charles Morrison wrote:> 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?No Idea yet. Sorry.> 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?Can you switch Corel Draw to postscript level 1? Which "Corel Draw" version do you use? Is a Trial available? http://www.corel.com/servlet/Satellite/us/en/Content/1152796555406 -- By by ... Detlef _______________________________________________ wine-users mailing list wine-users at winehq.org http://www.winehq.org/mailman/listinfo/wine-users Die etwas anderen Infos rund um das Thema Reisen. BE A BETTER WELTENBUMMLER! www.yahoo.de/clever -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.winehq.org/pipermail/wine-users/attachments/20071012/5b0c2347/attachment.htm