Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2020/12/02)Fwd 1 day (to 2020/12/04) >>>20201203 
Gehlot Hi Devs, I am getting a weird issue. Ghostscript is not able to print document in color for some printers.09:16.40 
  I have tried already tried these flags but no sucess "-sOutputICCProfile=default_cmyk.icc", BitsPerPixel=4/24/809:18.11 
artifexirc-bot <KenSharp> Gehlot you are going to have to be more specific09:19.16 
  <KenSharp> What do you mean by 'print' ?09:19.22 
  <KenSharp> Changing the ICC profile is unlikely to do anything useful09:19.38 
  <KenSharp> WHat is the complete command line you are using, on what operating system and which version of Ghostscript ?09:19.53 
Gehlot OS: Windows 10 09:23.11 
  "-empty",09:23.55 
  /OutputFile (%printer% HP LaserJet M) /UserSettings <</DocumentName (ColorPrintTestDoc)>> (mswinpr2) finddevice putdeviceprops setdevice ",09:23.58 
artifexirc-bot <KenSharp> That doesn't look like a Ghostscritp command line09:24.31 
  <KenSharp> The PostScript is fine but what's hte '-empty' ?09:24.50 
Gehlot I have C# wrapper that takes parameters in form form of array of string 09:26.14 
  Ghostscript version is 8.7109:27.21 
artifexirc-bot <KenSharp> OK so firstly are you aware of the licence ? If you 'wrap' Ghostscript inside a C# wrapper then you aren't (almost certainly) conforming to the AGPL. That doesn't mean its a problem, it depends what you are doing. Personal projects are almost certainly OK09:27.23 
  <KenSharp> The next thing is that I (obviously) can't give you any pointers when you use that, I can only offer any guidance based on actual Ghostscript09:27.53 
  <KenSharp> So I'd suggest that you try the same thing you are doing but using the Ghostscript command line. Otherwise its going to be very hard to make any concrete suggestions09:28.22 
chrisl Oh, wow, using a 10+ year old gs version? Probably try something newer!!09:28.38 
artifexirc-bot <KenSharp> Oh I missed the version09:28.51 
Gehlot I am working on a proof of concept project so 09:28.53 
artifexirc-bot <KenSharp> Yeah the amazing thing is that it actually works at all 🙂09:29.02 
Gehlot OK I will test with latest version 09:29.29 
artifexirc-bot <KenSharp> Please try it out using the command line09:29.42 
  <KenSharp> If that has a problem then we can offer guidance09:29.58 
Gehlot ok09:31.04 
chrisl FWIW, I would also be very wary about using finddevice or putdeviceprops, because they're not really Postscript.....09:38.31 
artifexirc-bot <KenSharp> They are (sadly) documented in our own documentation for the mswinpr2 device though I'm afraid 😦09:39.05 
  <KenSharp> At least, I think they are....09:39.19 
chrisl I'd still be wary about it, especially as there shouldn't be any need for them09:39.34 
artifexirc-bot <KenSharp> And by documented, I really mean used in an example09:39.38 
chrisl Because it's trying to support running in Level 1 mode, which we no longer support :-(09:40.49 
artifexirc-bot <KenSharp> We should probably update the documentation to use setpagedevice (or simply command line parameters)09:41.15 
chrisl I actually thought we had - shows what I know!09:41.44 
artifexirc-bot <KenSharp> There's so much documentation for Ghostscript, its hard to remember what there is09:42.25 
Gehlot I have tested to print with Latest GS 9.53 for color print issue. Still its coming out black and white 10:14.50 
artifexirc-bot <KenSharp> OK so what is your command line now ?10:15.18 
Gehlot It has command as before 10:20.14 
  -empty, -dPrinted, -dBATCH,-dNOPAUSE, -dNOSAFER, -dNoCancel, -dPDFFitPage, -sOutputICCProfile=default_cmyk.icc -c mark /NoCancel true /QueryUser 3 /OutputFile (%printer% HP LaserJet M) /UserSettings <</DocumentName (ColorPrintTestDoc)>> (mswinpr2) finddevice putdeviceprops setdevice -dNORANGEPAGESIZE",10:20.15 
artifexirc-bot <KenSharp> Well you **really** shouldn't use -dNOSAFER but let's ignore that for now10:20.41 
  <KenSharp> So does your pritner name really begin with a space ?10:20.59 
  <KenSharp> You've got the name as "%printer% HP LaserJet M"10:21.21 
  <KenSharp> with a space between % and H10:21.30 
Gehlot No10:21.58 
  Its typo 10:22.01 
artifexirc-bot <KenSharp> Then start by removing the space10:22.06 
  <KenSharp> OK so when you execute that, do you get a print dioalog ?10:22.24 
  <KenSharp> Actually there are more problems there10:22.49 
  <KenSharp> You've -dNoCancel as well as setting NoCancel in the PostScript fragment. Use one or the other, not both10:23.14 
Gehlot ok10:23.29 
artifexirc-bot <KenSharp> The PostScript following -c includes -dNORANGEPAGESIZE so I'd expect that to throw a PostScript error10:23.52 
  <KenSharp> Because that's not valid PostScript.10:24.01 
  <KenSharp> And in any event you shouldn't use it, it has no effect on the mswinpr2 device10:24.25 
Gehlot But I am confuse How It can affect some printers. Some printer print in color some not 10:24.26 
artifexirc-bot <KenSharp> You can also drop the OutputICCProfile, that won't be doing anything10:24.42 
Gehlot Yes I tried it 10:24.53 
artifexirc-bot <KenSharp> Again, do you get a print dialog when you execute this ?10:25.06 
Gehlot No 10:25.14 
artifexirc-bot <KenSharp> Well then I imagine that's your problem10:25.23 
  <KenSharp> The mswinpr2 device is not intended as a print server, its intended to be used by a single user who wants to print stuff10:25.51 
  <KenSharp> I expect the default state of your pritner is 'gray'10:26.09 
  <KenSharp> If you want the pritner to print in colour you need to change its default to 'colour'10:26.22 
Gehlot Yes My intension is same that use will print pdf from my application without any interaction10:26.37 
  We have already configured it as print in color 10:26.57 
artifexirc-bot <KenSharp> Well as I said, what you will get is whatever the default setting of the pritner is10:27.06 
  <KenSharp> ThYou have to have the **default** setting of the pritner be in colour as I recall10:27.31 
  <KenSharp> The mswinpr2 device doesn't change it10:27.40 
  <KenSharp> If you don't set the printer name then you should get a print dialog. I'd suggest you try that, and look at the settings for the printer, I expect they will show up as grayscale if you try that10:28.57 
Gehlot At printer configuration we have set it to print in color by default also When We I use gs to print its fails 10:28.58 
  I am setting printerName in command line 10:29.18 
artifexirc-bot <KenSharp> When you say 'fails' what do you mean ? AN error ?10:29.18 
Gehlot sorry I mean B/W print 10:29.32 
artifexirc-bot <KenSharp> Yes, and I just said 'don't set the printer name in the command line'10:29.55 
  <KenSharp> That will (or should) get you a print dialog10:30.03 
  <KenSharp> Then you can look at teh printer settings that mswinpr2 is using. They will be the 'defaults' for that printer10:30.21 
Gehlot am afraid that its main feature of my application that redirect print to pritner without showing any printer selection popup10:31.13 
artifexirc-bot <KenSharp> This is what's called debugging10:31.26 
  <KenSharp> I'm asking you to try stuff and see what it says10:31.38 
Gehlot At least for testing I am removie it from command line and test it 10:31.53 
  ok10:31.57 
artifexirc-bot <Robin_Watts> Hi @rodrigo.emobix.17:59.17 
  <Robin_Watts> Gimme a mo, and i'll get you into the other channels.17:59.28 
  <rodrigo.emobix> Hi! thanks17:59.59 
  <Robin_Watts> OK, you should be able to see the company channels now.18:03.15 
  <rodrigo.emobix> yep, I'm seeing them now18:05.01 
 <<<Back 1 day (to 2020/12/02)Forward 1 day (to 2020/12/04)>>> 
ghostscript.com #mupdf
Search: