| <<<Back 1 day (to 2020/11/17) | Fwd 1 day (to 2020/11/19)>>> | 20201118 |
emfipp | hi! I just dl'd and test-ran mupdf 1.18 (x64 windows w/ tesseract) with the new ui, and it appears the ui does not respect flipping mouse buttons? | 03:24.18 |
| after flipping mouth buttons, the clicking order is reversed in the ui, though the pdf viewer proper does respect the order | 03:24.54 |
| can someone confim this? | 03:25.39 |
| s/confim/confirm/1 | 03:25.46 |
| oh, and why is mupdf.exe missing in this build? | 03:27.33 |
| only mutool and mupdf-gl | 03:27.40 |
| and honestly I don't think mupdf-gl needs some sorta ui---just follow the vi style | 03:31.26 |
| taking after vi meaning you need a bottomost text area for single-line input at best | 03:32.30 |
| or just paint over the page area | 03:32.49 |
| instead of having to invent your own widget | 03:32.58 |
| though I do prefer native text area for command mode input | 03:33.43 |
| (same for mupdf) | 03:33.47 |
| (or use a lightweight third-party tk like fltk) | 03:37.10 |
sh4rm4^bnc | fltk is C++ | 03:39.21 |
emfipp | the pithe is just: stop reinventing the wheel | 04:13.04 |
clam | emfipp: mupdif is an X11 application that's why it doesn't build on windows | 05:22.22 |
| emfipp: and vi is too bloated and is an editor, the aim ought to be less | 05:23.47 |
| (pun intended) | 05:23.58 |
sebras | clam: emfipp: on linux we have the non-GL based mupdf-x11, likewise on windows we have a non-GL based mupdf.exe (based on some windows interface, GDI perhaps?). I don't know why @Robin_Watts only built the GL-based mupdf-gl.exe with tesseract enabled. | 06:54.36 |
| it might be that tesseract needs some support in the viewer and this has only been added to mupdf-gl and not to the non-gl based viewers. | 06:54.59 |
| emfipp: the main reason for adding a ui is support for adding/editing annotations and redactions. if you are not satisfied with the ui provided in the sample mupdf viewers, you may of course (like clam has with llpp) implement your own based on the mupdf rendering library. | 06:59.15 |
| new features are most likely to appear in mupdf-gl, rather than mupdf-x11/-win32. | 06:59.42 |
malc_ | sebras: thanks for the plug! llpp does not have (native) windows backend though :( | 07:30.47 |
sebras | malc_: you're welcome. it's a nice example of another slim open source viewer based on mupdf. :) | 07:37.02 |
malc_ | sebras: a and escape from the clutches of C and its ilk too :) | 07:44.08 |
emfipp | my problem is mostly about the mupdf-gl.exe not respecting mouse button flipping in the custom file chooser dialog. mupdf.exe is working as expected | 08:42.13 |
| the one without the -tessaract that is | 08:42.55 |
artifexirc-bot | <Robin_Watts> emfipp: Please feel free to submit a patch. | 09:54.25 |
Zsolt | hello | 13:29.56 |
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. | 13:29.56 |
ator | Zsolt: hey. | 13:30.49 |
Zsolt | did you have time to check that pdf? | 13:31.30 |
ator | I have. it's got *weird* font metrics | 13:31.58 |
| so the Type3 fonts say the glyphs are ENORMOUS | 13:32.32 |
| and then when drawing them, it adjusts the pen position after each character by a huge jump | 13:32.46 |
| we see the huge jump and think, hmm, that's gotta be a line or column break. insert new line. | 13:33.00 |
Zsolt | aha, I understand | 13:33.34 |
| can I fix it with some tool? (if not mutool some other program) | 13:33.57 |
ator | [(.)-4101.56(.)-6704.16(.)-3203.03(.)-6704.16(.)-2802.62(.)-6704.04(.)]TJ | 13:33.58 |
Zsolt | or the only solution is to do a full OCR | 13:34.12 |
| scan | 13:34.15 |
ator | do an OCR is your best bet, or regenerate the file from the source document | 13:34.28 |
| ...with a proper tool | 13:34.33 |
| one that doesn't do stupid things like say "the characters in this font are 10 inches wide at 12 points" and then after drawing each character add -9.9 inches kerning adjustments | 13:35.07 |
mattm22 | Can someone help me install this thing. Quite confused | 13:35.24 |
ator | I'm also confused. Install what thing where? :) | 13:35.53 |
mattm22 | PyMuPDF. Am I at the right place :) ? | 13:36.14 |
ator | sorry, the PyMuPDF developers don't hang out here as far as I know | 13:36.47 |
| we just do the core MuPDF library, tools, and apps. the pymupdf project is someone else using what we do. | 13:37.08 |
Zsolt | I have Abbyy finereader, or what kind of OCR app. should I use? (I have little experience with OCR programs) | 13:37.13 |
mattm22 | Ah. damn i'm list | 13:37.35 |
| lost | 13:37.36 |
ator | Zsolt: you could use the experimental Tesseract OCR-enabled mupdf build :) | 13:37.47 |
Zsolt | OK | 13:38.11 |
ator | @Robin_Watts might be able to guide you there | 13:38.20 |
artifexirc-bot | <Robin_Watts> mattm2: You could consider not using PyMuPDF and instead use our own, new, shiny MuPDF Python bindings? | 13:39.43 |
ator | You could also use the mutool run javascript bindings | 13:40.08 |
Zsolt | ator: so it is no way to fix the font metrics/problems with mutools or other tools? I tried with Adobe DC (it has some built-in fixes for all sort of pdf issues), but with no luck | 13:40.23 |
ator | it all depends what you want to accomplish really | 13:40.34 |
artifexirc-bot | <Robin_Watts> Zsolt: mupdf has some stuff in it now that will allow you to convert an input PDF to an output PDF with OCR'd text in it. | 13:41.16 |
| <Robin_Watts> The downside to that is that the output PDF is a rendered bitmap, NOT a vector input. | 13:41.35 |
ator | Zsolt: not trivially, you'd need to fix both the Type3 font descriptions *and* the text drawing operators | 13:41.40 |
artifexirc-bot | <Robin_Watts> If you want to keep the vector nature of the PDF file, it's a much harder problem. | 13:42.17 |
| <Robin_Watts> I can think of a couple of things to try. | 13:42.26 |
| <Robin_Watts> 1) Hack the font bboxes manually. | 13:42.37 |
| <Robin_Watts> If it's a 1 off file you want to fix, that may be doable. If you have a whole series of them to do, that could quickly get tedious. | 13:43.01 |
ator | the individual glyph procs have d0/d1 operators that you'd need to fix | 13:43.13 |
artifexirc-bot | <Robin_Watts> OK, that's harder. scratch that. | 13:43.24 |
ator | and then do the opposite adjustment every time the corresponding glyph is shown with TJ | 13:43.28 |
| to take away the same amount from the kerning adjustments | 13:43.40 |
artifexirc-bot | <Robin_Watts> I wonder what would happen if you fed it through gs? | 13:44.10 |
| <Robin_Watts> gs -sDEVICE=pdfwrite -o out.pdf in.pdf | 13:44.25 |
ator | I just tried it. it keeps the type3 glyph data's metrics. | 13:44.28 |
mattm22 | artifexirc-bot, does MuPDF have a python package? | 13:44.29 |
ator | so, garbage in, garbage out :( | 13:44.36 |
artifexirc-bot | <Robin_Watts> rats. | 13:44.38 |
| <Robin_Watts> mattm22: artifexirc-bot is the bridge between discord (where I am), and irc (where you are) ๐ | 13:45.17 |
Zsolt | ator: ok, then I will give up to fix that pdf, I'm just a "simple user", I have no advanced knowledge of pdfs, just to do OCR and some basic stuff . . . | 13:45.24 |
ator | Zsolt: yeah, your best bet if you want machine readable text is to just feed it through OCR | 13:45.46 |
mattm22 | Robin_Watts, I don't use IRC much so that's news to me | 13:45.49 |
artifexirc-bot | <Robin_Watts> mattm2: The latest version of MuPDF (1.18.0) has python bindings. | 13:46.14 |
| <Robin_Watts> The developer for that was cgdae, but he's off ill today. | 13:46.32 |
| <Robin_Watts> I guess we need to know more about what you want to do before we can really give you advice. | 13:47.08 |
Zsolt | ok, thank you | 13:47.27 |
artifexirc-bot | <Robin_Watts> If you're trying to take some PyMuPDF code you found and have that work with no changes, then you're going to have problems. | 13:47.43 |
mattm22 | I just need to open a PDF and merge it with a PDF | 13:47.47 |
artifexirc-bot | <Robin_Watts> "just" ๐ | 13:48.01 |
mattm22 | I'm having issues installing PyMuPDF | 13:48.02 |
artifexirc-bot | <Robin_Watts> Well, we can't help with PyMuPDF. | 13:48.13 |
mattm22 | I realize | 13:48.19 |
| So i'm not using that now | 13:48.27 |
artifexirc-bot | <Robin_Watts> We can (to a degree at least, in the absence of cgdae) help you with using mupdf via its inbuilt python bindings. | 13:48.54 |
| <Robin_Watts> So, first, you need mupdf 1.18 | 13:49.08 |
| <Robin_Watts> I doubt you'll find that as a package yet. You'll probably need to rebuild from source, which you can download from mupdf.com | 13:49.39 |
ator | mattm22: mutool merge can merge PDF files if you're okay with calling a command line tool and don't need to do anything fancier than copying pages | 13:49.41 |
mattm22 | I will have to install a package | 13:50.12 |
ator | mutool merge will remove stuff like links, annotations, table of contents, and forms, though | 13:50.24 |
mattm22 | This isn't something I'm doing one-off. I'm merging / opening, etc. automatically on a server. | 13:50.52 |
artifexirc-bot | <Robin_Watts> @ator Various commits on robin/master | 13:51.43 |
artifexirc-bot | <Robin_Watts> lunches. bbiab. | 13:51.50 |
mattm22 | Looks like I got an older version of PyMuPDF installed | 13:54.12 |
artifexirc-bot | <ator> @Robin_Watts s/Copy/Cope/ in the commit message, and LGTM | 14:32.01 |
| <Robin_Watts> @ator Thanks | 14:51.11 |
mattm22 | Robin, what do you know about PNG filters? | 14:53.26 |
artifexirc-bot | <Robin_Watts> as in predictors, or what? | 14:57.20 |
mattm22 | Well it's an error I received when trying to open a PDF file with another python PDF library. I was wondering if I could manually update that library to support the filter | 15:12.20 |
artifexirc-bot | <Robin_Watts> oh, I see. That sense of filters. | 15:25.46 |
| <Robin_Watts> Well, I'm unlikely to help you fix a competitor's product ๐ | 15:26.09 |
mattm22 | Hell, if you guys could get me working product I'm sure we would buy it | 15:28.44 |
malc_ | come to think of it ๐ is 4 bytes, :) is two... hippsters will soon make the world overflow and end | 15:28.56 |
superturbocat | Hello! May I ask if mujs supports object oriented programming? | 15:53.01 |
artifexirc-bot | <Robin_Watts> If standard js does, then mujs does, AIUI. | 15:54.11 |
ator | superturbocat: mujs supports ECMAScript 5. | 15:54.13 |
malc_ | you guys realize that he asked whether he may ask right, so your answers were... uhm.. wrong | 15:58.18 |
superturbocat | Then why can I use classes. | 15:58.32 |
| So version ECMAScript5 doesn't support OOP? | 16:02.23 |
artifexirc-bot | <Robin_Watts> superturbocat: can or can't ? | 16:02.35 |
| <Robin_Watts> As far as I can tell from looking at the source, mujs does NOT handle 'class' except by spotting it as a reserved future word and giving an error. | 16:03.08 |
| <Robin_Watts> From a quick look at wikipedia, it looks like ECMAScript6 aka 2015 was the version that introduced classes. | 16:03.41 |
superturbocat | That's why I'm asking. How do I use objects in mujs? | 16:04.42 |
ator | ES5 and Javascript 5 do not use class based inheritance. They use object prototypes. | 16:05.32 |
artifexirc-bot | <Robin_Watts> superturbocat: You asked "Then why can I use classes" - the answer is "you can't, because that requires a newer version of the JS specification than MuJS implements". | 16:06.27 |
ator | ES2015 added some syntactic sugar to let you create prototype chains more easily, and use the "class" keyword for this. MuJS does not support ES2015 syntax. | 16:06.38 |
artifexirc-bot | <Robin_Watts> You *can* do OO programming, just not using classes. | 16:06.56 |
superturbocat | Thanks for the answer! There is a lot of information in the internet, but there is no sense. | 16:06.59 |
ator | Javascript changed a lot with the 2015 version. It's a completely different language. | 16:07.23 |
malc_ | superturbocat: you have to have a working definition of what OOP is | 16:11.33 |
ator | malc_: what, "the spawn of the devil" isn't good enough? | 16:12.41 |
malc_ | ator: NO! llpp uses some some OOP for UI, it's a pleasure in ocaml :) | 16:14.27 |
| ator: and don't get me started on CLOS | 16:14.38 |
| sigh... this ocult talk just cost you a customer | 16:15.00 |
ator | Iรค! Iรค! Cthulhu fhtagn! Ph'nglui mglw'nfah Cthulhu R'lyeh wgah'nagl fhtagn! | 16:23.07 |
artifexirc-bot | <KenSharp> is impressed with ator's memory for Old Enochian | 16:24.08 |
ator | let's say nothing about google-assisted memory :D | 16:24.25 |
artifexirc-bot | <KenSharp> though one suspects Google may have helped | 16:24.30 |
| <Robin_Watts> @ator More little nuggets of joy: https://git.ghostscript.com/?p=user/robin/mupdf.git | 16:26.37 |
ator | the first and last LGTM, the "fz_copy_pixmap_area_converting_seps" I need a big more thinking time to figure out | 16:30.58 |
artifexirc-bot | <Robin_Watts> Please, take your time. I could use a sanity check there. | 16:31.24 |
ator | how did the old one even work? k = 0 and never changed | 16:31.34 |
artifexirc-bot | <Robin_Watts> k++ at the end of the loop. | 16:31.44 |
ator | ah, that was skipped by the continues | 16:32.05 |
artifexirc-bot | <Robin_Watts> The only time k wouldn't have ++'d was if we continued, yes. | 16:32.13 |
| <Robin_Watts> and I strongly suspect we never tested that case. | 16:32.25 |
ator | and now you map them to -1 instead of skipping | 16:32.52 |
artifexirc-bot | <Robin_Watts> yes. | 16:33.08 |
ator | I think that's an improvement, yes | 16:34.39 |
| LGTM | 16:34.41 |
| the old one looks wrong to me | 16:35.01 |
| if there ever were any skips | 16:35.15 |
artifexirc-bot | <Robin_Watts> Yes, that was my thought. Thanks. | 16:35.32 |
malc_ | "there ever were" is a bloody torture to wade through | 16:36.05 |
ator | grammar, it's there to be abused. | 16:36.55 |
artifexirc-bot | <Robin_Watts> ass. | 16:38.35 |
ator | source/fitz/crypt-aes.c:210:15: warning: incompatible pointer types assigning to 'uint32_t *' (aka 'unsigned int *') from 'unsigned long [68]' ? | 16:39.23 |
| forgot to change the struct | 16:39.54 |
| I should have caught that, sorry | 16:40.11 |
artifexirc-bot | <Robin_Watts> the fact that I looked on the web at the results too soon and pushed ๐ | 16:40.17 |
| <Robin_Watts> I've pulled them out and will fix/retest etc. | 16:40.32 |
| <Robin_Watts> @ator Version on robin/master (fixing the struct too) solves the issues. | 17:00.07 |
artifexirc-bot | <Robin_Watts> pops to post office. | 17:00.45 |
ator | @Robin_Watts that builds cleanly for me. push away! | 17:01.08 |
malc_ | ator: i have this unwanted but vivid image of you bending over Robin and urging him to - push | 17:03.22 |
ator | https://en.wikipedia.org/wiki/%C3%84ttestupa let's not go there | 17:04.43 |
malc_ | ator: i have fontconfig set up so that linux libertine is mapped to symbol font, the thing it does to ร is priceless (https://www.boblycat.org/~malc/scratch/%c3%84.png) | 17:08.57 |
malc_ | oh blimey - i even correctly guessed what senicide means | 17:10.30 |
artifexirc-bot | <Robin_Watts> Killing of the senile? I'm in trouble... | 17:15.41 |
malc_ | Robin_Watts: not really since it's SELF klling of the senile | 17:16.41 |
artifexirc-bot | <ator> Nah, you're supposed to push them off. Not like they'd jump willingly! | 17:18.12 |
malc_ | bloody barbars those swedes.. | 17:21.43 |
| once, again, no wonder my people turned out the way we are | 17:22.24 |
| ator: https://www.youtube.com/watch?v=DwD7f5ZWhAk made me chuckle on one mouth and cringe on the other... the pronunciation is not really great, right? | 18:05.12 |
artifexirc-bot | <Robin_Watts> 3 more on robin/master | 18:47.36 |
| <Robin_Watts> @ator Make that 4. That's all the coverity stuff run through. | 18:59.56 |
| <Robin_Watts> I'm going to fit the new HD etc now. | 19:00.10 |
| <Fred> Good luck. We're all counting on you. | 19:01.19 |
| <Robin_Watts> New drive in. Still waiting for the other one to be delivered so I can look into trying to resurrect the old one. | 19:31.10 |
| <Robin_Watts> Interestingly, I looked at drive recovery places, and there is a huge one in Novato ๐ | 19:31.35 |
| <Fred> DriveSavers, yes. They've been there forever. | 21:13.12 |
MP64 | Hello, is there a way to obtain a javaviewerlib.dll (from mupdf\platform\win32\DebugJava) as 64-bit-version? | 23:17.54 |
| The https://mupdf.com/release_history.html says that the java sample was added this year. Current JDKs come only in 64 bit. | 23:21.05 |
| So I assumed that I can get it to run with today's JDKs. That is 11 and up for me. | 23:22.05 |
sh4rm4^bnc | isn't java a yesterday thing anyways | 23:22.56 |
MP64 | I tried switching the Visual Studio project to 64 bit, but that fails with lots of compiler errors. | 23:23.12 |
| Hi sh4rm4^bnc, | 23:23.27 |
sh4rm4^bnc | ohai | 23:23.48 |
MP64 | For me java is fine. | 23:25.04 |
| There seems to have been one reason why a java sample was added this year. | 23:25.54 |
sh4rm4^bnc | ah. | 23:27.17 |
| <<<Back 1 day (to 2020/11/17) | Forward 1 day (to 2020/11/19)>>> | |