Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2017/03/23)20170324 
tt ?02:15.11 
  hi02:15.16 
ghostbot Welcome to #ghostscript, the channel for Ghostscript and MuPDF. If you have a question, please ask it, don't ask to ask it. Do be prepared to wait for a reply as devs will check the logs and reply when they come on line.02:15.16 
osfe Hi there. I'm looking for a way to convert the black parts of a p[s|df] file to white and just the black parts (the file is w/b)08:19.37 
  please08:19.40 
kens "<</NegativePrint true>> setpagedevice"08:20.36 
  That's a device-dependent parameter. Otherwise you need to set a transfer function08:21.12 
  For NegativePrint see the PostScript Language Reference Manual 3rd edition, page 41508:21.53 
  For transfer funcitons in PostScript, see the PLRM, settransfer operator, page 685.08:22.48 
  Transfer funcitons in PDF are covered in section 6.3 of the 1.7 PDF Reference Manual, on page 48408:23.29 
osfe kens: hhmm, ok08:27.59 
  gs -o input.pdf -sDEVICE=pdfwrite -c "<</NegativePrint true>> setpagedevice" -f output.pdf something like that ?08:29.43 
kens You can try it08:29.57 
osfe kens: how would you write it ?08:31.43 
kens I wouldn't, I don't need to invert the output of files.08:32.00 
osfe ok08:33.06 
kens Actually, that won't work08:33.22 
  PDF files can't have a page device dictionary, and pdfwrite won't apply NegativePrint.08:33.42 
  So you'll need to use a transfer function.08:33.53 
osfe kens: unless I convert to ps before ?08:34.07 
kens No.08:34.13 
  THe NegatiovePrint parameter is a page device parameter which is only applied at rendering.08:34.30 
  Siunce pdfwrite doesn't render, it won't apply it.08:34.41 
  And it can't preserve it, because PDF files can't have that parameter08:34.56 
osfe so... ?08:35.37 
ghostbot so... are we the only ones here today? seems awfully quiet...08:35.37 
kens osfe : so use a transfer function, like I said08:36.04 
osfe kens: ok08:36.58 
  gs -o output.pdf -sDEVICE=pdfwrite -c "{1 exch sub}{1 exch sub}{1 exch sub}{1 exch sub} setcolortransfer" -f input.pdf something like taht08:37.56 
kens Well that's a color transfer function, I'd think you just want settransfer, since you say its a monochrome file08:38.40 
osfe gs -o voltage_input_frontend_inv.pdf -sDEVICE=pdfwrite -c "{1 exch sub} settransfer" -f voltage_input_frontend.pdf 08:45.51 
  it does not work 08:45.55 
  I need help please08:46.01 
kens I suspect the PDF interpreter does an initgraphics, which will defeat a settransfer08:46.25 
  You could try setting it as part of a BeginPage procedure instead08:46.46 
osfe I'll do it with convert08:49.10 
  too complicated08:49.14 
  plus it's too be included in a latex document, not even sure it works08:49.40 
  for f in *.pdf; do convert -density 600 -negate "$f" "${f%.pdf}_inv.pdf";done08:57.42 
  works but generates larger files08:57.51 
kens Probably becasue the content is now all bitmap image08:58.07 
osfe kens: sure09:08.15 
  gnuplot09:08.23 
 Forward 1 day (to 2017/03/25)>>> 
ghostscript.com
Search: