Log of #mupdf at irc.freenode.net.

Search:
 <<<Back 1 day (to 2018/03/19)20180320 
enometh in pdf/pdf-xref.c the default handler should still be the pdf handler, so pdf files without a .pdf extension (or any extension) can be opened at all04:08.33 
  the best app was w3m which let you specify it: w3m -T application/pdf04:09.23 
  i think the old `pdf_recognize' should be reinstated as the recognizer for pdf_document_handler, and the recognizer mechanism should NOT be deleted as "unsued"04:10.25 
  (it's still there, )04:11.25 
sebras tor8 (for the logs): 10 lines of patches in the bottom two patches on sebras/master.04:53.22 
physkets Hi!09:22.13 
  Are animations in PDFs supported?09:22.29 
kens I believe the answer is 'no'09:23.01 
  If you mean does MuPDF run movies09:23.58 
physkets kens: not movies... I mean JavaScript based animations09:25.00 
kens Are we talking about pure Java or PDF here ?09:25.24 
physkets I'm making a pdf through latex, using its 'animate' package:09:25.38 
  http://ctan.imsc.res.in/macros/latex/contrib/animate/animate.pdf09:25.47 
kens OK so PDF09:25.51 
physkets yep09:25.56 
kens I know nothing about the animate package, what kind of annotation deos it embed ?09:26.16 
physkets In that pdf, on page 17 in an animation of the sort I am describing.09:26.17 
  I'm not too sure...09:26.39 
kens I suspect that is etiher a Media Clip or a movie annotation09:26.54 
physkets https://github.com/agrahn/animate09:27.06 
kens Yeah no offence, but I'm not going to waede through reams of someone else's code....09:27.32 
  If you can make a simple one page file with nothing else on it I'll take a look09:27.56 
  However, I suspect the answer is still 'no'09:28.04 
physkets https://www.ctan.org/tex-archive/macros/latex/contrib/animate/09:28.23 
kens Because both media clips and movie annotations require external viewers09:28.23 
  Yeah that's still a 17 paghhe file with lots of stuff in it, not a simple one page file09:28.58 
physkets In the first link, look at page 1709:29.27 
kens Seriously, the only way I can tell how the animation is embedded is by opening up the PDF file, decompressing it and reading it09:30.15 
physkets The last link above is a description of the macro09:30.17 
kens This is a 3.6MB compressed file09:30.23 
physkets oh!09:30.24 
  okay09:30.26 
  I'll make one09:30.30 
kens That will hel pa lot thanks09:31.00 
sebras-mobile kens: this package seems to be for animating graphs, but it doesn't explain how it is realized in the file. The ui-buttons are obviously javascript though.09:41.04 
kens sebras : I can look at an example file but a 17-page file is too much for me :-)09:41.30 
  Doe MuPDF support rendering to the c anvas from JS ?09:42.06 
  The buttons appear to be standard PDF buttons09:45.01 
sebras-mobile kens: I think it will, when we implement the widgets with javascript running the event handling. But right now I'm not sure how much of this works at all.09:45.06 
kens Umm, one for tor8 then09:45.27 
  The buttons are all Widget annotations though, not JS09:45.51 
sebras-mobile kens: my guess is that this is all implemented in javascript. I don't expect them to render it as a movie clip.09:46.11 
  But they might depend on javascript objects we haven't implemented yet.09:46.35 
kens There's a Screen annotation09:46.44 
  With 4 JavaScritp objects09:46.50 
  Well, 2 twice09:46.59 
  OK the animation appears to be a Widget annotation09:47.43 
  Looks like its a self-rendered button09:48.30 
  Presumably the JS renders it09:48.37 
sebras-mobile The buttons show up in mupdf on Android. But there is no animation.09:49.14 
kens % /JS (app.focusRect=false;try{if\(a2_playing\){a2_pause\(\);}}catch\(e\){})09:49.16 
  So the answwer is no, as I suspected09:50.05 
sebras-mobile kens: mmm, it is that app.focusRect that I'm worried about. I don't think we've implemented that.09:50.06 
kens GS renders the appearance, which is fair enough09:50.31 
physkets kens: https://send.firefox.com/download/78dab04a93/#DEz-u0Ce7GdWB8FCDGPeDA10:14.46 
  ^this is supposed to be an animation over two pages,10:15.01 
  but it only displays one10:15.06 
kens There's only one page there10:16.02 
  Two graphs though10:16.16 
  You shoudl probably read the discussion with me and sebras above10:16.30 
  This appears to be a 'ahem' clever reuse of AcroForms and the use of Java to drw a Button.10:17.13 
  The appearance of the button that is.10:17.22 
  Looks to me like the JS repeatedly redraws the button, leading to an animation10:17.46 
physkets When I open it in Oular, it does ask me if I want to see the Forms in the document10:18.28 
kens Yep10:18.34 
  Its not what Forms are intended for10:18.42 
physkets although, after that, even if I say yes, it just gives me a grey block10:18.46 
kens Not surprised10:18.53 
  Someone is being too clever by half, frankly10:19.09 
physkets okular doesn't do Js yet10:19.10 
kens I'd suggest very few viewers will display this as expected10:19.23 
physkets But why, exactly?10:19.36 
  Becasue it does non-standard stuff?10:19.48 
kens That's not how you are supposed to do media in PDF :-)10:19.49 
  AcroForms are supposed to be forms10:19.59 
  You can draw a custom button, and there's the ability to use JS for that.10:20.12 
  But you are also supposed to supply an Appearance for the benefit of those viewers that don't do JS10:20.28 
physkets OKay, so is it that mupdf does not implement AcroForms?10:20.34 
kens In fairness, this file does that10:20.36 
  physkets : no, it doesn't implement the bit of JS that's being used10:20.51 
  To allow you to draw on the button10:21.09 
  Like I said, you aren't really supposed to do animations like this10:21.20 
physkets okay, and is that as intended, or a bug?10:21.30 
  I mean that fact that it does not implement that bit of Js10:21.48 
kens What, the fact that MuPDF doesn't support that currently ? Well its not a bug, we know it doesn't.10:21.53 
  Or more accurately the MuPDF developers (which is not me) know it doesn't10:22.10 
physkets Oh, by bug, I mean lack of the feature10:22.13 
kens I've no idea if there's any intention to do so10:22.19 
physkets ah, okay10:22.24 
  I really would've liked to be able to create animations without making .mp4 s10:23.28 
  But I guess I'll have to do that now10:23.41 
kens Well that's the 'correct' way to do animations in PDF10:24.03 
  Though I don't know if MuPDF supports that either10:24.13 
physkets ah, :(10:24.44 
  Well, I don't know about correct, but the 'animate' package al;lows you to do lots of simple things like have the animation run in a 'loop', and also in a 'palindrome', where it goes back and forth across the inages.10:25.56 
  These are a little difficult to do when creating movies10:26.10 
kens Yes, but its resuing features intended fro one purpose for a totally different purpose.10:26.25 
physkets So begin able to use this would be reall nice10:26.31 
  Is that such a bad thing?10:26.41 
kens Well yes.10:26.46 
physkets ok :(10:27.07 
kens Because it opens you to the possibility of security problems, plus if you take advantage of it, and the package later restricts it, you are lost.10:27.15 
  Its like using alcohol to fuel your car, it may work, but its probably going to break emissions standards, and may blow up the engine10:27.48 
kens can't think of a better analogy offhand10:28.14 
tor8 mupdf doesn't support any form of animation at the moment, neither by using the Movie widget, nor by abusing javascript to animate stuff.10:30.22 
  our javascript support is very limited, there are many functions that just aren't implemented. you have to keep in mind the JS support was driven by form validation, and doesn't do much if you step outside of that comfort zone10:30.52 
  and that work was done several years ago and hasn't seen any work done on it since then10:31.08 
  velix: no, the exe files are built by the makefile and then run to generate code for the next step of the build.10:32.50 
  they are not linux binaries, unless you're trying to cross compile or something. they need to be built and able to run by the host compiler.10:33.09 
malc_ tor8: was watching Lucas de Grot lecture, there, in passing, he mentions hinting, apparently he used it in calibri to achieve something otherwise impossible with standard curves and stuff... i guess the hinting is not all b/w there are uses for it apart from grit fitting10:34.18 
tor8 the vista fonts were hinted specifically for use with cleartype10:34.50 
  the calibri, consolas, the set of fonts that start with c that were introduced with windows vista10:35.18 
physkets okay, thanks for your time, kens Bye!10:36.39 
kens NP10:36.44 
malc_ tor8: yes sure, but from his words it seems that hinting is _essential_ to achieve the designers vision, regardless of the output medium10:38.11 
tor8 malc_: huh. could be.10:38.36 
  malc_: have you seen what the DynaLab chinese fonts do with truetype hinting?10:38.48 
kens But that's always true, regardless of the technology10:38.52 
  for example counter control hints in PostScript fonts10:39.02 
malc_ tor8: heard horror stories.. :) we should ask our han friend here - sebras10:39.30 
kens Dynalab fonts are a horror10:39.46 
  But they are not alone10:39.50 
  We've seen many fonts that do not render properly (or in some cases, at all) wihtout implementing TT hints.10:40.12 
  'hinting' is really a misnomer in TrueType10:40.21 
malc_ kens: what would be a "nomer"?10:40.39 
kens minsomer = mis named10:40.53 
  Hinting in TrueType is really a programmatic way of deforming the glyph outlines10:41.29 
  You might call it deformations10:42.02 
  Or just 'weirdness'10:42.28 
malc_ kens, tor8: https://www.youtube.com/watch?v=pWNwjNRd0tE&t=195010:49.32 
kens Different stem widths is hinting, that;s reasonable10:50.45 
  I'm not sure I agree the delta hints improve the rendered character personally10:52.00 
  But anti-aliasing is always going to be a problem.10:52.23 
malc_ all type should be fraktur anyhow10:52.23 
kens He should use a bigger size, or a screen with more pixels, then he wouldn't have a problem10:53.04 
malc_ that's what she said10:53.43 
  https://www.youtube.com/watch?v=pWNwjNRd0tE&t=2924 == https://xkcd.com/1015/10:57.40 
kens is getting bored wiht the Russian jokes....10:57.45 
  TYor liked that xkcd as I recall10:58.11 
malc_ kens: russian jokes = jokes involving russia/russians or jokes told/mediated by russians, if the latter, appologies...11:00.00 
kens Too many jokes, not enough content in the lecture11:00.22 
kens went back to work11:00.34 
malc_ ah11:01.08 
  tor8: mupdf's html renderer unconditionally uses ligatures (at least fi) (if present) even in <pre> blocks [alignment is thus gone]12:32.24 
tor8 sebras: do you think we hsould throw an error instead in mutool create if the %%Font and %%Image directives are missing arguments?13:12.25 
vtorri tor8 have you seen my latest error with msys2 ?15:29.04 
sebras tor8: fixed, now I throw instead. this results in an uncaught exception, but that is in line with how the tools normally work.16:03.29 
tor8 sebras: yes. at least it will exit with a failure error code than fail mysteriously now.16:33.10 
sebras tor8: ok.16:38.05 
Tamir_Evan vtorri: To resolve that, ' $(PKCS7_LIB)' needs to be added to the end of $(MUVIEW_WIN32_EXE)'s rule, in the Makefile (currently line 421), similar to how it was done for $(MUVIEW_X11_EXE)'s rule (on line 397), probably.17:14.53 
vtorri Tamir_Evan but the error mentions that it's an x11 app that is built, and not a windows one17:16.22 
Tamir_Evan vtorri: From what you showed yesterday the error was happened to a file in the x11 subdirectory, where both the (old) x11 and win32 viewers code reside. Is there more to the error that you gave yesterday?17:20.56 
fredross-perry currently gtting a build error with master code:17:41.19 
  platform/gl/gl-main.c:1677:16: error: use of undeclared identifier 'GLUT_ACTION_ON_WINDOW_CLOSE'17:41.21 
velix tor8: I thought, mutools are a linux project and EXE is crosscompiled :D17:51.04 
  Can I make mupdf to view the object number?17:51.14 
sebras velix: mutool can show object numbers, but mupdf does not.17:51.43 
velix sebras: The problems is: I don't know where my target xobj is located ;)17:52.02 
  It would be nice to have such a feature.17:52.09 
sebras velix: well, what I usually do is mutool my-doc.pdf t to see the trailer, then walk to the Root object mutool mu-doc.pdf t 42 or if is 42, then to the Pages object, then the Kids array, then the desired Page object, and finally the Contents array which contains graphical operators that utilize the Resource dictionary in the Page object.17:54.40 
  velix: if the page is complicated the last step might require quite a bit of searching.17:55.08 
  but sometimes you can glean some hints from the XObjects themselves present in the Resource dictionary.17:55.33 
velix sebras: yeah okay.17:56.25 
  I just checked Acrobat. It also doesn't show the ID ;D17:56.41 
  Does mutool -z also touch images? I don't want to recompress images ;)18:06.49 
  Mutools seems to recompress my PDF and destroys the images. Interesting problem.18:42.43 
fredross-perry Ah. If I use HAVE_GLUT=no, the problem is gone.19:26.12 
vtorri it goes further19:31.01 
  next error : thirdparty/freeglut/src/fg_init.c:370:22: error: 'WidthValue' undeclared (first use in this function); did you mean 'GetGValue'?19:31.07 
  and other similar errors19:31.19 
 Forward 1 day (to 2018/03/21)>>> 
ghostscript.com #ghostscript
Search: