| <<<Back 1 day (to 2015/05/24) | 20150525 |
ManDay | I repeat my question from yesterday, perhaps someone knows | 09:09.52 |
| Here is a PDF file which I've created on an ereader. The software on the reader allows to add textual and handwritten annotations (like sticky notes). I can view and modify them on the reader but I haven't found any application for Linux which can display them (when I click on it, nothing happens). I've read MuPDF does support annotations but with version 1.7a clicking on them doesn't do anything: | 09:10.04 |
| http://s000.tinyupload.com/index.php?file_id=80988838601843275658 | 09:10.06 |
| hm, no one? | 10:50.37 |
tor8 | ManDay: we draw annotations in mupdf, but we don't support extra actions when clicking on them | 10:54.00 |
| the 'handwriting' annotation is a FileAttachment annotation, which we don't support | 10:54.15 |
Robin_Watts | tor8: Morning. | 10:54.30 |
| 1 commit on robin/master | 10:54.36 |
tor8 | Robin_Watts: I saw, LGTM | 10:54.43 |
| I got one from sebras that's reviewed on tor/master | 10:54.56 |
Robin_Watts | I still need to look at the cluster to figure out how to do the mutool/mudraw thing. | 10:54.58 |
| Could we maybe still build both mudraw and mutool (from the same source) ? | 10:55.17 |
tor8 | Robin_Watts: so do we want to do the mutool/mudraw thing? I think I'm in favor, it seems reasonable to gather all the command line tools together. | 10:55.37 |
| Robin_Watts: does the cluster run 'make install'? | 10:55.56 |
| because we could add a symlink to that | 10:56.02 |
| maybe make install prefix=wherever | 10:56.14 |
| otoh, mudraw deals with all sorts of file types, whereas mutool is very pdf specific | 10:56.49 |
| so in that way I want to keep them separate | 10:56.56 |
Robin_Watts | no, the cluster does: make build=release HAVE_X11=no NOX11=1 XCFLAGS="-DCLUSTER" -j 12 all | 10:57.56 |
ManDay | tor8: thanks. do you know any FOSS reader which does support that? | 10:58.06 |
tor8 | however, the sanitise option to mutool clean means we do need to pull in the whole font data set which is what causes the bloat | 10:58.17 |
| ManDay: try evince | 10:58.27 |
Robin_Watts | tor8: Could we add mudraw to mutool, but still keep mudraw ? | 10:58.38 |
ManDay | ok, ty tor8 | 10:58.45 |
Robin_Watts | That way people who want small size can just take mutool and symlink. | 10:59.04 |
| Certainly that'd be easiest for the cluster :) | 10:59.18 |
tor8 | Robin_Watts: if you only need it for the cluster, 'cp mutool mudraw'? | 10:59.22 |
Robin_Watts | tor8: There is already cruft in the cluster to cope with the rename from pdfdraw to mudraw. | 10:59.56 |
| but I can add more cruft. | 11:00.28 |
tor8 | Robin_Watts: what does the current cruft do? | 11:00.36 |
Robin_Watts | http://pastebin.com/RqEXmrD4 | 11:01.25 |
| I like the idea of mutool having a 'draw' option. | 11:02.20 |
| but then I also like the idea of keeping mutool for pdf stuff, and mudraw for all formats. | 11:02.37 |
| hence I like the idea of adding mutool draw, but not removing mudraw. | 11:03.01 |
tor8 | Robin_Watts: yeah, I hear you and my thinking is along the same lines. though I disapprove of duplicate functionality and longer build times, due to linking twice. | 11:05.33 |
Robin_Watts | Ah. Will mutool cope with being invoked as pdfdraw ? | 11:05.45 |
tor8 | Robin_Watts: it will | 11:05.59 |
| it copes with being invoked as 'mudraw' 'pdfdraw' and 'mupdfdraw' | 11:06.13 |
| with the patch I have on tor/master at least | 11:06.24 |
Robin_Watts | tor8: OK, try clusterpushing that patch now... | 11:07.04 |
tor8 | Robin_Watts: trying | 11:08.09 |
| Robin_Watts: that was a bit too quick | 11:14.08 |
Robin_Watts | tor8: the mupdf tests are very quick nowadays :) | 11:18.34 |
tor8 | Robin_Watts: what happened to them? | 11:18.53 |
| did we prune a lot of crap or get more machines? | 11:19.01 |
Robin_Watts | tor8: ClusterPower++, I think. | 11:19.06 |
kens | The cluster is very qquick now. Even GS tests in < 20 minutes I think | 11:19.28 |
Robin_Watts | so tor8, push away. | 11:21.43 |
tor8 | Robin_Watts: updated commit on tor/master with integrated manpage changes | 11:22.45 |
Robin_Watts | lgtm | 11:23.33 |
tor8 | Robin_Watts: thanks. | 11:23.42 |
Robin_Watts | tor8: 1 commit on robin/master | 11:29.39 |
tor8 | Robin_Watts: LGTM, I've pushed it | 11:51.50 |
Robin_Watts | tor8: Thanks! | 11:52.00 |
HD | Hi all, | 12:54.49 |
| Good morning | 12:54.56 |
kens | Hi | 12:55.05 |
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. | 12:55.05 |
HD | @paulgardiner: I had tried with live sample(from play store), App getting restarted when I am saving edited pdf form. | 12:56.21 |
| Before app gets restart it stuck on "Document is edited,save theme?" dialog | 12:57.18 |
paulgardiner | Is it a very big file? | 12:58.10 |
HD | No. its only of 238.96 kb | 12:59.10 |
Robin_Watts | HD: Can you open a bug and attach the file please? | 12:59.32 |
HD | but it has more than 100 editable field. | 12:59.44 |
paulgardiner | Is it a file you can share with us? Could you open a bug and upload the file to bugziila | 12:59.47 |
| Ah. What Robin_Watts says | 12:59.55 |
HD | Actually I can not share that file as its non disclausable. :| | 13:00.27 |
Robin_Watts | HD: Without a file that we can reproduce the problem with, we can't help you. | 13:01.24 |
| If you can share a file, we can mark it as private so that no one else can download it. | 13:01.37 |
| but we do need an example file. | 13:01.44 |
HD | Yes. You are right. | 13:02.02 |
Robin_Watts | kens: Does your laptop have a power supply that needs a lead with three circles in a triangle shape? | 13:08.42 |
kens | Yes that's right | 13:08.51 |
Robin_Watts | do you have a US cable for that? | 13:09.09 |
kens | centre one is very slightly larger than the other 2 | 13:09.14 |
| Yes, I have a US cable for it, I lend it to Tor sometimes | 13:09.25 |
| If you want to not bother getting one I'm happy to share | 13:09.41 |
Robin_Watts | I was cleaning my office the other day, and I found such a cable. | 13:09.58 |
| It's useless to me, so I wondered if it would be useful to you. | 13:10.18 |
| I will put it back in the drawer :) | 13:10.31 |
kens | I'd be grateful for it, especially since I can't locate mine at the moment | 13:10.31 |
Robin_Watts | oh, then I will bring it :) | 13:10.40 |
kens | Thanks, it could be very handy for me :-) | 13:10.47 |
| Ah, I did just find my existing one, but a spare is always nice, and Tor might not have one | 13:11.26 |
Robin_Watts | It's in my rucksack. | 13:12.06 |
kens | Thanks! | 13:12.12 |
Robin_Watts | Ah. It came with my NAS. | 13:12.42 |
| I'm unlikely to be taking that to the states. | 13:12.55 |
kens | I guess you won't be carrying that to the US :-) | 13:12.55 |
Robin_Watts | foods. | 13:13.36 |
HD | @Robin & @paulgardiner please check out posed bug : Bug 696010 | 13:17.47 |
kens | HD do you need that attachment made private ? | 13:18.32 |
paulgardiner | HD: please can you add to the bug report an exact description of the procedure that triggers the bug? | 13:19.36 |
HD | nop | 13:19.44 |
kens | assumes that's in answer to my question, not Paul's :-) | 13:20.02 |
HD | :) Yes. | 13:25.46 |
| @paulgardiner: I had just added more description | 13:26.27 |
| @paulgardiner: regarding to signature issue, I have updated prev. bug 695986. Added new attachment and description | 13:53.14 |
| @paulgardiner: Last question- Is it possible to save editable form as flat pdf? | 14:13.46 |
| Mean to say after saving form. You can not edit it again. | 14:14.21 |
paulgardiner | No. We have no support for that. | 14:15.11 |
HD | ok. | 14:15.21 |
| Have you checked that pdf which contains signature field? | 14:15.46 |
bencc | what is the format of this animated image? | 14:16.14 |
| https://drive.google.com/file/d/0B12AhxvnYHrARWRMMnZnYU1FaVU/view?usp=sharing | 14:16.16 |
| the source show it is created with ghostscript | 14:16.23 |
| can I convert it with ghostscript to animated gif? | 14:16.32 |
paulgardiner | HD: sorry no. I can't look at this just now. I may get a chance tomorrow. | 14:18.43 |
Robin_Watts | Thats a png | 14:18.51 |
| bencc: ^ | 14:18.56 |
| You can generate pngs from gs. pngs are not animated. | 14:19.14 |
HD | ok. Thank you | 14:19.33 |
bencc | Robin_Watts: it is animated in libreoffice | 14:19.34 |
Robin_Watts | pngs can represent things that gifs cannot (easily) | 14:19.43 |
| Then it's not a plain png :) | 14:19.52 |
bencc | Robin_Watts: https://drive.google.com/file/d/0B12AhxvnYHrAUXVnTTYzYWF6c3c/view?usp=sharing | 14:19.56 |
| this is the ODP with this PNG. if you open it with LibreOffice you can see the animation | 14:20.20 |
| so the PNG somehow has animation | 14:20.37 |
| you can also create a new LibreOffice presentation and just drag the PNG to it | 14:20.56 |
Robin_Watts | Hmm. I wonder if the google drive thing has converted it to a png. | 14:20.57 |
| png's do not have animation in them. MNGs do, but... | 14:21.12 |
bencc | Robin_Watts: google drive didn't conver it. you can download the original file (press on the down arrow) | 14:21.41 |
kens | GS doesn't make MNG and it certainly cannot create an animated output of any sort. | 14:21.53 |
bencc | if you'll drag it to LibreOffice and play the presentation it will be animated | 14:21.54 |
kens | If I open the PNG with the WIndows viewer it is not animated | 14:22.44 |
Robin_Watts | nor with chrome. Nor does pnginfo say anything out of the oridinary. | 14:23.33 |
| Ah. It might have a GIF embedded in it though. | 14:24.13 |
kens | OpenOffice, however, does show it as a movie | 14:24.14 |
| In any event, I don't believe Ghostscript created this file. | 14:24.48 |
Robin_Watts | kens: gs outputted the frames using pnmraw | 14:25.11 |
| but we didn't have anything to do with generating the animation from the frames. | 14:25.27 |
kens | That's possible, certainly, but it didn't create the PNG | 14:25.28 |
| Anyway, you cna't process it wit Ghostscript because Ghostscript only handles PostScript or PDF as input, and ths is neither. | 14:26.26 |
| Potentially you oculd write a PostScript program to do what you want, but I rather suspect you will find it easier to use an image editing applicaoin of some kind. | 14:26.51 |
bencc | can you please try to embed it in LibreOffice presentation and open it there? | 14:27.33 |
kens | Why ? | 14:27.39 |
bencc | because than you'll see the animation | 14:27.47 |
kens | I already do | 14:27.53 |
bencc | I couldn't see the animation with any other program | 14:27.56 |
| kens: where do you see the animation? | 14:28.02 |
kens | OpenOffice | 14:28.07 |
bencc | cool | 14:28.10 |
| how can I convert it to animated gif? | 14:28.19 |
kens | I have no idea | 14:28.24 |
Robin_Watts | bencc: I suspect the png has an animated gif embedded in it. | 14:28.31 |
bencc | do you know what format is it? | 14:28.33 |
kens | Yes, its a PNG | 14:28.39 |
Robin_Watts | No idea how you extract that easily though. | 14:28.43 |
bencc | animated gif embedded inside png? | 14:29.24 |
Robin_Watts | yeah, I've extracted the animation here. | 14:29.42 |
bencc | how? | 14:29.56 |
| is there a way to see where the png ends and the gif starts? | 14:30.09 |
Robin_Watts | I just chopped the start of the file off until the gif header :) | 14:30.38 |
| There may well be data after the end of the gif. | 14:30.44 |
bencc | Robin_Watts: where is the GIF header? | 14:30.59 |
Robin_Watts | http://ghostscript.com/~robin/gif.gif | 14:31.00 |
bencc | nice | 14:34.58 |
| it starts with GIF87a or GIF89a | 14:35.06 |
| now I just need to split the file with python | 14:35.12 |
tor8 | looks like the PNG has an ancillary chunk of type 'msOG' which then starts with 'MSOFFICE9.0' followed by a GIF file | 14:45.02 |
| my guess -- msoffice has converted a gif to png and embedded the original gif file | 14:45.50 |
bencc | tor8: I think you are right | 14:46.13 |
kens | That would seem likely | 14:46.13 |
bencc | now trying to delete the png prefix in python or the command line | 14:46.26 |
tor8 | bencc: reading PNG chunks in python is trivial with the 'struct' module | 14:47.12 |
bencc | tor8: will it help me to remove the PNG from the file? | 14:47.34 |
tor8 | each chunk starts with a 4-byte int saying how long it is, then a 4-byte string with the type, then N bytes of data and finally a 4-byte int checksum | 14:47.45 |
| so if you want to extract the 'msOG' chunk, just read all the chunks until you find the 'msOG' chunk and save the data | 14:48.07 |
| oh, and there's an 8-byte PNG signature you have to skip before the chunks start | 14:48.42 |
jhabjan | hi, I just saw that couple of days a go a question was raised about the "-empty" arg in Ghostscript.NET | 14:54.19 |
| well, that's actually argv[0] which is ignored by the native ghostscript library.. user supplied arguments are argv[1] to argv[argc-1] | 14:55.59 |
kens | Indeed, I thnk we worked that out | 14:56.18 |
jhabjan | seems that I commented that part of code poorly.. as people usually sets argv[0] with some value they want to use and then asks why it's ignored | 14:58.45 |
kens | Its a subtle point I guess | 14:59.19 |
Robin_Watts | argv[0] = "ThisValueIsIgnoredSoDontSetItToAnythingImportant" | 15:00.59 |
jhabjan | in .NET it's a List<string> which is commonly used | 15:01.34 |
| and when you add to list, it starts from index 0 | 15:01.45 |
| so when List is converted to array, array starts with index 0 | 15:02.41 |
sebras | kens: ah.. I never noticed that the index was 0 in that case. | 15:06.59 |
kens | I don't remember the discussion that well, but I seem to recall someone giving an answer | 15:07.39 |
jhabjan | no worries | 15:08.03 |
sebras | kens: I think it was me and rayjj that saw the question a few days back. and rayjj mentioned that gs ignores any unknown flags, which -empty would be. but I guess in this case gs doesn't even see argv[0]. | 15:09.05 |
| kens: so basically it is ignored at an earlier stage. | 15:09.19 |
kens | Well, it doesn't *use* argv[0] as that's usually the applicaiotn :-) | 15:09.35 |
jhabjan | yep | 15:11.53 |
bencc | tor8: if I'll just search for GIF89a I can get false positive, right? | 16:31.19 |
Robin_Watts | bencc: Yes, but you'd be unlucky :) | 16:31.37 |
| Are you doing this for a single animation or for an arbitrarily large set of them ? | 16:31.57 |
bencc | Robin_Watts: ppt saves animated gif this way PNG+Animated-GIF | 16:33.57 |
| so large set of images | 16:34.02 |
| there must be a way to see that it's not just random part of the PNG | 16:34.22 |
| maybe it's a comment? | 16:34.30 |
Robin_Watts | It's embedded in a labelled atom. | 16:36.03 |
| It's really not hard to extract it properly. | 16:36.10 |
bencc | how does a labelled atom looks like? | 16:36.53 |
| is there a library that can help? | 16:37.10 |
Robin_Watts | bencc: I'd just roll my own. Walking the chunks in a PNG file is trivial. | 16:39.44 |
bencc | Robin_Watts: I'll read about it. thanks | 16:40.26 |
| Robin_Watts: I don't see anything about labelled atom http://www.libpng.org/pub/png/spec/1.2/png-1.2.pdf | 16:56.32 |
| I see <tEXtComment but the gif is not inside of it | 16:57.26 |
Robin_Watts | by "atom" I mean 'chunk'. | 16:59.09 |
bencc | what's the name of a 'chunk' that doesn't include image data? | 16:59.50 |
Robin_Watts | bencc: Read the first 8 bytes of the PNG file; check it's the PNG signature (see that file) | 17:00.29 |
| Then read a series of chunks. | 17:00.45 |
| Each chunk is 4 bytes for the length, followed by a 4 byte chunk code. | 17:01.03 |
| Then you have the chunk data, then 4 bytes of CRC (just ignore it) | 17:01.23 |
bencc | so I need to find the chunk code used to embed the gif | 17:01.55 |
| and than see if the chunk data starts with GIF... or similar | 17:02.09 |
Robin_Watts | Looking at the file in an editor I see: | 17:02.25 |
| msODMSOFFICE9.0GIF89a | 17:03.31 |
| !rmsOGMSOFFICE9.0GIF89a rather | 17:03.49 |
| I suspect that 0 0 ! r is the length. | 17:04.10 |
| so msOG would be the chunk marker. | 17:04.23 |
| then MSOFFICE9.0 is some internal version thing. | 17:04.39 |
| Then after that you have the gif. | 17:04.49 |
bencc | cool | 17:04.55 |
| so 'msOGMSOFFICE9.0GIF89a' will probably be unique enough | 17:05.16 |
| I'll try to parse it in python | 17:06.10 |
rayjj | Robin_Watts: I asked yesterday if you or mvrhel would object if I first committed a patch to set USE_FAST_HT_CODE to 0 (to establish a baseline for the regression without the 'offset' in the fast thresholding code, THEN a second patch with my changes to match the thresholds to the HT tiling (that re-enables the fast code) | 17:37.02 |
Robin_Watts | rayjj: You're the guy taking this on, so do what makes your job easiest :) | 17:37.38 |
| Also, when bugs are reported it'll come back to you :) | 17:37.48 |
rayjj | the issue is that we will get a mess of differences for the commit that disables the fast code | 17:38.08 |
Robin_Watts | But is this just to get sensible results out of the cluster? | 17:38.15 |
rayjj | and then any real differences on the second commit (which are difficult to spot now) | 17:38.45 |
Robin_Watts | rayjj: Seems perfectly reasonable to me. | 17:39.00 |
| Although... | 17:39.06 |
| you may want to consider cluster pushing the USE_FAST_HT_CODE = 0 | 17:39.20 |
| then clusterpushing again with your new one. | 17:39.29 |
| The report comes in 2 halves; different from baseline, and different from previous commit. | 17:39.46 |
rayjj | Robin_Watts: I thought that was I was suggesting | 17:40.00 |
Robin_Watts | So ideally the second push should have 'nothing' in the different from previous commit section. | 17:40.08 |
| Sorry. I'm being unclear. | 17:40.40 |
rayjj | Robin_Watts: oh, I tried that. and I did get differences, but I can't see the bmpcmp between those runs | 17:40.53 |
Robin_Watts | Right, yes, bmpcmp is the pain. | 17:41.05 |
| Then do what you suggest. I think that's reasonable. | 17:41.15 |
rayjj | Robin_Watts: OK. thanks | 17:41.29 |
| There is still something going on, but I don't think it is the thresholding, but rather the image extents not matching, but it's hard to isolate test cases | 17:43.09 |
| and the thresholding issue is a customer priority bug | 17:44.03 |
| Forward 1 day (to 2015/05/26)>>> | |