| <<<Back 1 day (to 2015/04/14) | 20150415 |
mvrhel_laptop | ok scrolling and zooming are much improved in gsview. now I need to fix the landscape issue and that wacky issue that Robin found when selecting a single line of text | 05:13.00 |
| then I hope that will be it. these last two should be easy compared to the scrolling and zooming issues | 05:13.34 |
kens | Robin_Watts and qqz (for the logs) altering the MediaBoz will not apply margins in the way that most people desire. Because the origin of a PDF file is the lower left corner of the page, increasing the MediaBox simply adds whte space to the top and right of the page. Most people want it at left and bottom, ro evenly around the page. To do that, you need to shift the contents, which you can do with Ghostscript. To do it in MuPDF | 07:35.57 |
| you would need to modify the page content stream whcih might be even harder than a little trivial PostScript programming. I'm fairly sure a search on Stack Overflwo will turn up answers on ths subject. | 07:35.57 |
tor8 | kens: correct me if I'm wrong, but I thought the MediaBox lower left corner also affected the placement of the origin | 09:40.01 |
| a mediabox like [-10 -10 10 10] would have the origin right in the center of the page | 09:40.32 |
Robin_Watts | tor8: likewise. | 09:41.24 |
| Acrobat and mupdf certainly think so. | 09:43.28 |
| and gs agrees. | 09:44.01 |
chrisl | Isn't that what Ken said? If you extend the MediaBox down and left, the page contents will also move down and left, so to get a consistent margin, you'd have to move the contents up and right again..... | 09:48.04 |
tor8 | chrisl: the opposite. extend the mediabox, the extra space is made a margin. the origin is always at 0,0 and content centered on the origin, mediabox just says which area around the origin is part of the page. | 09:50.03 |
chrisl | Erm, PDF origin is lower left, isn't it? | 09:54.17 |
tor8 | PDF origin is 0,0 ... traditionally the lower left | 09:54.42 |
| at least in MuPDF it is | 09:54.47 |
| +x goes right, +y goes up | 09:55.05 |
Robin_Watts | PDF origin is 0,0. | 09:55.38 |
chrisl | So content is not centred on the origin, by default | 09:56.16 |
Robin_Watts | hence if the mediabox is extended to have it's minimums at -100,-100 you get 100 extra points of space on the left and the bottom. | 09:56.19 |
| chrisl: kens contention was that the PDF origin was the bottom left hand corner of the mediabox. it is not. | 09:56.54 |
chrisl | Oh, okay. Maybe it is in pdfwrite..... | 09:57.18 |
paulgardiner | tor8: did you have a chance to look over my commits. Robin was happy with them, but he thought you should look at the makefile change | 10:29.43 |
Robin_Watts | yeah, the makefile change is a dependency change that seems reasonable to me, but it was you that came up with the latest formulation there. | 10:35.31 |
| ^tor8 | 10:35.48 |
tor8 | paulgardiner: Robin_Watts: Ah, yes. The NAME_GEN : NAMEDUMP dependency is duplicated in the ifneq crosscompile block already | 10:40.50 |
| paulgardiner: both commits LGTM | 10:41.07 |
paulgardiner | and without and "or" | 10:41.08 |
| tor8: ta | 10:41.12 |
tor8 | paulgardiner: The "| $(GEN)" is gnu make syntax for soft dependencies | 10:42.19 |
| I can't remember what they're actually called, but they're dependencies that don't get inserted in the $^ variables | 10:43.05 |
paulgardiner | Oh Okay, Not sure what those mean... "try but don't fail because of it"? | 10:43.14 |
tor8 | so that we can depend on the output directory being created, without trying to insert the output directory into the list of files to compile | 10:43.36 |
paulgardiner | Okay, I'll continue to accept that I don't understand make files. :-) | 10:44.10 |
tor8 | It's been a while since I wrote the makefiles, I know there's a good reason for them but I can't remember all the details | 10:44.14 |
paulgardiner | I don't understand why a duplicate dependency should cause the problem, but the removal does fix it | 10:45.12 |
tor8 | ah, "order only prerequisites" is what they're called | 10:45.54 |
| so a dependency that doesn't care about the time stamps as long as it exists | 10:46.36 |
| so we don't rebuild everything just because the directory changed :) | 10:46.51 |
| paulgardiner: The duplicate dependency adds a dependency when cross compiling. | 10:47.30 |
paulgardiner | Of course | 10:47.49 |
tor8 | the "regular" dependency is guarded when cross-compiling (and thus requires a separate "make generate" step) | 10:48.04 |
kens | TBH I wasn't aware that the MediaBox in PDF accepted negative values, seems perverse to me, but there you go. A useful additional tool for SO answers | 12:20.48 |
Robin_Watts | Not to accept negative values would seem perverse to me :) | 12:44.23 |
kens2 | It seems odd to me to have negative values for media, what does that mean in terms of a piece of physical output ? | 12:45.10 |
| But as I say, it gives another solutoin for SO questions. | 12:45.32 |
| MediaBox is trivial to fiddle. | 12:45.40 |
Robin_Watts | kens2: mediabox is just a notional region of the infinite plane. | 12:59.58 |
kens2 | I'd always considered it euqivalen to /PageSize | 13:00.24 |
Robin_Watts | looks up PageSize :) | 13:01.51 |
kens2 | dBut its not important, as I said it a useful tool for the people who made their PDF file wrong and want to change it.... | 13:02.25 |
Robin_Watts | right, PageSize is just width/height. The 0,0 is an origin for Postscript. | 13:02.44 |
| Yes, it makes things much easier. | 13:02.49 |
kens2 | I cna write a BeginPage procedure which takes the existing PageSize and increases it by a percentage or a fixed value. Whch easily makes pages bigger even if they aren't all the same size. | 13:04.21 |
| And emits a MediAbox pdfamrk of course. | 13:04.36 |
| I should probably try that out...... | 13:04.47 |
pipitas1 | kens: if you run `pdfinfo -box` on a PDF using negative coordinates for lower left corner of media box, the reported "Page size" takes into account the additional space. | 14:01.23 |
kens | See Robin's comments above | 14:01.44 |
pipitas1 | looks⦠| 14:02.35 |
kens | Hmm, that's worrying. If I set a /MediaBox /Page pdfmark then pdfwrite emits *2* /MediaBox entries in the page dictionary ! | 14:05.49 |
| I hsould probably fix that...... | 14:06.02 |
pipitas1 | kens: Actually, I had used negative lower-left coordinates for MediaBox (and other *Box) values in the past, but never dared to "publish" it because I was doubtful that most viewers would support it⦠| 14:06.57 |
Robin_Watts | tor8: We should add a -z option to mutool clean to compress streams. | 14:08.55 |
| i.e. the opposite of -d | 14:09.01 |
tor8 | Robin_Watts: I have considered it | 14:15.15 |
| recompress or just compress raw ones? | 14:15.28 |
| or try to detect image streams and leave them as is, and recompress everything else (i.e. anything not affected by -i) | 14:15.58 |
Robin_Watts | tor8: It should affect all the things that -d affects, maybe? | 14:23.36 |
| so where -d decompresses images and fonts etc (unless -i and -f are specified), -z should compress images and fonts etc (unless -i and -f are specified) | 14:24.31 |
| I guess we wouldn't want to flate compress jpegs. | 14:24.50 |
| or jbig2s/faxes etc. | 14:25.06 |
kens | WHat if you get given a PDF which is already compressed (in part at least) ? | 14:25.11 |
| Decompressing an unompressed stream does nothing, but compressing a compressed stream is at best pointless | 14:25.48 |
Robin_Watts | kens: We wouldn't want to recompress streams that were already flated/DCT/JBIG2/LZWd. | 14:26.12 |
kens | IMO tor's original suggesiotn seems best, only compress a stream if it currently has no filter applied | 14:26.13 |
Robin_Watts | kens: ASCII85Decode etc? | 14:27.02 |
kens | I'd leave those, yes | 14:27.20 |
Robin_Watts | I guess. | 14:27.25 |
kens | But you could get clever with them if you wanted | 14:27.27 |
Robin_Watts | People can decompress and then recompress if they care about those. | 14:27.39 |
kens | I would say so yes | 14:27.51 |
Robin_Watts | I would think we'd want to compress RLEd data. | 14:28.02 |
| cos that still admits of significant compression. | 14:28.30 |
kens | Perhaps, but I';d be inclined to leave that too. SO -z only compresses raw data. You could have -z (only compress raw streams) and -Z (compress everythign that seems reasonable) | 14:28.40 |
Robin_Watts | yeah. | 14:28.59 |
| it's a hole in our capabilities anyway. | 14:29.08 |
kens | It would be nce to have certainly | 14:29.29 |
| Well, that's not entirely ideal. pdfwrite always writes a /MediaBox with 0,0 and the current page size, even if its been overridden by a pdfmark. And then it writes the pdfmark value as well :-O | 14:38.05 |
| That definitely needs to be fixed..... | 14:38.17 |
tor8 | Robin_Watts: -diz would decompress all but images, then compress the (now) uncompressed streams with flate | 14:43.17 |
Robin_Watts | tor8: Nice. | 14:43.34 |
tor8 | would be nice to have a -a or -x flag to also add an asciihexdecode filter | 14:43.43 |
| seems like the most flexible way to do it | 14:43.59 |
Robin_Watts | tor8: essentially all that would map onto fz_write options. | 14:44.04 |
tor8 | pdfclean -dia (or -x or something) to get a text editable pdf without binary data, but leave the images compressed | 14:44.44 |
| with all binary streams hidden under an asciihex layer | 14:44.59 |
| so a -z option to deflate uncompressed streams, and -a to asciihex binary streams? | 14:45.54 |
| or just asciihex compressed streams? | 14:46.01 |
| the latter is probably safer, given the possible use of binary strings in content streams we want to edit | 14:46.29 |
Robin_Watts | tor8: -difa, but yes. | 14:50.18 |
| The purpose of -a would be presumably to make something that removes all top bit set chars. Leaving some in content streams seems a bad idea. | 14:51.36 |
| we may need 2 -a's. | 14:51.43 |
tor8 | with sanitize, we re-print the content streams using plain ascii (all non-ascii chars are escaped) except for BI images | 14:52.35 |
| which I guess we could asciihex encode as well | 14:52.40 |
| actually, that would be rather nice | 14:52.49 |
| but running sanitize on the content streams sort of defeats the purpose of debugging a file | 14:53.15 |
Robin_Watts | We can't asciihex BI streams can we? | 14:53.25 |
| or rather, not without asciihexing the whole content stream. | 14:53.42 |
tor8 | yeah, one -a to hex compressed streams, and one to hex streams with any binary data at all | 14:53.43 |
| Robin_Watts: we can, they can use the full pipeline of filters | 14:53.58 |
Robin_Watts | Of course, they are compressed themselves. | 14:54.32 |
tor8 | and I rewrote the BI sanitizing code to recreate the BI ... ID dictionary from scratch, so adding an AHx layer would be trivial | 14:54.35 |
| Robin_Watts: do you want to add this feature? or should I? | 14:55.08 |
Robin_Watts | tor8: I don't think we should add it now. | 14:55.17 |
| (i.e. not for the release) | 14:55.22 |
tor8 | I'm happy to do it myself, but I won't push it to golden until post release | 14:55.35 |
Robin_Watts | Did you get the android rotation of epub stuff working? | 14:55.57 |
| and do the same for ios? | 14:56.12 |
tor8 | doing it for ios is out of my capability | 14:56.48 |
| haven't had success yet, but I'm planning on working late today so there's still time | 14:57.09 |
Robin_Watts | Ah. But does ios at least work sanely for epubs, do you know? | 14:57.24 |
tor8 | Robin_Watts: oh. that's a good question. | 14:57.38 |
| I guess not, the .plist and library lister probably need to add .epub | 14:58.03 |
Robin_Watts | Is that within your capabilities? | 14:58.15 |
| (It wouldn't be within mine) | 14:58.21 |
tor8 | I can fix the plist and code, but have no way of building or testing it | 15:01.17 |
Robin_Watts | tor8: paulgardiner can build/run for ios, I believe. | 15:01.40 |
paulgardiner | I can | 15:02.06 |
tor8 | paulgardiner: there's a commit on tor/master that ought to work | 15:03.50 |
paulgardiner | What's the problem being solved? | 15:04.07 |
tor8 | opening epub files | 15:04.20 |
Robin_Watts | paulgardiner: mupdf should read and display epub files. | 15:04.24 |
paulgardiner | Can you send me a test file? | 15:04.51 |
Robin_Watts | question 1: does it now recognise them and open them. | 15:04.51 |
| question 2: does it fall in a heap when you rotate the device? | 15:05.02 |
| paulgardiner: You have calibre installed, right? | 15:05.24 |
tor8 | paulgardiner: http://www.feedbooks.com/publicdomain has tons of epub files for download | 15:05.34 |
| and drm-free | 15:05.43 |
paulgardiner | I'd like to use your test files so that I don't get confused by finding a different problem | 15:06.05 |
Robin_Watts | paulgardiner: From http://www.feedbooks.com/publicdomain, download "Heart of Darkness" | 15:09.07 |
| (top right, first row) | 15:09.12 |
| That works fine for me on windows. | 15:09.17 |
| Albeit page 1 seems to show part of the image that's on page 2. | 15:09.33 |
| I saw that with another book too. Possibly the Wu Tang Clan one. | 15:09.55 |
paulgardiner | joseph conrad? | 15:10.26 |
Robin_Watts | yeah. | 15:10.31 |
| It's the book that Apocalypse Now was based on. Only short. Very good. | 15:10.47 |
paulgardiner | Works nicely. Opened the file, and rotations looks really nice | 15:15.03 |
| It produced a blank first page and then split the image of the cover over the next two pages, but besides that | 15:15.32 |
Robin_Watts | paulgardiner: Presumably the pages don't resize when you rotate? | 15:18.24 |
tor8 | Robin_Watts: yeah, the images partly showing up on the previous page are an artefact of how I've implemented page margins | 15:24.31 |
| something I intend to solve, eventually | 15:24.40 |
Robin_Watts | tor8: Those books have a blank page except for the thin strip of image, then the title image on page 2. | 15:27.56 |
| Should the title image really be on page 1? | 15:28.04 |
| Or is there some hidden content or something? | 15:28.22 |
mvrhel_laptop | so, gsview should be able to open epub too then? | 15:28.25 |
Robin_Watts | mvrhel_laptop: It should | 15:29.08 |
tor8 | Robin_Watts: the image is bigger than the full page so I resize it to fit, but even so there are margins within the paragraph where the image sits | 15:41.24 |
| so it triggers a page break, and then plants the image at the top of the next page (which is what you can see at the bottom of the page) | 15:41.50 |
Robin_Watts | tor8: Can we not have some special case code in there? | 15:42.08 |
tor8 | the sliver at the bottom is because I don't cull images that are outside the page properly | 15:42.10 |
| I'm thinking of ways to do it | 15:42.17 |
| maybe look at the current margins and take that into account for the max image height | 15:42.39 |
Robin_Watts | If there is nothing on the page already, then don't page break ? | 15:42.55 |
tor8 | Robin_Watts: source/html/hmtl-layout.c in layout_flow it calls measure_image | 15:44.13 |
| yeah, the problem is that there already is something on the page -- a margin :( | 15:45.00 |
| and the image as sized wouldn't fit | 15:45.09 |
| it'd get a bit the same size as the top paragraph margin trimmed off the bottom | 15:45.38 |
| okay, the sliver of image at the bottom was a simple < vs <= issue | 15:46.48 |
| so that can go in before we release | 15:46.55 |
Robin_Watts | cool. | 15:47.01 |
tor8 | one quick fix would be to make sure the image is no larger than 90% of the page | 15:48.31 |
| I'll ponder on this | 15:48.35 |
Robin_Watts | Can you easily limit the maximum height/width to page size - page margins? | 15:49.22 |
| or might there be multiple margins to take into account? | 15:49.43 |
tor8 | the problem is multiple margins | 15:49.53 |
| but it might be possible to find the current nesting of margins | 15:50.14 |
Robin_Watts | Yeah, cos the image can never be bigger than the page size - current margins. | 15:55.11 |
tor8 | yeah. I've got a fix that works. it's not perfect (it doesn't consider collapsed margins) but it's good enough I think. | 15:59.39 |
| pushed to tor/master | 15:59.42 |
| this would probably not be an issue if I actually took some more CSS properties into account | 16:00.49 |
| like max-width and max-height | 16:00.53 |
| but this fixes the most immediate problem, and something similar will be what max-width does | 16:01.15 |
Robin_Watts | pages have 0,0 in the bottom left hand corner, increasing upwards? | 16:04.17 |
| The scaled image one is fine. | 16:06.09 |
| Just trying to understand the other one. | 16:06.25 |
| I would have expected one of page_bot or page_top to be inclusive, and one exclusive. | 16:07.08 |
| If the page ran from 0 to 1000, then I would expect that to show anything >= 0 and < 1000 say. | 16:07.38 |
tor8 | no, y is increasing to the bottom | 16:12.05 |
| +y is down | 16:12.11 |
| +x is right | 16:12.13 |
Robin_Watts | So I would expect page_bot to be exclusive, and page_top to be inclusive | 16:17.11 |
mvrhel_laptop | question for you all. so is it GsView, GSView, gsview, GSview ? | 16:17.38 |
| Russell always had GSview. | 16:17.56 |
| Chris has GsView on the website | 16:18.12 |
| I had been using gsview | 16:18.17 |
| I am leaning towards GSview | 16:18.40 |
| or gsview | 16:18.58 |
Robin_Watts | hence if (node->y >= page_bot || node->y + node->h < page_top) | 16:19.32 |
kens | mvrhel_laptop : one for Miles/Scott to answer I would say | 16:19.48 |
Robin_Watts | mvrhel_laptop: I asthetically prefer GsView or GSview or GSView | 16:19.54 |
| my favourite would be GSView. | 16:20.02 |
mvrhel_laptop | ok I will ask them | 16:20.11 |
Robin_Watts | certainly, 'gsview' in the title bar of the app just looks odd somehow. | 16:20.29 |
kens | Personalyy I would use GSView because that's what it was before | 16:20.37 |
Robin_Watts | kens: It was GSview before, I think. | 16:20.56 |
kens | But that's not a very good reason :-) | 16:20.57 |
| Yes, I meant GSview | 16:21.26 |
| Held the shift too long | 16:21.32 |
mvrhel_laptop | GSVIEW | 16:22.32 |
kens | LOL | 16:22.43 |
mvrhel_laptop | or GSVIEW! | 16:22.47 |
kens | Shouting isn't good either | 16:22.50 |
mvrhel_laptop | ;) | 16:22.51 |
kens | Robin_Watts : FWIW I can now alter the margins on a PDF file with a simple PostScript program: | 16:23.43 |
| << | 16:23.44 |
| exch pop 2 ne { | 16:23.44 |
| [-10 -10 | 16:23.44 |
| currentpagedevice /PageSize get | 16:23.44 |
| aload pop | 16:23.44 |
| 10 add exch | 16:23.45 |
| 10 add exch] dup | 16:23.45 |
| true | 16:23.48 |
| } { | 16:23.48 |
| false | 16:23.49 |
| }ifelse | 16:23.49 |
| } | 16:23.50 |
| >> setpagedevice | 16:23.50 |
| Grr, '/' problem | 16:23.53 |
Robin_Watts | kens: Nice. | 16:24.04 |
kens | "<< | 16:24.11 |
| " /EndPage { | 16:24.12 |
| " exch pop 2 ne { | 16:24.12 |
| " [-10 -10 | 16:24.12 |
| " currentpagedevice /PageSize get | 16:24.12 |
| " aload pop | 16:24.12 |
| " 10 add exch | 16:24.12 |
| " 10 add exch] dup | 16:24.13 |
| " /MediaBox exch [ 3 1 roll | 16:24.13 |
| " /PAGE pdfmark | 16:24.14 |
| " /CropBox exch [ 3 1 roll | 16:24.14 |
| " /PAGE pdfmark | 16:24.15 |
| " true | 16:24.15 |
| " } { | 16:24.16 |
| " false | 16:24.16 |
| " }ifelse | 16:24.17 |
| " } | 16:24.17 |
| ">> setpagedevice | 16:24.18 |
| And that works even when the pages vary in size/shape | 16:24.27 |
| Obviously in this case I'm just makign it 10 points bigger all round | 16:24.45 |
Robin_Watts | kens: Yeah. I'd like to have a mutool thing where we can tweak pages mediaboxes/rotations. | 16:25.00 |
kens | I should start collecting these off of SO and making a page in our documentation for them. | 16:25.01 |
Robin_Watts | kens: Twiki page! | 16:25.09 |
kens | Well I'd like something in our distribution | 16:25.22 |
| But that would work I guess. | 16:25.35 |
| Anyway, off for dinner, goodnight folks | 16:25.44 |
tor8 | Robin_Watts: if the image bottom == page_top, then we may get a sliver of the bottom of the image at the top of the page | 16:34.17 |
Robin_Watts | tor8: but page_top is exclusive, right? | 16:35.19 |
| If we have a 1000 pixel high page, then page_bot = 0, page_top = 1000 | 16:35.36 |
| and this means we show things that are >= 0 and < 1000 | 16:35.47 |
tor8 | Robin_Watts: well ... they're floats (and dangerous!) | 16:36.08 |
| and you've got them reversed. page_top = 0, page_bot = 1000 | 16:37.58 |
| and for page 2, page_top = 1000, page_bot = 2000 | 16:38.12 |
| the way the code is being called now | 16:38.22 |
mvrhel_laptop | Miles likes GSView | 16:41.26 |
| I will standardize on that one | 16:41.46 |
| gsview now handles epub files | 16:41.57 |
fredross-perry | mvrhel_laptop: howâs that? | 16:42.35 |
mvrhel_laptop | fredross-perry: mupdf handles epub | 16:42.50 |
| so it was just a simple matter of file association | 16:42.58 |
| and making a new file type icon | 16:43.06 |
fredross-perry | what file extension? âepub"? | 16:43.12 |
mvrhel_laptop | yes | 16:43.15 |
| epub | 16:43.17 |
fredross-perry | Iâll see about that tomorrow. | 16:43.30 |
mvrhel_laptop | cool. | 16:43.34 |
| now to fix my text selection | 16:44.02 |
fredross-perry | mvrhel_laptop: did you try to uninstall/reinstall linux64? | 16:44.18 |
| ⦠to see about searching | 16:44.30 |
mvrhel_laptop | fredross-perry: I will try that when I get back home. at coffee shop now. the install is on my desktop machine | 16:44.42 |
| I will also check out running from command line to see if anything comes back with the print crash | 16:45.19 |
| the application just disappears | 16:45.24 |
fredross-perry | gotcha | 16:45.37 |
| might be related to what printers you do/donât have defined. I used to have a crash when you had no printers defined, but thatâs fixed. | 16:46.21 |
mvrhel_laptop | hehe I have no printers defined | 16:46.38 |
| darn just had a crash on windows with release version. hoping I can get it to do this with debug... | 16:47.49 |
fredross-perry | so you should be getting a message saying that. Does the crash happen when you try to print any doc, or just the PDF manual? | 16:48.10 |
mvrhel_laptop | I only have the PDF manual on the linux vm I will try a smaller doc | 16:48.48 |
Robin_Watts | tor8: OK, so exactly inclusive, exclusive then. | 16:59.21 |
| page_top is inclusive, page_bot is exclusive. | 16:59.36 |
| hence >= page_bot should be discarded, < page_top should be discarded. | 17:00.11 |
gregorio2 | greetings. I have a question for tor8 about OCGs | 18:16.44 |
Robin_Watts | gregorio2: Ask away, but you may have missed tor8 for the night (and he may deny all knowledge of OCGs) | 18:18.16 |
gregorio2 | I saw in the log he wanted to move the OCG section in the interpretor. I just wanted to check if it is still something you are considering | 18:20.05 |
| it would be great to be able to navigate between layers | 18:20.36 |
Robin_Watts | gregorio2: The short term work we were doing on the interpreter is done. | 18:20.42 |
gregorio2 | short term? | 18:21.20 |
Robin_Watts | what do you mean by "navigate between layers" ? | 18:21.27 |
gregorio2 | juste toggle on/off an element | 18:22.02 |
Robin_Watts | All the OCG handling is in the interpreter now. | 18:22.13 |
| We look up the state of the OCGs in the resources to see if it is visible or not to decide whether it's hidden or not. | 18:23.00 |
mvrhel_laptop | ok. I see where the text selection for the partial line is wrong | 18:25.08 |
Robin_Watts | mvrhel_laptop: Did you want a file that shows vertical text? | 18:25.46 |
mvrhel_laptop | ha | 18:25.51 |
| you are funny | 18:25.55 |
gregorio2 | great!! yes I was wondering if the visibility could be changed (via javascript) | 18:26.12 |
mvrhel_laptop | that will need to wait for a bit longer, but yes, please give me one now and I will have a look after I fix this and the landscape issue | 18:26.28 |
Robin_Watts | gregorio2: Not sure the javascript bindings are there to do that yet. | 18:27.56 |
gregorio2 | can I modify a C variable with javascript? | 18:29.57 |
Robin_Watts | gregorio2: No. | 18:30.09 |
| I would assume that the standard PDF javascript bindings allow the javascript embedded within the PDF to turn OCGs on and off. | 18:30.56 |
| That requires DOM, and I'm not sure how complete ours is. | 18:31.34 |
| We *maybe* support a bit for forms, but certainly it's not complete. (unless my understanding is very wrong). | 18:32.00 |
gregorio2 | if you have a minute, can you explain me how pdf dom and js interact? | 18:34.41 |
mvrhel_laptop | not sure what I was thinking when I wrote this part... | 18:36.21 |
Robin_Watts | gregorio2: I would have to read up on it myself to be sure. It's not a section of the spec I've had anything to do with. | 18:42.50 |
| But generally a DOM gives you a programmatic way to access the elements that make up a page. | 18:43.15 |
| Like you can enumerate the 'objects' that make up your document. | 18:43.36 |
| For forms, this means you can enumerate the fields of the documents, read their values, set their values etc. | 18:43.53 |
| It would not surprise me to find that there was something to let you enumerate the OCGs on a page, read their states/set their states etc. | 18:44.24 |
gregorio2 | this is what's in pdf-form.c? | 18:44.48 |
Robin_Watts | pdf-form.c is more to do with our internal handling of them. | 18:45.18 |
| Our form handling doesn't touch OCGs. | 18:45.36 |
| And I'm not sure how much of the form stuff we've had to implement in javascript. | 18:45.50 |
gregorio2 | and do you know where is the DOM part? | 18:47.22 |
| for forms? | 18:47.30 |
Robin_Watts | gregorio2: I don't know that there is such a part. | 18:47.44 |
gregorio2 | I guess if I understand how forms work I can use it for OCGs? | 18:48.25 |
Robin_Watts | It would be a starting point, but 1) I'm not convinced it exists, 2) it would be quite different. | 18:49.35 |
| To be capable of doing the work to make it work, you'd need to be skilled in both C and javascript. | 18:50.09 |
| If you want to just turn OCGs on and off, then you can probably do that just from C :) | 18:50.26 |
gregorio2 | yes I did it in C. I just wanted to have something more generic | 18:51.15 |
Robin_Watts | tor8: Updated version of your commits on robin/master | 18:59.59 |
| My version (just 1 char different to yours) satisfies my maths, and cures the appearance of the strip of image (even without the last commit in). | 19:00.50 |
| oh, balls. | 19:01.14 |
gregorio2 | thanks for your help. this was very helpful | 19:01.21 |
Robin_Watts | ignore my commits, we'll have to go with yours. Though it bothers me :( | 19:01.47 |
tor8 | Robin_Watts: <= and >= on both comparisons? | 19:02.13 |
Robin_Watts | yeah, though it still feels wrong. | 19:02.22 |
| but I can't deny the evidence of my own eyes that it seems to be required. | 19:02.39 |
tor8 | I know. it's floating point and not pixels... which is oddly disturbing somehow :) | 19:02.46 |
Robin_Watts | tor8: Ah! | 19:04.48 |
| node->y + node->h is exclusive too. | 19:05.00 |
tor8 | that makes a fair bit of sense | 19:05.51 |
Robin_Watts | So, I'm now much happier. Push when you're ready. | 19:06.13 |
mvrhel_laptop | bbiaw | 19:06.50 |
Robin_Watts | Does that mean we're ready to release? Or is there still stuff you're bashing on? | 19:06.54 |
mvrhel_laptop | Robin_Watts: thanks for the file | 19:07.02 |
Robin_Watts | mvrhel_laptop: No worries. it's a nice example. Page 1 is quite simple. | 19:07.16 |
tor8 | Robin_Watts: I think we should release. the automatic epub page sizing can be for the next release. | 19:07.24 |
mvrhel_laptop | right now gsview does nothing with the file :(. some work to do | 19:07.44 |
Robin_Watts | tor8: Ok. Push the commits, and we can build archives/releases tomorrow. | 19:07.50 |
mvrhel_laptop | as far as text selection that is | 19:07.55 |
Robin_Watts | mvrhel_laptop: ah, phew :) | 19:08.01 |
| mvrhel_laptop: Are you up to date with mupdf? | 19:08.08 |
mvrhel_laptop | not in a few weeks | 19:08.16 |
| or couple weeks | 19:08.19 |
Robin_Watts | That's why then. | 19:08.23 |
mvrhel_laptop | ok | 19:08.25 |
Robin_Watts | We were generating zero width rectangles. | 19:08.31 |
| for the bbox for the glyphs. | 19:08.36 |
mvrhel_laptop | I will get this other thing fixed, and the landscape and then update | 19:08.37 |
| off to lunch now | 19:08.49 |
tor8 | Robin_Watts: did paul verify the ios changes? | 19:08.52 |
Robin_Watts | tor8: he did. | 19:08.58 |
tor8 | ah, yes. he did. silly me. | 19:09.25 |
| I'll reword and push that commit too then. | 19:09.30 |
Robin_Watts | tor8: have you seen humblebundle.com btw? | 19:10.11 |
tor8 | the origin bundle? | 19:10.35 |
Robin_Watts | yeah. | 19:10.39 |
tor8 | I already own the ones I'm interested in, but thanks. | 19:11.01 |
Robin_Watts | The Dead Space and Mass effect series are great... | 19:11.08 |
| ah, right, me too, but I thought I'd mention it. | 19:11.15 |
tor8 | I worked my way through the mass effect series a few months back | 19:11.22 |
| ... and I'm allergic to first-person shooters and horror games | 19:11.42 |
Robin_Watts | Dead Space is third person. | 19:12.01 |
tor8 | ah, might not become motion sick then :) | 19:12.22 |
Robin_Watts | I started "The Evil Within", hoping it would be like resident evil, and it's just a massive grind. I gave up on it, which is really rare for me. | 19:12.44 |
| But the Dead Space series is really really good. | 19:13.02 |
tor8 | I'm probably one of the few people who thought mass effect 1 was the best in the series... | 19:13.16 |
| the UI and companion AI changes just got worse and worse ... not to mention the story line :( | 19:13.37 |
Robin_Watts | I played Thinking With Time Machine at the weekend. Nice but short. | 19:13.52 |
tor8 | I might have to give that a go, then. | 19:13.56 |
| but agh, I've got kickstarter overload... too many projects actually delivered! | 19:14.26 |
Robin_Watts | and I started the Tomb Raider reboot too. That looks really good. | 19:14.30 |
| Pillars of Eternity is going to be my new laptop game for when travelling I think. | 19:14.44 |
tor8 | I'm waiting for the dust to settle and the bugs to get fixed | 19:15.11 |
| but I am really looking forward to pillars | 19:15.18 |
Robin_Watts | It's oddly oldschool. | 19:15.46 |
tor8 | elite dangerous was a bit crap. and I got motion sick. | 19:15.49 |
Robin_Watts | sometimes they'll speak the lines, and sometimes they won't. | 19:15.59 |
tor8 | hah, just like baldur's gate. some lines voiced, some not. | 19:16.11 |
| oh, and I've still got the shadowrun expansion to play through. | 19:16.58 |
Robin_Watts | and the combat seems a bit hit and miss (ha!) to me, but I'm probably just missing something. | 19:17.01 |
tor8 | is it 'swish swish swish' all misses with your low level party? | 19:17.21 |
| and then 'splat!' the monster one-shot your wizard? | 19:17.36 |
Robin_Watts | tor8: It's "did I hit him?" "Have I queued a combat move?" "Is anything I'm doing making a difference?" | 19:17.57 |
| Should I just sit here and let it happen automatically? | 19:18.08 |
tor8 | ah, yes. you haven't played the old BG games right? | 19:18.23 |
| because I suspect it's going to be very similar, and they haven't got the best feedback going | 19:18.39 |
Robin_Watts | No. But it feels like KOTOR etc, but not as clear. | 19:18.52 |
tor8 | in BG each character is on a 6-second 'round' timer, and the animations play whack-a-mole but in reality they only hit once per 6 seconds (or more often, if you have a fast weapon) | 19:19.35 |
Robin_Watts | ok. I'm quitting for a bit at least. Actually made some progress today, so feeling a bit better. | 19:19.45 |
tor8 | it takes a while getting used to, the sort of odd turn-based/real-time hybrid system | 19:20.14 |
Robin_Watts | yeah. | 19:20.22 |
| tor8: 1 warning fix on robin/master | 23:29.48 |
| Forward 1 day (to 2015/04/16)>>> | |