| <<<Back 1 day (to 2013/08/08) | 2013/08/09 |
marcosw | there is currently a deal on refurb Micrososft Surface RT Tablets: http://www.ebay.com/itm/32GB-Microsoft-Surface-RT-Tablet/181191727647?pt=US_Tablets&hash=item2a2fde5a1f | 04:33.10 |
| if anyone outside the US wants one I can buy it and bring it to the next staff meeting. | 04:33.38 |
mvrhel_laptop | it would be worth while to grab an extra one of those for demo | 05:04.13 |
neves | Hi | 05:47.17 |
ghostbot | hola, neves | 05:47.17 |
neves | I was wondering if there was a way to threshold a pdf file | 05:47.35 |
| using ghostscript | 05:47.42 |
ray_laptop | neves: looks like you are still around. | 06:04.56 |
| neves: not sure what you meant by your question. "Threshold" can mean anything from halftoning using a threshold array to mapping to binary black / white with everything above or below the threshold level set to B or W | 06:06.47 |
| neves: and then, what format output is desired ? Generally, only raster formats such as TIFF or pbm / pkm are halftoned. GS can generate a halftoned or "extreme contrast" raster image, and for some image formats, can turn that back into PDF as an image with a PDF wrapper (like many scanners produce) | 06:09.33 |
neves | bascially set it to | 06:09.36 |
| black and white | 06:09.38 |
ray_laptop | neves: and if the page has colors or shades of gray, what do you want ? | 06:10.17 |
neves | pages has colour on the extreme range like yellow - wish to produce something that is printable ... so black and white | 06:10.51 |
ray_laptop | halftoned/dithered or "solid" | 06:10.55 |
neves | solid | 06:11.00 |
ray_laptop | OK. What format do you need to produce ? | 06:11.28 |
neves | PDF to PDF | 06:11.34 |
ray_laptop | our PDF->PDF with color management (or in this case, color mis-management) is still a work in process as far as mapping colors, but retaining the "structure" of the PDF (searchable text, etc.) | 06:13.27 |
| if that is a requirement, you _may_ be able to use our git HEAD version, but kens is the developer working on that who can tell you what works and what doesn't | 06:15.35 |
marcosw_ | I'm going to take bugzilla down for a bit, I'll send out another message when it's back up. | 06:16.34 |
ray_laptop | if going to a raster image only is OK, then I suggest going to 'pbmraw' (-sDEVICE=pbmraw) and then using lib/ivewpbm with -sDEVICE=pdfwrite to take it back to PDF | 06:17.09 |
neves | is that like gs -sOutputFile=grayscale.pdf -sDEVICE=pdfwrite \ -sColorConversionStrategy=Gray -dProcessColorModel=/DeviceGray \ | 06:17.10 |
| similiar or using the iccprfoles ? | 06:17.16 |
| icc-profiles | 06:17.20 |
ray_laptop | neves: yes, but you need a "special" device ICC profile that will do the thresholding (or just darkening the yellow) | 06:17.59 |
neves | well yelllo was an example colour that when converting to grayscale is still impossible to see properly when printed | 06:18.37 |
ray_laptop | neves: kens is the person to ask (ken.sharp) he'll be here in a few hours (he's in the UK) | 06:19.20 |
neves | ahhh ... yeah my current process is converting to image / threshold then back to PDF which seem kinda convoluted approach | 06:20.10 |
| Thanks Ray i'll seek out ken.sharp next week since i should prepare for the weekend | 06:21.28 |
| but i'll test out [16:17] <ray_laptop> if going to a raster image only is OK, then I suggest going to 'pbmraw' (-sDEVICE=pbmraw) and then using lib/ivewpbm with -sDEVICE=pdfwrite to take it back to PDF | 06:21.33 |
| Thanks Heaps | 06:23.07 |
ray_laptop | neves: for the raster approach, you probably want to set a transfer function with your desired threshold value. PBM is dithered by default | 06:23.34 |
neves | alright - I'll probably use this as an interim measure, until I can speak to Ken ... would love to keep text and lines in the structure of the PDF as much intact as possible. | 06:25.42 |
ray_laptop | For example: gs -sDEVICE=pbmraw -o out.pbm -c "{ .2 lt { 0 } { 1 } ifelse } settransfer" -f in.pdf | 06:26.16 |
neves | Cheers mate :D | 06:27.29 |
ray_laptop | then gs -sDEVICE=pdfwrite -o out.pdf -r720 -dSCALE=1 -- lib/viewpbm.ps out.pbm | 06:30.08 |
| For example: gs -r720 -sDEVICE=pbmraw -o out.pbm -c "{ .2 lt { 0 } { 1 } ifelse } settransfer" -f in.pdf | 06:30.18 |
| (I forgot that you want a decent resolution when rendering your bitmap) | 06:30.45 |
| thus adding the -r720 | 06:30.56 |
| but, as I mentioned, that "dumbs down" the file to a raster image at a fixed resolution | 06:32.18 |
neves | yeah if i don't set the res - it looks pretty terrible | 06:33.13 |
ray_laptop | right | 06:33.28 |
| the default for pbmraw is 72 dpi | 06:33.44 |
| neves: good luck. And make sure and check in with kens later. I'm going to bed soon (I'm on the West coast of the US, so it is 11:35pm here) | 06:34.57 |
neves | Thanks and GOOD NITE - ITS FRIDAY TOMORROW FOR YOU | 06:35.14 |
| its 4:35pm Friday Afternoon (East Cost) Australia | 06:35.26 |
ray_laptop | neves: well, have a good weekend | 06:35.55 |
marcosw_ | Bugzills is back up. | 06:36.08 |
neves | most certainly ! | 06:36.09 |
ray_laptop | marcosw: I didn't miss it :-) | 06:36.32 |
| kens: you just missed somebody from .au wanting to know about thresholding PDF->PDF (see the logs). Not sure how close that is if they have an ICC profile that does the thresholding | 06:50.10 |
| kens: and, BTW, good morning :-) | 06:50.24 |
kens | thresholding ? This is about halftones ? | 06:50.28 |
| I'll get to the logs in a bit | 06:50.36 |
ray_laptop | kens: No, he? wanted to make all colors either black or white, no dithering (extreme contrast) | 06:51.13 |
kens | Oh. He could do it to gray, but not B/W | 06:51.36 |
ray_laptop | so that yellow text would come out black | 06:51.38 |
kens | I'll be talking some more about colour and pdfwrite at the staff meeting I expect | 06:52.14 |
ray_laptop | kens: to gray is OK, I suspect as long as they can have an output/device ICC profile that does the mapping to B or W | 06:52.37 |
| kens: I hope so. | 06:52.48 |
| seems to be a hot topic | 06:52.56 |
kens | It seems to have become so recently | 06:53.10 |
| He/she can try using ColorConversionStrategy=Gray along with PDFUseOldCMS=false and a Gray ICC profile which does the B/W output | 06:54.08 |
ray_laptop | kens: I suspect that among PDF tools, that is something that is missing. A market opening :-) | 06:54.09 |
kens | Actually quite a few tools can do it | 06:54.25 |
| All commercial of course | 06:54.38 |
ray_laptop | kens: hopefully "neves" will come back and check here | 06:54.43 |
| (the logs) | 06:54.47 |
kens | I can't guarantee it will do anything useful at the moment, the intention to date has been for colour space cvonversion, not colour management as such | 06:55.25 |
ray_laptop | kens: does it pre-apply the output ICC profile to DeviceGray, or does it output gray colors with the device profile in an OutputIntent ? | 06:56.54 |
kens | ray_laptop : no idea, one for Michael | 06:57.10 |
| I only use the 'API' | 06:57.23 |
ray_laptop | kens: does pdfwrite output an OutputIntent in the the PDF file ? | 06:57.59 |
kens | ray_laptop : that's totally different. We cna do so, but its nothing to do with LCMS or colour management | 06:58.22 |
ray_laptop | and with ColorConversionStrategy=Gray are all colors in /DeviceGray or are they still ICC or other ? | 06:58.44 |
kens | DeviceGray | 06:58.57 |
| If you want ICC then yuou select UseDXeviceIndependentColor | 06:59.08 |
ray_laptop | OK. So probably they colors have gone through input_cs -> device color conversion (where device colors are /DeviceGray) | 06:59.55 |
kens | ray_laptop : yes, I'mpretty sure that's the case, I just don't remember exactly what steps are involved. I haven' had time to do much with the code recently | 07:00.29 |
ray_laptop | kens: I understand. I've been pretty swamped, too. | 07:01.01 |
kens | At least I'm down to 91 bugs now | 07:01.20 |
| (Unless Marcos added another flood that I haven't seen yet) | 07:01.34 |
ray_laptop | one came in for you a little bit ago. | 07:02.00 |
kens | Well I'll get to my email after teh irc logs.... | 07:02.14 |
ray_laptop | bug 694509 | 07:02.28 |
| kens: ignore his suggestion to dump it over to me ;-) | 07:02.59 |
kens | ROFL> Is he Lojdl from irc last night ? | 07:03.18 |
ray_laptop | kens: don't know, but I doubt it. "Chapman Flack" has put in a few strange bugs. | 07:05.00 |
kens | Yes, that's a familiar name | 07:05.20 |
ray_laptop | usually they ended up as WONTFIX | 07:05.21 |
kens | Yep :-) | 07:05.28 |
| OK the conversation above should be enough for neves, or I'll talk to him next week. Nothing new on SO, email now | 07:06.25 |
ray_laptop | kens: on that one, probably just point out -sGenericResourceDir= as well as -I___ and that'll be it | 07:06.34 |
kens | Ah I think that one is currently with marcosw, I never use -sGenericResourceDir, I only ever use -I | 07:07.07 |
| I 'may' look at it or I may ignore it for a bit, I'm halfway through some Outlines/Dests work in the PDF interpreter | 07:07.47 |
ray_laptop | kens: http://bugs.ghostscript.com/show_bug.cgi?id=694509 is yours (now) | 07:07.50 |
kens | well I guess marcos re-addigned it, I knew it was coming my way eventually | 07:08.08 |
ray_laptop | I (sometimes) use -sGenericResourceDir=___ to pick up fonts from a place where I have Adobe fonts (for comparing bitmaps to Adobe with a close match on text) | 07:09.30 |
kens | I add those manually by editing fontmap.gs | 07:09.58 |
ray_laptop | time for bed... | 07:10.38 |
kens | goodnight ray | 07:10.47 |
ray_laptop | until tomorrow ... | 07:11.09 |
chrisl | kens: you can punt Bug 694509 to me, if you like. I did look at some stuff around that area (quite) a while back | 07:13.36 |
kens | chrisl OK thanks | 07:13.46 |
chrisl | I won't promise not to kick it back to you when I get totally confused, though! | 07:14.10 |
kens | I'm inclined to ignore it right now, I've never seen the point of it | 07:14.30 |
chrisl | There's a lot of stuff surrounding GenericResourceDir that I don't like - the commit referenced in that bug report being top | 07:15.19 |
kens | well, its an Igor commit IIRC | 07:15.40 |
chrisl | No, the other one - where were search the path from a "-I" option for the string "Resource" and then automagically set GenericResourceDir to that if the string exists - I *hate* that! | 07:16.55 |
kens | Hmm, that does sound klunky | 07:17.20 |
| I've only glanced at the bug yesterday, too busy with pdfmarks and stuff | 07:17.42 |
| Marcos wants me to remove the stopped context that I added to fix all the bugs that were raised with disastrously broken PDF files :-) | 07:18.14 |
| I can revert that easily enough.... | 07:18.25 |
chrisl | Huh? So why raise the bugs to start with? | 07:18.31 |
kens | I don't know, maybe Marcos was in a rush and didn't realise how badly broken the files are (Acrobat won't open the majority of them) | 07:19.06 |
| In large part because many of tehm have no actual content (or Pgaes tree, or trailer dict etc) | 07:19.27 |
chrisl | Hmm, maybe. Rather a waste of your time, though.... | 07:19.57 |
kens | Well reading the bugs and closing them took more time than wrapping pdfrun in a stopped context :-) | 07:20.34 |
marcosw | kens: don't blame me, Robin_Watts checked them into the repository. I should have checked that they worked in Acrobat... | 07:53.27 |
kens | marcosw Iit wasn't intended as blame.... | 07:53.47 |
| BTW I see there's a customer pressing you about a couple of issues (LUratech being one), will you pass those over to someone before you go on holiday ? | 07:54.30 |
marcosw | marcosw: I know you weren't blaming me, but I feel guilty for wasting your time. | 07:55.09 |
| let me check my email... | 07:55.42 |
kens | Its OK, I actually quite liked having the pdfrun in a stopped context because it prevents errors, but if it causes problems for testing I'm fine with leaving it out (it alsoe itnerferes with me when I screw up a PDF itnerpreter change, because it doesn't tell me what I screwed up) | 07:56.04 |
marcosw | kens: I can't duplicate the luratech issue, and I ran the performance numbers earlier this week but then forgot to look at the data, funny how often that happens to me :-( | 07:58.18 |
kens | Hmm, not much we can do if we can't reproduce the numbers. | 07:58.39 |
| Err faults... | 07:58.54 |
| I'd gues the performance differences are down to doing proper colour management tough | 07:59.33 |
marcosw | I'm thinking it might be that they are using an old LUratech version. I asked them to scheck the LDF_JB2_VERSION_STRING but didn't hear back. I'll try again. | 07:59.33 |
kens | Makes sense. I guess Henry and I will cover support while you're on vacation | 07:59.52 |
| Can you let one of us know how you do the AIX thing ? | 08:00.34 |
marcosw | kens: yeah, I'll write up a guide to how the ibm virtual loaner program works. | 08:03.46 |
kens | Thanks, just in case we need to run on an AIX box... | 08:04.00 |
marcosw | spreading of which, wasn't chrisl going to buy a IBM box to run AIX? | 08:04.06 |
kens | sincerely hopes we don't have to | 08:04.14 |
marcosw | or at least look into it. | 08:04.15 |
kens | I think he wasy yes | 08:04.21 |
chrisl | There seemed to be little enthusiasm for the idea, what with the licensing issues, and so on | 08:04.44 |
| I will certainly look into it again after I get the release buttoned up. I still think having a box here that I can test on regularly would be beneficial | 08:07.31 |
kens | I rather agree myself | 08:07.45 |
chrisl | It is one of the more non-standard Unices | 08:08.06 |
| ebay is a bit barren on the IBM workstation front just now - I'll keep an eye out, though | 08:15.43 |
kens | Thanks | 08:15.57 |
chrisl | If I get it sorted out it *might* even motivate me to get my raspberry-pi gateway server setup so others can access my machines! | 08:16.57 |
kens | :-) | 08:17.06 |
dingerkingh | Hey All - Has anyone experienced ghostscript maxing out the CPU and really slow to process? | 11:40.14 |
kens | sounds liek a PDF file with lots of transparency | 11:40.41 |
dingerkingh | Well - it is actually anything at all I print. | 11:47.42 |
kens | then no. | 11:47.54 |
dingerkingh | I assume it must be a problem with the driver - just didn't know if there was something I could look for specifically. Thanks anyways! | 11:48.51 |
marcosw | tor7: would it be okay with you if I move mupdf.com from /home/tor/public_html/mupdf to /var/www? | 16:17.36 |
ray_laptop | Robin suggested 'even+' for selecting the padded even pages of --saved-pages. I don't really like the use of '+'. Does anyone have other ideas ? evenpadded or evenpad come to mind, but I am tending to making the default be as chrisl suggested | 16:22.17 |
| which (iirc) is to have even produce the pad, and just document it. Then maybe add the less useful even without the automatic extra blank page be evenunpadded or something | 16:23.50 |
chrisl | ray_laptop: yes, I think most people, most of the time will want the "extra" page ejected | 16:24.41 |
| ray_laptop: I thought there was a standard Postscript setting (like page device policy, or something) that controlled that kind of last page padding, but I can't find it - maybe it was specific to the printer we were dealing with at the time....... | 16:27.49 |
ray_laptop | chrisl: You are probably thinking of the comment on p. 416 of the PLRM: "On device activation, a duplex device always prints the first page on a new sheet of medium; on deactivation, it automatically delivers the last sheet of medium if it has been printed on only one side." | 16:36.22 |
| chrisl: so I think it is more similar to do that when printing saved pages 'even' | 16:37.52 |
chrisl | ray_laptop: could be. Although, I'm sure I remember something like "/PageEjectOdd", or something, but it must have been specific to that printer (there was *lots* of settings specific to that printer!) | 16:46.06 |
mvrhel_laptop | ray_laptop: Did you see Miles' email about the J9, J11 and J12 test files? I was wondering if we had these | 16:47.26 |
ray_laptop | mvrhel_laptop: When was that email? I didn't see it. | 17:01.57 |
mvrhel_laptop | it was Wed. evening | 17:02.16 |
ray_laptop | mvrhel_laptop: did you ever put together your notes on what you are going to 'present' ? | 17:02.23 |
mvrhel_laptop | ray_laptop: yes. still jotting down a few things though | 17:02.57 |
| have the raspberry pi working now and everything built on it | 17:03.18 |
| ready to do a bit of testing | 17:03.32 |
ray_laptop | mvrhel_laptop: I have a whole bunch of JEITA files | 17:03.33 |
| I have J1 through J12 in PS and in PDF | 17:05.08 |
mvrhel_laptop | ok. that will be fine. I wonder why miles says *.doc and *.ppt. | 17:06.29 |
| ray_laptop: I would like to get these files if that is fine | 17:07.05 |
| that is J1 through J12 PS and PDF | 17:07.16 |
ray_laptop | mvrhel_laptop: I'll package them up and put them on casper. I'll let you know when they are ready | 17:08.25 |
mvrhel_laptop | great thanks. can I give you a call a bit later? | 17:08.53 |
ray_laptop | mvrhel_laptop: The "original" JEITA files come as .doc, some .ppt, and I think some .xls -- they are intended to be 'printed' through a driver to be prepped for a particular printer. | 17:10.34 |
mvrhel_laptop | and so these pdf and ps files were created by some application | 17:11.38 |
| from those | 17:11.45 |
ray_laptop | mvrhel_laptop: the only .ppt source doc I have is J11.ppt but IMHO working from some Microsoft formats means you will never get the same thing with different versions of Office and drivers | 17:11.47 |
mvrhel_laptop | right | 17:11.54 |
ray_laptop | mvrhel_laptop: the PDF's were all from acrobat | 17:12.09 |
| The PS files are less useful (we don't have some fonts that the PS expects so we get errors | 17:15.28 |
mvrhel_laptop | ray_laptop: ok | 17:18.18 |
ray_laptop | oops. For some reason, I don't have J8 as PDF | 17:19.12 |
| darn. And Acrobat won't convert it. I converted it to PDF using gs. | 17:34.36 |
| mvrhel_laptop: OK. the JEITA files are up there casper.ghostscript.com:~ray/public let me know if you can access them | 17:35.26 |
| if you want .PS files, I'll have a go at looking at whatever is breaking (I get fatal errors in FAPIbuildchar) | 17:36.06 |
| mvrhel_laptop: but first I need to figure out what's up with the my fix for cust 532's problem. There's about 12 files that produce serious regressions with the patch (out of over 2100 PDF files in the suite) | 17:37.17 |
mvrhel_laptop | ray_laptop: How did you convert a *.doc file using gs? | 17:37.35 |
ray_laptop | mvrhel_laptop: I don't have any .doc files. I have a PS of J8 and I converted that | 17:38.01 |
mvrhel_laptop | ah ok | 17:38.06 |
| sorry | 17:38.08 |
| thanks ray_laptop. I will grab the files now | 17:38.18 |
ray_laptop | mvrhel_laptop: I have to run an errand, but I want your help. I'll send the file that fails and the pdf_draw.ps (again) | 17:38.51 |
mvrhel_laptop | uhoh | 17:39.22 |
| ray_laptop: ok I have the files. Thanks | 17:43.30 |
| ray_laptop: got the file, looking over its insides now just to see what it has | 18:04.36 |
ray_laptop | mvrhel_laptop: I am seeing the image being clipped: the /x148 Do gives me: | 18:07.28 |
| [b]Image: w=560 h=199 [63.421 0 0 -110.82 0 120.17] | 18:07.29 |
| [b]Image: spp=1, bps=8, mt=(0,120.168) | 18:07.31 |
| [b] cbox=(0,0),(399,120), obox=(0,0),(399,120), clip_image=0x0 | 18:07.32 |
| (I am using -Z:bfvq ) | 18:07.46 |
| then when it gets to the data it gives: | 18:09.08 |
| [b]image1 y=0 | 18:09.09 |
| [b]yci=9, hci=111 | 18:09.11 |
| [b]pixel0 x=0, y=120.168 | 18:09.12 |
| [b]image y=0 dda.y.Q=9.34766 | 18:09.14 |
| [b]image1 y=0 | 18:09.15 |
| [b]yci=-101, hci=110 | 18:09.17 |
| [b]pixel0 x=0, y=9.34766 | 18:09.18 |
| [b]image y=1 dda.y.Q=-101.473 | 18:09.20 |
mvrhel_laptop | there are a pile of cm settings at the start | 18:09.25 |
| this file blows. with a pattern that has a softmask and another pattern | 18:11.39 |
ray_laptop | yeah, no kidding | 18:13.13 |
| typical of the ones that are problematic -- all from cairo | 18:13.28 |
| cairo created PDF's SUCK | 18:14.20 |
tkamppeter | Is it correct that Ghostscript 9.08 does not contain any of Makefile, Makefile.in, or Makefile.am? | 18:14.42 |
mvrhel_laptop | yes agreed | 18:14.47 |
| ok this file is ridiculous | 18:16.51 |
ray_laptop | tkamppeter: I have a Makefile.in | 18:17.05 |
mvrhel_laptop | I need to write this thing out | 18:17.07 |
ray_laptop | tkamppeter: it's in the git repo, so it should be in the tar.gz | 18:17.46 |
| but I didn't look at chrisl's tarball release candidate | 18:18.44 |
tkamppeter | ray_laptop, sorry, seems that something went wrong. | 18:21.43 |
mvrhel_laptop | f*** the soft mask is an alpha type (not luminosity like most) and it also has a pattern | 18:23.53 |
| sweet and that pattern has a soft mask | 18:25.00 |
| i think we need to prune this thing back a bit | 18:25.20 |
| ray_laptop: so the thing that I see is that their is a cm setting right before the Do for /x148 | 18:36.48 |
| s/their/there/ | 18:36.56 |
| and /x148 is an image with a /SMask | 18:37.16 |
| where the /SMask is the same size as the source image | 18:37.41 |
ray_laptop | mvrhel_laptop: interesting. The 'initclip' is setting the to an empty region LL (0,159) UR (0,159) :-( | 18:57.55 |
| I have to look at the initclip with the debugger and see why ! | 18:58.25 |
| I'll let you know when I understand it. It must have to do with the pattern | 18:58.57 |
mvrhel_laptop | ray_laptop: that is probably correct (that it has to do with the pattern) | 19:59.21 |
tkamppeter | I have uploaded GS 9.08rc1 to Ubuntu Saucy now. | 20:21.54 |
ray_laptop | mvrhel_laptop: Got it! The problem was the /Matrix. Once I take care of that, then I don't need the initclip (the clip path gets transformed by the matrix correctly that way). Now for another regression run | 22:43.41 |
mvrhel_laptop | rayjj: that is great! | 23:43.31 |
ray_laptop | down to a single file 693681 | 23:53.33 |
| 691785 ppmraw 72 showed up with single pixel diffs only, so I'm ignoring it | 23:56.05 |
| Forward 1 day (to 2013/08/10)>>> | |