IRC Logs

Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2014/05/13)2014/05/14 
mvrhel_laptop bbiaw00:17.27 
jhabjan gmorning, does screen device in gs discards hidden layers ?03:31.05 
xxyyzz_ test04:59.34 
chrisl kens: if you build gs on Unix without the x11 libs available (or with --without-x) bbox is the default device. I build the binaries with --without-x as the x11 libs have historically been some of the worst offenders in breaking the ABIs (although I believe they are much better these days).06:55.59 
kens The poster did update the bug report and said they were using x11alpha06:56.28 
  I'm puzzled as to why this device is using bbox as a forwarxding device (and the bug can only appear if its a forwarding device)06:56.53 
  NB when you use bbox on its own the problem doesn't occur (and the reporter confirmed that). And tehre is no error code when I run the PDF using bbox, so I'm even more puzzled.06:58.03 
  I'll try to look at it later, under Linux06:58.13 
  Possibly a good time to get the evaluation of the debugger Robin mentioned06:58.41 
chrisl kens: it seems to be when we render to a buffer and then copy to the x11 pixmap buffer (rather than rendering directly to the x11 pixmap). Presumably we accumulate the bbox so we only copy the marked area from the gs buffer to the x11 pixmap...... I'm not sure what triggers that, though07:00.54 
kens I htought it might be something like that, but who knows...07:01.16 
  To be honest, teh patch looks sane, I'd just like to understand the failure better07:01.36 
chrisl I can take a look in a little while - save you braving the Unix world, if you like07:01.51 
kens Well you're probably better equipped :-)07:02.06 
chrisl Okay, I'll poke at it this afternoon07:02.42 
kens Need to sort out mooscript too, I'mprobably going to have to put that down for a few days, so I'd lke to get my current code committed07:02.42 
chrisl Okay, so you have your non-committed changes stashed?07:03.05 
kens not quite yet, just a moment07:03.13 
chrisl And no commits you haven't push to me07:03.37 
kens No new commits at present07:03.46 
  OK stashed07:03.55 
  currently at 7f7c927 fall back and convert to RGB any images....07:04.17 
chrisl Okay, do a git log, and find the SHA of the first non-mooscript commit07:04.26 
kens looks like 8033bc "Tweak xpsprint build" Jan 23rd07:05.16 
chrisl Yep, that looks sane: now do "git reset --hard 8033bc"07:05.58 
kens Hmm, but if I do git logg then I see origin/master Words about static linking the executable07:06.05 
  Oh OK07:06.09 
  OK done07:06.35 
chrisl Now pull normally from mooscript on my repo07:06.51 
kens so git pull --rebase chrisl ?07:07.02 
chrisl git pull --rebase chrisl mooscript07:07.08 
kens churning....07:07.35 
chrisl You probably get some "suppressed white-space error...." type warnings07:08.01 
kens Nope.07:08.07 
  git log now sats c570c (by me) "Update the alpha handling and support Indexed spaces"07:08.33 
  non-mooscript seems to be may 9th "add an app independent custom memory manager for libjpeg"07:09.17 
  89fca07:09.38 
chrisl Yes, but I don't have "fall back and convert to RGB any images".... hmm07:09.46 
kens Oh, maybe I didn't tell you about that one07:10.04 
chrisl Okay, then "git cherry-pick 7f7c927"07:10.21 
kens OK got that one07:10.47 
  Hmm it wa bigger than I thought07:10.58 
chrisl bigger?07:11.12 
kens more changes, 33 insertions, 21 deletions07:11.22 
  I thought it was a smaller change07:11.35 
chrisl It might be because of how the cherry-pick merge happens07:12.01 
kens GOod point07:12.10 
chrisl You can double the commit contents if you like07:12.24 
kens Double them how ?07:12.43 
chrisl double check, I meant07:12.51 
kens Ah :-)07:12.58 
  I expect its OK07:13.09 
  SO I can pop the stash now ?07:13.17 
chrisl First, if you can do a git push -f to your repo07:13.36 
kens OK07:13.41 
chrisl for the mooscript branch, of course07:13.49 
kens So git push -f mooscript should be OK, since it forwards to my repo ?07:14.06 
  actually I'll be explicit07:14.30 
chrisl Er, I think that will push it to the central repo07:14.35 
kens OK so git push -f kens mooscript then07:14.51 
chrisl Yes, that's safer07:15.05 
kens ok done07:15.19 
chrisl kens: Okay, I've now got your extra commit, and pushed it to casper, too. You can stash pop, and have at it07:16.49 
kens Hmm, I got a conflict message about win32/svg.vcproj deleted in updated upstream and modified in stashed changes (upgarded to VS 2008 project)07:17.09 
  Seems the stashed one is left in the tree, so that's OK07:17.41 
chrisl Well, you can probably just delete it, because it shouldn't referenced any more07:18.08 
kens Lets see what VS makes of it all :-)07:18.08 
  Indeed.07:18.18 
  Itdoesn't matter because I (obviously) don't commit the changed project files anyway07:18.40 
  ok the image code looks sensible, so all the commits seem to be there.07:19.20 
  I'm going to commit the shading code as it stands now so I don't accidentally lose it07:19.52 
  Wnat me to push it so you can look ?07:20.04 
chrisl Well, it would be safer to push, even if I don't pull the commit to here07:20.56 
kens OK I'll do it in a second, just reviewing the changes07:21.10 
  There's a comment I should add I'll do that first.07:21.25 
  and some tabs, need to fix those too07:21.46 
  Comes of copy/paste from the MuPDF sources07:21.56 
  OK changes pushed ot my repo07:30.44 
  chrisl ping08:03.53 
chrisl kens: pong08:09.00 
kens chrisl I can't build GS on Linux, keeps giving me an error "No rule to make target 'obj/svgwrite.dev', needed by 'obj/ld.tr'08:09.55 
  I did a ./configure and make clean before building08:10.09 
chrisl Your configure script it out of date08:10.24 
kens So I need to run autogen ?08:10.48 
chrisl Yes08:11.03 
kens OK thanks08:11.09 
chrisl kens: I see a segfault with the file from 69522708:15.02 
kens THat's the x11alpha and bbox ?08:15.17 
chrisl Yeh08:15.26 
kens I'm mostly curious about the text error which precedes the seg fault08:15.31 
  Because I don't see that with other devices.08:15.44 
  Obviously if the creation of the enumerator (penum) fails, then the rc_assign isn't going to work.....08:16.04 
chrisl It's coming from show_state_setup()08:17.13 
kens Interesting.08:17.20 
  I nearly have a Linux debug build.....08:17.42 
chrisl The matrix is haywire08:18.40 
kens Ah, well that would probably do it.08:19.08 
  Might want to examine that in the PDF itnerpreter too.08:19.19 
  JKust telling the reporter with the pattern problem to make a simpler example file.08:20.14 
chrisl So, it looks like we should just drop out of bbox_text_begin() when we get the error08:20.23 
kens Indeed, and that's exactly what the supplied patch does.08:20.38 
chrisl Oh, well that's not how I'd code it, but the intent is the same08:21.12 
kens I was happy enough with that, but I didn't understand why/how we were ending up in the bbox device, nor why there was a fault.08:21.19 
chrisl If you want me to look at the pdf interpreter, I'll do that this afternoon - does Acrobat open/display the file?08:21.56 
kens Yes, the same as GS does when running on WIndows08:22.13 
  You get a green rectangle at the top of the page08:22.30 
  Hmm, it doesn't seg fault for me08:23.38 
  Oh, because I don't have X installed08:24.15 
chrisl That'll not help.....08:24.26 
kens Yeah its using the bbox device08:24.48 
chrisl If I have bbox_text_begin() do: if (code >= 0 && bdev->target != NULL) {08:24.53 
kens Which works of course08:24.54 
chrisl It displays as you describe08:25.03 
kens Yeah that was the change I was thinking of doing08:25.13 
  It works out the same of course08:25.26 
chrisl So, it seems that if we avoid the segfault, propagate the error, then pdf interpreter makes its usual attempt to carry on, hence we get *something* displayed08:26.53 
kens Indeed08:27.02 
  THe 'something' is bascially the same as Acrobat08:27.12 
chrisl I'm happy with that change, I believe it is the right thing to do08:27.30 
kens Yep, that suits me08:27.39 
  Like I said I could see from inspection why there was a problem, I just wanted to see how we ended up there (and we don't, on Windows, or indeed for me on Linux ;-)08:28.15 
chrisl Well, unless you have the x11 devices......08:28.41 
kens Yeah, I hadn't realised the X11 devices used the bbox device, still seems daft08:29.01 
  Ah I see thre's a monstrous number in the text matrix08:30.23 
chrisl Well, it saves copying large, unmarked areas of bitmap around - that doesn't like a bad idea08:30.27 
kens Its a 39 digit number, I guess they insert it with no regard for the integrity of the PDF file, which is why the xref is broken. Of course, we should reject the file at that polint for being broken :-)08:31.54 
  OK you want to commit the change ?08:33.00 
chrisl I'll do that later - I've got to go to squash now08:34.01 
  back in a couple of hours08:34.20 
kens OK bye08:34.34 
GameScripting can anyone tell me why only subsets of my font is embedded into the pdf (see http://666kb.com/i/coc8a95jbx8mxol6h.jpg) using pdfwrite and the dSubsetFonts=false parameter?09:01.43 
kens Possibly you started with subset fonts ?09:02.04 
  Oh its TrueType, we alweays subset tt fonts09:02.24 
  Above a certain size, and a CID font is almost certainly above that size09:02.41 
Robin_Watts reboot.brb.09:05.41 
GameScripting could that be the cause I can't copy-paste any useful text informations from my pdf? People from aspose told me unicode mappings are missing http://www.aspose.com/community/forums/permalink/542001/542001/showthread.aspx#54204409:06.38 
  in my resulting pdf09:06.50 
kens Possibly. FOr a CIDFont you would need a ToUnicode CMap, which would have to be present in the original file. I can't say anything more without seeing the PDF file.09:07.30 
GameScripting Is this the direct link to the pdf file? http://www.aspose.com/community/forums/538615/postattachment.aspx09:07.59 
  or do you have to login to view the attachment?09:08.23 
kens No idea, I get access denied09:08.26 
GameScripting this one should work: https://onedrive.live.com/redir?resid=754AEF00C046FA03!5044&authkey=!AKDAbSQhTDZQEuw&ithint=file%2c.pdf09:11.14 
  what tool can i use to debug pdfs oin general, feeling kind of like lost with this problem ...09:12.13 
kens You need something to decompress the PDF file (MuPDF works for this) and then a working knowledge of the PDF format09:12.39 
  THe PDF Reference Manual provides this, its only 1300 pages09:13.15 
  ANd yes I can see your PDF file. However it offers me no way to download it, so I can't say anythign about it09:13.41 
  OK Now I see a download button09:14.18 
GameScripting great! :)09:14.28 
kens You've sent me the Ghostscript output, I can make that myself (althoughj I would use up to date software), I can't tell you anythgin much from that, I need the original input file.09:15.12 
  All I cna say from that file is that it contains a subset re-encoded font, with no ToUnicode CMap, and so it is unsearchable. This also means copy/paste will give you unreliable results.09:17.50 
  Hmm, and the font in that file is Calibri, not Tahoma09:18.35 
  And its not a CIDFont09:18.47 
  So quite different from your earlier screenshot09:19.02 
  OK My turn to be off, back in a couple of hours.09:21.59 
GameScripting @kens I've prepared the original files I have trouble with, however I don't want them to be publicy available in this irc chat. Please provide me your PGP key or e-mail, i'll send you an encrypted 7z archive containg the original files09:36.21 
tor8 chrisl: ping.09:58.57 
  chrisl_away: or you still at squash?09:59.06 
chrisl tor8: back now11:16.53 
tor8 chrisl: so I was looking at the jmemcust stuff11:17.05 
chrisl Yeh11:17.50 
tor8 the one thing that could be a potential problem is where you stick the custm pointer in cinfo->client_data11:18.22 
  we already store the fz_dctd struct there11:19.00 
  for the I/O callbacks11:19.05 
chrisl tor8: Okay, that's not going to be hard to resolve....11:19.57 
  Although, I thought you always got the entire jpeg in a buffer.....11:20.35 
tor8 and there are some issues with how you use the fz_try/catch macros, but that's easily fixed11:20.37 
chrisl That's cause I no idea how it's supposed to work, and I copied it from elsewhere11:21.03 
tor8 chrisl: only sometimes, when the image has been cached in a display list11:21.06 
  chrisl: the fz_try/catch stuff is just a fancy if (setjump) ... else ... set of macros11:22.13 
  which means using return or goto/break across the try/catch block borders is going to fail horribly11:22.39 
chrisl Erm, I copied that from somewhere else......11:23.05 
tor8 return in the catch block is safe, *unless* the catch block is itself inside another try-block11:23.46 
  but in this case, you don't need to do any try/catch around the fz_jpeg_mem_init call at all11:24.25 
  it will throw, and that's okay11:24.38 
  anyway, the client_data stuff is what we need to resolve11:25.21 
chrisl Okay. But I need to add separate handlers for load_jpeg.c then......11:25.30 
tor8 could stick the fz_dctd pointer inside the custmem struct, but then we get more nasty ifdef s11:26.55 
chrisl That won't work in load-jpeg.c either11:27.28 
tor8 it'll just be NULL in the load-jpeg file11:27.44 
  but the filter-dct can use it11:27.54 
  how does this work on the gs side? you must have some userdata pointer to the stream there as well11:28.21 
chrisl No, gs uses the incremental API, since to retrieve data, we have to trickle back up to the interpreter loop11:29.05 
tor8 right.11:29.24 
chrisl It's not hard to resolve - it's a shame to have to pass the ctx, *and* something that contains the ctx.....11:29.57 
tor8 yeah.11:31.40 
chrisl I'll try to have another poke at it this afternoon, maybe tomorrow morning - I'm more concerned that you're happy with the general method that the details right now11:36.08 
tor8 extend the custmem struct to have priv1 and priv2 (or privctx, privaux) or some such and I'll be happy11:36.49 
  and I'll ifdef extracting the fz_dctd from either the client_data or client_data->priv211:37.23 
chrisl Leave it with me, I'll see about fixing the problems and tidying it up11:38.02 
tor8 okay.11:38.15 
  there's also a spot in the error_exit function in load-jpeg that assumes cinfo->client_data is a fz_context11:38.57 
chrisl Hmmm, not sure about filter-dct.c and load-jpeg.c having completely separate libjpeg callbacks etc, seems a bit.... hmmmm11:41.14 
tor8 load-jpeg *only* reads the header11:45.28 
chrisl I just think it would be preferable to have as much common as would be viable11:46.10 
  But it's not a big deal11:46.27 
tor8 and it also works on a complete buffer outside the stream API (since it's only used for compressed images in the display list)11:46.50 
  yeah, it would be nice. but the libjpeg API is not very nice to work with :(11:47.09 
kens GameScripting : You can mail me files to ken.sharp at artifex.com12:05.25 
GameScripting ok, thanks for your efforts12:06.03 
kens Good grief, 6 WIndows updates and a new version of Flash :-(12:06.39 
GameScripting ok, mail send12:07.52 
kens OK let me go check12:07.58 
GameScripting toBeConverted.pdf ist the file create by some QT lib12:08.41 
kens Oh, the regression reports are trickling in, this could take some time, especially with 50+ Mb of WIndows updates at he same teim.12:08.42 
GameScripting pdfPrinted.ps is the postscript that is produced by the postscript driver (I am printig the toBeConverted.pdf from adobe reader)12:09.39 
  and conv.pdf ist the file rendered by ghostscript where the unicode mapping is missing12:09.58 
kens Um, I@m a bit confused thre. Are you starting from PostScript ? I thought you were starting with a PDF file12:10.09 
GameScripting pdffile -> printed on printer to ps -> to pdf using ghostscript12:10.35 
  the pdffile does include unicode mappings while the resulting pdf does not12:11.05 
kens OK seriously confused now. How do you go from 'printed on paper' to PostScript ?12:11.17 
  And if you go PDF->PS->PDF then that's where your ToUnicode has gone AWOL12:11.36 
  There is no such information in PostScript12:11.50 
  OK mail just azrrived12:12.25 
GameScripting well if I generate a pdf from MS Word -> print to ps -> pdf the mapping is still there12:12.27 
kens Let me look at the files12:12.33 
  Word is a bit different, the MS drivers add a non-standard key to the font dictionary, and we use that to generate a ToUnicode CMAP12:13.06 
GameScripting oh well ...12:14.12 
kens Give me a minute, I just decompressed the files, need to look.12:14.30 
  So you start with toBeConvedrted.pdf, convert that to PostScript, then convert the PostScript to PDF ?12:14.51 
GameScripting thats correct, yes12:15.38 
kens Looks like the PostScript was produced from AN aDOBE APPLICATION12:15.40 
  Possibly Acrobat ?12:15.47 
GameScripting yes adobe reader12:15.49 
kens OK well I think that's where your problem arises. The font subsetting, re-encoding and loss of the ToUnicode is happening in the conversion to PostScript. WHy do you need to convert to PostScript ?12:16.31 
GameScripting adobe reader --> ms postscript driver --> mfilemon port monitor --> ps-file --> gswin32c --> pdf12:16.40 
kens OK so my confusion is....12:16.52 
  Since you have a PDF file, why do you need to creagte a new one. And if you do need a new one, why do you print to PostScript first ?12:17.18 
  Each stage of a multiple conversion potentially introduces losses12:17.39 
GameScripting because it could also be a website that is printed on the virtual printer12:17.43 
  or an image12:17.51 
  any system that can print on a printer12:18.11 
  I use it as a general pdf-converter12:18.49 
kens OK, well the major problem is that Reader sends its own PostScript, rather than producing it via the GDI, and as a result the ToUnicode information is lost.12:18.51 
  THere is nothing we cna do about this, its gone before we see it.12:19.05 
  I can see in the PostScript file that teh font is already subset, and re-encoded12:19.27 
GameScripting why is this only the case if i print the pdf that was generated by some QT lib? If I export pdf from word and print that pdf from adobe reader will it use GDI then?12:20.34 
kens If you draw to the GDI, tehn that is converted to PostScript by the Windows printing system, and that system adds the ToUnicode information in a way we cna extract. A feature of pdfwrite is that it does so (this isn't standard, but Windows is so widespread its worth us doing it)12:21.35 
  Acrobat, however, doesn't do that. It converts the PDF to PostScript itself, and uses the 'PostScript pass-through' feature of the WIndows printing system to inject that straight into the output.12:22.18 
  Acrobat doesn't include the ToUnicode information, and doesn't care about being able to reconstruct a PDF file from the PostScript. Adfter all, you are *printing* it, and you already have a PDF file, so......12:22.59 
GameScripting so adobe reader also uses the non-standart extension if the pdf was produced by word?12:23.55 
kens Exporting a PDF from word, opening in Acrobat and prtining from there will be exactly the same, the ToUnicode information will be lost. (at least, so I believe)12:23.56 
  No, the non-standard stuff is produced by the MS prtiing system when you print via the GDI12:24.27 
  Because Acrobat bypasses that, it doesn't happen, no matter what source the PDF file is.12:24.48 
  You 'might' be able to improve the situation if you change the printer driver settings12:25.08 
  What version of Acrobat are you using ?12:25.18 
GameScripting "Exporting a PDF from word, opening in Acrobat and prtining from there will be exactly the same, the ToUnicode information will be lost. (at least, so I believe)" - As the ToUnicode information is NOT lost in this case, this is what confuses me right now12:25.36 
kens I don't see how the TOUnicode information would be preserved if you print a PDF from Acrobat, no matter what the source12:26.08 
GameScripting Adobe Reader XI Version 11.0.06 in Windows 8.012:26.14 
chrisl Word may not be reencoding the font, it might be only subsetting12:26.16 
kens What *might* be different is that the font might be encoded as ASCII12:26.22 
  In which case search/copy/paste will work. But tehre is still no Unicode information12:26.42 
  Hmm, I'm only on Acrobat X and tehre's no obvious provision there for altering the font embedding12:27.51 
GameScripting see https://onedrive.live.com/redir?resid=754AEF00C046FA03!5043&authkey=!AHygsj6khFmpVHI&ithint=folder%2c.pdf12:30.16 
  "This is 1.pdf" is directly exported from MS Word 201312:30.39 
kens OK just a minute12:30.48 
GameScripting "This is 1.ps" is the PS create by Adobe Reader printing "This is 1.pdf"12:31.07 
  "This is 1_fromPs.pdf" is the PDF rendered by ghostscript from "This is 1.ps"12:31.25 
  and all text is selecteable ...12:31.32 
  copy/past-able12:31.39 
kens OK it is not subset and is not a CIDFont, so that's a start.12:32.09 
GameScripting I guess thats what makes the difference between QT lib and MS Word12:32.48 
kens Maybe, I haven't finished yet12:32.59 
  THe text is encoded as ASCII in the PostScript, there is still no ToUnicode. However, when ToUnicode is missing, Acrobat treats the text as simple byte strings, so if (as in this case) the text is ASCII, then it will work. Try using somethin which isn't standard ASCII, like an accented character (a umlaut maybe)12:34.32 
  Here's an exmple of what's in 'this is form 1.pdf':12:35.46 
  [(T)-1.82553(h)3.00582(i)-0.996407(s )-0.550173(i)-0.997071(s 1)-4.00488(.)13( )-2.78728(E)-0.764067(xp)12.0047(o)-4.99199(rted )8.74741(an)4.00554(d)3.00582( 2)-5.00527(. )7.05996(P)5.71955(ri)-0.995743(n)6.005(te)-3(d)3.00316( )-2.80454(t)8.99223(o)-4.99332( ps)10.8438( )]TJ12:35.46 
  You can see the characters in there, because they have an ascii encoding12:35.59 
  THe equivalent in conv.pdf contains binary so I can't paste it, but the character codes are things like 0x01, 0x02, 0x03 etc.12:36.56 
  THis is what's in pdfprinted.ps:12:37.32 
  HMFKJO+TahomaStandard [9.71908 0 0 -9.71908 0 0 ]msf12:37.32 
  42.7542 412.251 mo12:37.32 
  (\000*)sh12:37.32 
  You can see the font is TahomaStandard (the HMFKJO+ means its a subset)12:37.56 
GameScripting yes you where kind of right, üäöäüöüö worked, ♥ did not12:38.00 
kens mo means 'move to' and 'sh' means 'show'12:38.07 
GameScripting i've added three more files to the filder12:38.19 
  *folder12:38.24 
kens test and test.ps ?12:38.42 
GameScripting yes12:38.45 
kens Lots of subset re-encoded font sin test.pdf12:39.46 
GameScripting can you point me to the documentation how to use mupdf to decompress the pdf and access the informations you're showing off here?12:39.59 
kens Oh these PDF files aren't compressed.12:40.19 
  You cna just open them with a text editor12:40.28 
  Scratch that, the last 2 are.12:40.43 
  test.pdf is compressed12:40.54 
  TO decompress yo uneed mutool12:41.08 
  I was hoping Robin_Watts would pipe i[up with instructions ;-)12:41.20 
  Hmm, test.pdf is the wrong file, I must have had one with that name, just a moment12:42.24 
  OK yes now I have the correct one12:42.39 
  Well that one cut-and-paste ok for me12:43.03 
GameScripting yeah, test.pdf is directly exported from word12:43.22 
Robin_Watts kens: mmm?12:43.27 
GameScripting testFromPs.pdf should not work12:43.28 
Robin_Watts mutool clean -difggg in.pdf out.pdf12:43.38 
kens Robin_Watts : how to use mutool to decompress a PDF file ?12:43.40 
  thanks12:43.43 
Robin_Watts np.12:43.58 
kens GameScripting : looks like the PDF contains accented characters, they show up OK in my editor.12:44.55 
GameScripting the ♥ ?12:45.13 
kens And tehy paste correctly. The heart symbols (unsurprisingly) do not12:45.22 
  Yes ou and a umlauts all paste fine12:45.35 
GameScripting yeah the äöü work for me too, only the heards do not12:45.46 
kens I guess the extended ascii set is acceptable too12:45.53 
GameScripting do you know how adobe reader decides to use ToUnicode over embedded ASCII?12:47.03 
kens So fundamentally the conversion to PostScript strips out the ToUnicode information when printing from Acrobat. If it so happens that teh original PDF had the characters encoded as ASCII, then acrobat falls back to using teat when no ToUnicode is present12:47.06 
  GameScripting : if ToUnicode is present Acrobat *always* uses it12:47.21 
  It doesn't really use ascii, it just treats the text as bytye strings12:47.39 
  So you can actually search for the broken text, but you need to type the actual encoded characters, not ascii.12:48.21 
  Which is, to be honest, not useful.12:48.33 
  SO if the text in the original PDF file wasn't in ASCII, you lose the ability to search, as the ToUnicode is lost on conversion to PostScript12:48.58 
GameScripting well now I understand how and why this (not) works12:50.04 
kens Well it was a useful learnign exercise I guess12:50.20 
GameScripting of course it was, pdf seems very complex to me, its hard to find easy to understand and related information on the net12:51.12 
kens Well, version 1 was not so complex :-)12:51.25 
  There's a lot to it, its a rich page description language and it cinludes a great deal of interactive and non-printing things too.12:52.20 
GameScripting so I guess there is no other way then printing to PS, right? So I can't always guarantee that the text information is not lost during printing, right? 12:56.17 
kens Don't convert PDF to PostScript would be my advice.12:56.46 
  *any* conversion of a PDF file potentially introduces losses12:57.04 
  Going via an older page desciption language with a more limited graphics model simply makes it more likely12:57.38 
GameScripting however printing to printer will always convert it to postscript, wouldn't it?12:58.23 
kens No... It will convert it to the page description language of the printer. For an HP printer that might be PCL, for an Epson printer ESC/P12:59.07 
  But it will involve a conversion of some sort, unless your printer supports direct PDF printing12:59.22 
GameScripting so its PS because I am using the ghostscript postscript driver for my virtual printer, I understand ...13:00.16 
kens Yes, absolutely correct13:00.25 
GameScripting A solution would be to only use applications that do the printing using windows GDI?13:00.44 
  Because it adds the ToUnicode mappings on the non-standart, but relieable way?13:01.07 
kens Yes, but then your PDF file will have to be converted to GDI drawing operations, you probably won't like the result of that either13:01.10 
  ALl objects in RGB, transparency is lost, beziers converted to quadratics, probably other stuff I haven't thought of13:01.37 
  Seems to me that if you want a PDF file, and you already have a PDF file, then don't convert it....13:02.19 
GameScripting I have a printer that the user prints to, she could be printing from firefox, adobe reader or SAP, I don't know what it will be. Me code runs on the server and has to create PDF files out of the prints.13:03.36 
  What format has the data send to the driver (which converts to PS/PCL whatever)?13:06.46 
kens I have no idea, I don't do web stuff. I would guess that the browser has a handler for various data types and sends the embedded data to the handler. WHat it does then is up to it.13:08.06 
  Since you have Acrobat reader installed, clearly it is the handler for PDF files in your web broser, it need not be, you might use pdf.js instead.13:08.42 
  I don't know what that would do if you try to print a PDF.13:08.57 
GameScripting I don't do web stuff either, printing is done on a shared network printer within a corporate network from native applications such as SAP or word or notepad, whatever.13:10.54 
kens Sorry I can't really help you with that. I can explain what's going on, and where you r information is vanishing, but I can't solve the problem for you.13:11.33 
GameScripting you have helped me so much, I'd just like to thank you very very much for the help :)13:12.43 
kens No problem, happy to help13:12.52 
sebras tor8: I tried to filter my mupdf bug-list yesterday, but I'm not sure I filter out android/ios in the right way.13:17.39 
  tor8: I did set os/hardware to not include the strings android and ios, but I'm unsure if that is how you did it..?13:18.05 
  tor8: maybe it is easier just to send the url.13:18.12 
tor8 sebras: I have it as a saved search13:18.27 
sebras tor8: I know, but I can't access that.13:18.39 
tor8 bah. don't type ^W to delete a word in xchat...13:19.04 
  http://bugs.ghostscript.com/buglist.cgi?bug_severity=blocker&bug_severity=critical&bug_severity=major&bug_severity=normal&bug_severity=minor&bug_severity=trivial&bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=IN_PROGRESS&columnlist=product%2Copendate%2Cchangeddate%2Cbug_severity%2Cassigned_to%2Cshort_short_desc%2Cop_sys&f0=OP&f1=OP&f3=CP&f4=CP&known_name=MuPDF%20Bugs&list_id=14840&op_sys=All&op_sys=Windows%203.1&op_sys=Windows%2095&op_13:19.07 
  sys=Windows%2098&op_sys=Windows%20ME&op_sys=Windows%202000&op_sys=Windows%20NT&op_sys=Windows%20XP&op_sys=Windows%20Vista&op_sys=Windows%207&op_sys=Windows%208&op_sys=Mac%20System%207&op_sys=Mac%20System%207.5&op_sys=Mac%20System%207.6.1&op_sys=Mac%20System%208.0&op_sys=Mac%20System%208.5&op_sys=Mac%20System%208.6&op_sys=Mac%20System%209.x&op_sys=MacOS%20Carbon&op_sys=MacOS%20X&op_sys=Linux&op_sys=BSDI&op_sys=FreeBSD&op_sys=NetBSD&op_sys=OpenB13:19.07 
  SD&op_sys=AIX&op_sys=BeOS&op_sys=HP-UX&op_sys=IRIX&op_sys=Neutrino&op_sys=OpenVMS&op_sys=OS%2F2&op_sys=OSF%2F1&op_sys=Solaris&op_sys=SunOS&op_sys=other&product=MuPDF&query_based_on=MuPDF%20Bugs&query_format=advanced13:19.08 
  sebras: concatenate those into an URL13:19.18 
sebras tor8: I'm curious because you and I have such huge discrepancies.13:21.07 
tor8 sebras: or in advanced search: product:MuPDF, status:unconfirmed,confirmed,in_progress, severity:all except enhancement OS:all except Android and iOS*13:21.24 
  sebras: that search gives me 29 bugs found13:22.04 
sebras tor8: yup, for me to (obviously).13:22.24 
tor8 sebras: and then I have the same one but with os:android,ios* instead as "MuPDF Mobile"13:23.27 
sebras tor8: aha! now I know... there are 54 bugs with severity "enhancement". I include those and you filter them out...13:25.24 
  tor8: some of those actually contain patches.13:25.36 
tor8 sebras: I have 83 bugs in the enhancement category13:27.14 
  but yeah, I guess if you filter out android and ios the list goes down13:27.36 
sebras tor8: yup, that's exactly why.13:28.06 
  tor8: I accidentally also removed OS set to "all" that's why I got 54.13:28.36 
tor8 sebras: that makes sense. if I uncheck the mobile stuff I got 74 enhancements.13:28.59 
purb hiii13:29.08 
sebras tor8: finally we are in sync. :)13:29.13 
  purb: ni hao!13:29.18 
purb yes13:29.34 
  can you please help me to do annotation in pdf file?13:30.45 
tor8 purb: both the iOS and android apps can create annotations.13:33.04 
purb no. I want to do annotation in windows13:33.36 
  I want to do annotation in windows apps13:33.53 
tor8 right. then you'll need to roll up your sleeves and be prepared to do some coding :)13:34.29 
  the current windows viewer doesn't do annotation editing13:34.39 
  but the basic functionality is in the mupdf library, so if you can write the GUI parts you can hook that up to the library13:35.08 
purb Is there any sample code for use of annotation in GUI part available?13:36.02 
tor8 paulgardiner wrote the annotation code, so he'd be the one to ask13:36.07 
  there is annotation code both in the ios and android apps13:36.15 
  in the platform/ios and platform/android directories13:36.25 
purb So, there don't exist any code of annotation for windows apps.....13:38.19 
paulgardiner purb> Nothing in the windows apps, but both the iOS and Android apps support annotation creation13:39.00 
purb Can you please help me to develop annotation creation support in windows apps?13:40.03 
tor8 purb: if you have questions about the mupdf api, you can ask them here.13:42.28 
  if you need help programming, or want us to write your code for you, then the answer is no.13:43.12 
sebras tor8: is it possible for purb (or someone else) to pay you guys at artifex to develop features that they want to have? like e.g. annotation creation support for windows apps.13:44.17 
paulgardiner_lap well, unless you wish to contract us to do it.13:44.18 
kens sebras we do NRE work yes13:44.32 
  at our discretion13:44.38 
sebras kens: NRE?13:44.41 
kens Non-refundable engineering13:44.49 
  ie you pay us and we write the code13:44.56 
  But we try to avoid it on the whole, we don't have that much development resource13:45.23 
purb I can write my code. I don't want any code. I just need some help to use the existing code...13:45.27 
sebras kens: right.13:45.34 
  kens: good to know though.13:45.38 
kens We have a few customers who get that kind of help13:45.56 
tor8 purb: right. well, just ask any questions you have here, and we'll try to answer as well as we can.13:46.02 
  prub: is this for some windows software, or do you want to extend the current windows viewer?13:46.38 
paulgardiner_lap purb> platform/android/jni/mupdf.c is a good place to start. It is very much complicated by having to support the JNI interface, but you can see the sequence of calls necessary for each case13:47.29 
purb I want to extend the current viewer13:47.37 
tor8 purb: it might be easier to write a new viewer ... the current viewer is complicated by being cross platform with X1113:48.23 
purb ok13:48.55 
paulgardiner_lap Although you'd still need to make it open source because of the GPL licence MuPDF is released under.13:49.42 
purb If the new viewer build, then I want to submit my code for other users....13:50.26 
paulgardiner_lap That's good13:51.42 
purb ok... I have to go now..... see you tomorrow 13:54.37 
ray_laptop Robin_Watts: (mvrhel for the logs). While looking into Bug 695221 that I got from mvrhel, I found the cause for the GC problems, writing past the end of an array. One of you please have a look at my patch, please. http://git.ghostscript.com/?p=user/ray/ghostpdl.git;a=commit;h=0ee1976845db37ae070156c608cd6104215e7ed414:04.27 
  Robin_Watts: I think you had a hand in extending client colors when we switched to planar for psdcmyk and tiffsep14:05.07 
Robin_Watts looking now.14:05.33 
  I seem to remember that some of the scars on my fingers were from that, yeah.14:05.50 
ray_laptop Robin_Watts: thanks. Sorry to pull you out of whatever SOT fun you are having :-)14:05.55 
Robin_Watts ray_laptop: It's OK, I'll finish making my noose later.14:06.14 
ray_laptop Robin_Watts: OK. Thanks14:08.37 
Robin_Watts So we were broadly using GX_DEVICE_COLOR_MAX_COMPONENTS before, which is either 64 or 32 depending on the use_large_color_index thing?14:10.04 
  and now you've moved it over to use GS_CLIENT_COLOR_MAX_COMPONENTS which is generally 64?14:10.40 
  I am unoffended by the change, but I can't say I completely understand the logic behind it.14:12.45 
henrys ray_laptop: not directly related to the issue at hand, but I thought we were going to get rid of GC in devices.14:17.10 
Robin_Watts henrys: AIUI, it's a memory overwrite that ray is curing.14:17.41 
  As such it's wrong, even without gc coming into the equation.14:17.57 
henrys that would be the "not directly related" part of my sentence. I assumed this overwrite was happening while GC'ing device stuff.14:19.02 
Robin_Watts yeah, sorry.14:19.16 
chrisl Er, why do we have "GX_DEVICE_COLOR_MAX_COMPONENTS" and "GS_CLIENT_COLOR_MAX_COMPONENTS"?14:23.57 
henrys chrisl: yea that's what I was trying to understand isn't the client the device?14:24.25 
chrisl That's what I thought......14:24.40 
Robin_Watts If we are allowing them to be different (for some reason I can't understand) then presumably we ought to have a compile time assert somewhere that GS_CLIENT_COLOR_MAX_COMPONENTS >= GX_DEVICE_COLOR_MAX_COMPONENTS.14:26.03 
chrisl Unless we know what each is for, we can't really judge14:26.48 
henrys okay the client is the languages as I'm grokking it now.14:28.04 
Robin_Watts gs_client_colors can be patterns etc.14:28.42 
henrys as in typedef struct gs_client_color_s gs_client_color;14:28.46 
chrisl henrys: but gdevcli.h contains definitions for devices.......14:28.59 
Robin_Watts gs_client_color_s is defined in gsccolor.h14:29.22 
henrys Robin_Watts: right and that on is for languages, right?14:29.42 
Robin_Watts I think so, yes.14:29.50 
chrisl I think the use of "client" to refer to both interpreters and devices is very confusing14:29.54 
henrys no the gxdevcl should have anything to do with GS_CLIENT_MAX_COMPONENTS which is to do with the source color space and the device gdevtsep.c should know nothing about it. So this change doesn't make sense to me. 14:37.30 
  s/anything/nothing14:38.10 
Robin_Watts I'm assuming that we are running into a case where GS_CLIENT_COLOR_MAX_COMPONENTS > GX_DEVICE_COLOR_MAX_COMPONENTS.14:38.54 
henrys Robin_Watts: that would explain the changes yes.14:39.48 
Robin_Watts and in gs/devices/tiffsep.c at line 1200, we'd then overwrite memory.14:39.49 
  So possibly the whole thing could be fixed by a bounds check there ?14:41.38 
  Does it actually make sense for us to ever allow for the two values to differ?14:42.35 
  I guess we might want to cope with a postscript file with 64 spots, and to print it to rgb.14:43.04 
henrys Robin_Watts: I think it does make sense for them to be separate and possibly different - GS_CLIENT_MAX… doesn't belong in gdevtsep.c at all.14:43.53 
Robin_Watts I am not familiar enough with the devn stuff to know if separation_order_map is having to work at the client color level.14:44.12 
  possibly separation_order_map is used to determine which components at the client_color level are mapped down to which bits at the device color level ?14:44.36 
henrys Robin_Watts: unless we are sort of creating a device on the fly to match the color in the language.14:44.43 
Robin_Watts This devn/separation stuff has to cope with people on the fly defining which set of separations actually comes out in the device.14:48.26 
  hence I could easily believe that the separation_order_map had to cope with more "input" colors than "output" colors.14:48.54 
chrisl But if we have more input colors than output colors, then tiffsep won't work.......14:50.12 
Robin_Watts chrisl: Why not?14:50.50 
  I thought one of tiffseps skills was that it could give you just the requested set of separations ?14:51.12 
chrisl Yes, but if you don't specify a set of seps, it will try to create new plates based on the input14:51.49 
Robin_Watts chrisl: And in that case, if there are more seps in the source file than it can output, then either it will throw a rangecheck, or it will only output the first n.14:52.45 
  AIUI.14:52.55 
chrisl Okay, I just don't see an argument for the interpreter supporting more plates than the graphics lib - that seems crazy14:53.57 
Robin_Watts chrisl: Is there a maximum number of separations in postscript?14:54.28 
chrisl Not sure.....14:54.42 
Robin_Watts or PDF?14:54.44 
  I could make a PDF pantone chart, with each color as a separation, with a base space that would drop back to RGB, right?14:55.13 
  Then when I print that, I could get any given set out as spots.14:55.50 
henrys there is a fairly good discussion in plrm that I'm plowing through ...14:56.00 
chrisl Robin_Watts: each separation color space is only one plate.... you'd need a *massive* DeviceN space to overflow the available number of plates in the interpreter14:57.14 
Robin_Watts So the maximum number of plates available in the interpreter is what? 1000s?14:58.39 
chrisl There doesn't seem to be a maximum number of components in a DeviceN space in the PLRM....14:59.15 
henrys chrisl: also see the note on 242 I don't think we should be thinking just in terms of "plates"15:00.15 
chrisl henrys: that's why I specified "components in a DeviceN space"......15:01.21 
  At first glance, PDF does not seem to stipulate a maximum number of components for DeviceN15:03.05 
  Ah, it is implementation dependent and in PDFRM "Implementation Limits" it says "DeviceN components 32"15:04.15 
  Which is odd because I've seen at least two PDFs with 38+ component DeviceN color spaces15:05.01 
henrys In any case I find it very confusing to have GS_CLIENT_COLOR_MAX_COMPONENTS used in the device with the device color space.15:05.17 
chrisl henrys: if we allow the interpreter to have more components available than the graphics library, we have to use GS_CLIENT_COLOR_MAX_COMPONENTS in the device15:06.02 
  Or, as Robin_Watts throw a rangecheck....15:06.40 
henrys chrisl: no we have a compile time invariant that GX_DEVICE_… is greater15:06.45 
chrisl henrys: then why not just make them the same, and remove a confusion macro?15:07.12 
henrys chrisl: I don't know the performance hit15:07.31 
Robin_Watts chrisl: Consider the case where you have a cmyk laser printer.15:07.40 
chrisl As they are presumably *normally* the same now, the performance hit would be minimal15:08.02 
Robin_Watts You want to allow for coping with many separations in the graphics lib.15:08.09 
  but you want to fold them all down to cmyk for printing.15:08.25 
  This means you only need a device color that copes with 32 bits.15:08.37 
  hence why have a color_index of more than 32bits? Why take the hit (and it will be a hit on some CPUs) ?15:08.58 
  This is exactly the situation that the customer that was complaining about large_index=0 not working is in.15:09.28 
  AIUI.15:09.37 
chrisl I don't know when the tint transform is triggered - that would be the decider15:09.47 
henrys well yea the current customer complaint that started this wanted a 32 bit index.15:09.54 
Robin_Watts hence I suspect there *are* cases when it makes sense to have client colors being large, but gx_device_colors being small.15:10.11 
  and broadly I think that henrys is right, we should be using gx_device_color_max_components in the device.15:10.47 
  but I think that separation_order_map may possibly be the exception.15:11.04 
henrys that'll teach ray to ask for a review ;-)15:12.26 
chrisl Perhaps some extra, clear comments on the nature of GS_CLIENT_COLOR_MAX_COMPONENTS and GX_DEVICE_COLOR_MAX_COMPONENTS would be in order15:14.32 
henrys chrisl: yes and if my understanding is correct - it would be better to have GX_DEVICE_COLORANT_MAX_COMPONENTS so it syncs with the documentation.15:22.40 
Robin_Watts Why is COLORANT better than COLOR ?15:23.35 
  which documentation?15:23.59 
henrys PLRM15:24.08 
chrisl COLOR can be composite - COLORANT is one component15:24.08 
Robin_Watts It's the "maximum number of components in a gx_device_color"15:24.41 
chrisl Ah, yes, it probably should be COLOR then15:25.02 
  Or GX_DEVICE_MAX_COLORANTS15:25.30 
  Robin_Watts: to clusterpush mupdf, I just run clusterpush.pl from the mupdf tree, yes?15:26.47 
henrys I'm looking at the diagram on 212 of PLRM color rendering15:26.53 
Robin_Watts chrisl: yes.15:26.57 
chrisl ta15:27.22 
henrys or 238 in pdf reference 1.715:29.54 
chrisl henrys: I'm not sure our color workflow exactly matches that diagram in the PLRM15:30.05 
henrys mvrhel_laptop: I don't know if you want to get rapped up in the logs or let ray deal with it. I'd say gsview completion and SOT are more important.15:33.03 
mvrhel_laptop morning. reading logs...15:33.59 
  oh that15:34.15 
  I already assigned that to ray and talked with him about it15:34.34 
henrys mvrhel_laptop: well he asked for review and something related and so...15:35.16 
mvrhel_laptop yes I see that now thanks.15:35.33 
  I have to agree with the confusing use of "client" that has always bothered me15:36.36 
henrys waits until mvrhel_laptop gets to the point that say don't read the logs ;-)15:37.16 
  s/say/say15:37.28 
mvrhel_laptop ha. good point. I will stop15:37.30 
henrys s15:37.30 
mvrhel_laptop I stepped away from the event horizon15:38.00 
Robin_Watts I think someone needs to rule whether ray is doing the right thing or not.15:38.22 
  It would seem that the rest of us have our doubts.15:38.31 
mvrhel_laptop chrisl: I added control key function, drag and drop, and moved the about menu control like you suggested15:38.43 
  adding in the turn off AA now15:38.53 
henrys chrisl: absolutely right about GX_DEVICE_MAX_COLORANTS - my terminology was obviously wrong15:39.21 
mvrhel_laptop which I knew why kens had issues installing though15:39.27 
chrisl mvrhel_laptop: that's cool - look forward to the next beta!15:39.37 
  Robin_Watts: I'm okay with Ray's change, I can see the argument for doing it that way - I'd like it *heavily* commented as to why tiffsep is the exception15:40.20 
  And I'd like clear comments added about which client the word "client" refers to......15:41.39 
kens Night all16:16.31 
cryptopsy how come in mupdf i can't select text like i can with the exact same file in windows?17:02.29 
  its not jumping between letters but it is pasting in mine17:06.59 
sebras cryptopsy: I think you might need to explain this a bit better. what do you mean jumping between letters?17:16.39 
cryptopsy sebras: you know, a letter is like a box17:20.26 
  so, for example, in your web browser, select text, snaps to each letter's edge17:20.54 
  not so in mupdf when selecting text with right click http://i.imgur.com/Mzu1svs.jpg17:21.10 
sebras ah, now I get it. :) well, the text selection mechanism is like this by design I think. it works the same under X11.17:23.10 
  cryptopsy: any highlighted text ought to be copied regardless though.17:24.20 
  otherwise it is a bug.17:24.32 
cryptopsy yea its being copied but the hilight box is confusing17:39.37 
sebras cryptopsy: think of it as the selection tool in a drawing program and it all makes sense. :)17:40.18 
  cryptopsy: besides being confusing, is it making any specific operation troublesome for you?17:40.54 
cryptopsy yea selecting what i want17:41.36 
sebras cryptopsy: ok, why?17:41.51 
cryptopsy soemtimes it seems i'm selecting the letter in a word but its off by one most of the time17:41.52 
  that's because, for example, the letter l is not centered in its glyph box17:42.05 
  so everything i copy, i have to prune17:42.18 
sebras cryptopsy: alright, obviously I have no quick fix for this. but I think maybe this is good input for later when the sample viewer is being rewritten (this has been on the agenda for a long time).17:43.38 
cryptopsy here's example : http://i.imgur.com/h9KVmEb.jpg17:43.46 
  notice the comma on the third line17:43.53 
  notice the t on the third line17:43.59 
  and the whole 4th line in vim17:44.14 
  got pasted, even though its not hilighted at all17:44.21 
sebras cryptopsy: got it.17:44.49 
  need to run.17:45.33 
cryptopsy so, for safety reasons the user has to yank like 2 lineas extra in each direction17:45.34 
sebras goes for dinner.17:45.36 
cryptopsy ok17:45.37 
  run fast17:45.38 
  sebras: how to set the background to black instead of gray?17:46.45 
  or to another color17:46.49 
  i want it to blend in with the margins of my document for my viewing pleasure17:47.00 
  here's example; http://i.imgur.com/zVNmLuM.jpg17:48.11 
  can i make copy use left mouse button instead of right mouse button?17:54.11 
sebras cryptopsy: I believe that hitting "i" will invert the colors. maybe that is enough for you?18:30.47 
  cryptopsy: switching actions for mouse buttons at least requires changes in platform/x11/pdfapp.c:pdfapp_onmouse()18:32.36 
  cryptopsy: I haven't tested doing that though, so I might have missed something.18:32.52 
  cryptopsy: looks like you are studying medicine given the pictures you send. :)18:33.35 
  or biology.18:33.45 
cryptopsy sebras: the screenshot you saw is with colors inverted, it has no effect on background color (the grey)18:34.39 
  i supposed its better to call it canvas?18:35.24 
  sebras: i am writing histology notes18:35.59 
  a complete course for medical students18:36.10 
  is there a hotkey for select all, that way i don't have to drag and drop to select all my text?18:37.30 
sebras cryptopsy: platform/x11/x11_main.c:winopen() sets xbgcolor to 0x7000 for red green and blue. I assume setting this to 0x0000 would produce the desired result, but there is not command-line (or hotkey) way of setting it.18:37.49 
  cryptopsy: no, no hotkey for selection as far as I know.18:38.06 
cryptopsy thanks18:54.43 
  i'm gonna go now, i hope these features make it into a future release, thanks again19:18.29 
corruptmd5sums dowbloads from ghosscript.com gs910w64.exe, gs014w64.exe. and gs914232.exe are corrupt and their md5 checksums don't match the published values21:25.58 
 Forward 1 day (to 2014/05/15)>>> 
ghostscript.com
Search: