| <<<Back 1 day (to 2018/07/25) | 20180726 |
raliste | Last resort would be to run independent processes for each page task | 00:14.22 |
zerous | Hi | 07:45.41 |
mubot | Welcome to #mupdf, the channel for 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. | 07:45.41 |
zerous | Does mupdf support persistent bookmarks? | 07:46.21 |
| I have tried using [number]m and [number]t to save bookmarks but they don't survive if I close the book and re-open it. | 07:48.50 |
kens | As far as I know, teh various demonstration apps which use MuPDF (the core library) do not use bookmarks at all | 07:53.31 |
zerous | kens: oh, I thought that the documentation here implied that https://mupdf.com/docs/manual-mupdf-gl.html | 07:56.18 |
kens | Hmm, well that's a new one on me, clearly Tor has been busy | 07:56.58 |
| You'll have to wait for him to arrive before anyone can comment, but your question is llogged so he'll see it when he gets here | 07:57.29 |
zerous | sure, thank you :) | 07:57.48 |
tor8 | zerous: sorry, but no. the bookmarks are not saved anywhere. | 09:27.17 |
zerous | tor8: ah | 09:27.38 |
| Can it be done if I am willing to study the codebase? | 09:28.15 |
tor8 | easily, if you're willing to write the saving and loading code yourself :) | 09:29.05 |
zerous | cool | 09:30.31 |
| tor8: Do you have any suggestions regarding where I might start digging? | 09:31.05 |
tor8 | I assume you'd want to key the bookmarks to the absolute path name of the open file, and save them in a $HOME/.mupdfinfo (or %APPDATA%\MuPDF\marks on windows) | 09:31.13 |
zerous | yup | 09:31.26 |
tor8 | in platform/gl/gl-main.c -- load the config file in main(), replace the exit() calls with a save_config_and_exit() function, and restore the bookmarks in load_document() | 09:32.42 |
zerous | I see | 09:33.00 |
tor8 | at the top of gl-main.c are a few global variables that you want to save and restore | 09:33.01 |
| the struct mark marks[10], and possibly also the history, future, history_count and future_count | 09:33.26 |
| and while you're at it, maybe also the currentpage so if you re-open a file you come back to the same page you were at when you closed | 09:33.56 |
zerous | Yeah that would be pretty handy :) | 09:34.25 |
tor8 | I've avoided it so far because writing and loading a config file needs a config file parser, and that means deciding on a syntax and a good place to write it | 09:35.24 |
| and we've so far avoided all configuration files, being a 'one executable, no install needed' solution | 09:35.45 |
zerous | I see | 09:36.02 |
palashah_ | I am facing a problem when compiling mupdf on OSX 10.13.6. It throws me this error - | 11:12.00 |
| ld: warning: option -s is obsolete and being ignored | 11:12.06 |
| Undefined symbols for architecture x86_64: | 11:12.06 |
| "_glutLeaveMainLoop", referenced from: | 11:12.06 |
| _do_main in gl-main.o | 11:12.06 |
| ld: symbol(s) not found for architecture x86_64 | 11:12.11 |
| clang: error: linker command failed with exit code 1 (use -v to see invocation) | 11:12.11 |
| any help ? | 11:12.11 |
| grateful if someone could reply | 11:12.17 |
| also, if I try copy-paste text in mupdf(installed using homebrew), it outputs a .tiff file. Is that normal behaviour? | 11:12.17 |
tor8 | palashah_: building on macosx is always a problem... apple keeps breaking backwards compatibility. | 11:27.57 |
| palashah_: the glutLeaveMainLoop thing is a fairly easy fix | 11:28.10 |
| the linker not supporting '-s' is annoying, but that's just a warning you can ignore | 11:28.26 |
| how do you do the copy-paste? | 11:28.39 |
palashah_ | using the mouse right click, and then command + c for copy. when I paste it outputs a .tiff file | 11:29.16 |
| what is the fix though > | 11:30.07 |
tor8 | we don't support cmd+c to copy... in fact, I don't think we support copying at all on macosx | 11:30.12 |
| Apple's GLUT version doesn't expose clipboard functionality | 11:30.21 |
| so I expect their GLUT cmd+c copies a screenshot as an image | 11:30.49 |
palashah_ | ok :( . | 11:31.14 |
| It is kind of annoying because it copies the entire page. | 11:31.56 |
tor8 | palashah_: http://git.ghostscript.com/?p=user/tor/mupdf.git;a=commitdiff;h=8f229fb183ee390e26daf10cd1732289bb8fee63 try that as a workaround for the build | 11:32.20 |
| palashah_: you could build the old mupdf-x11 and run it in Xquartz if you really need copy & paste | 11:32.43 |
| if Xquartz still exists ... it's been well over 5 years since I last used macosx | 11:33.35 |
palashah_ | ok, but I think mupdf-x11 is not supported for macosx, right ? | 11:33.42 |
tor8 | it needs an X11 server, which *used* to be shipped with macosx | 11:34.18 |
| but I would not be surprised if apple killed it off | 11:34.27 |
palashah_ | X11 server is not supported now | 11:35.38 |
| Understood your fix, will give that a try. Thanks for replying ! | 11:35.39 |
tor8 | palashah_: in platform/gl/gl-ui.c you could probably hack in some macos specific clipboard copy/paste support in ui_set_clipboard and ui_get_clipboard | 11:37.08 |
| I don't have access to a macos machine myself, but if you make a patch I'll consider taking it on | 11:37.28 |
| Forward 1 day (to 2018/07/27)>>> | |