Log of #mupdf at irc.freenode.net.

Search:
 <<<Back 1 day (to 2020/12/15)Fwd 1 day (to 2020/12/17)>>>20201216 
hyegeek In order to parse a PDF file, I used mutool trace to create an xml dump of the pdf and then wrote a python program to parse the xml.14:19.37 
  While that worked, it seems like I should have been able to do that in javascript using mutool run. However, I have been unable to find sufficient documentation on the javascript api.14:19.42 
  Can someone point me to good/complete api docs for mutool and javascript. If not, does someone have a more complete example of using the api than what comes with the source. A javascript implementation of mutool trace would certainly be complete enough to use to fi gure things out.14:19.47 
sebras hyegeek: there are a number of javascript samples under docs/examples in the git16:30.09 
  and here is the documentation we have https://mupdf.com/docs/manual-mutool-run.html16:30.37 
  unfortunately I don't have any more examples or better documentation at the moment.16:30.58 
hyegeek sebras, thanks. I've been looking at the examples and those docs. What I can't seem to find is anything that tells me what the various objects look like. Trying to dump an object (using javascript examples from the web) just shows empty objects even though I can query them and they do things I expect.16:32.18 
  What would be helpful is the javascript object definitions so I can see what's there and play around with using the interactive mode.16:32.58 
sebras besides the docs above you only have the source code at the moment.16:34.37 
  in the souce you can find the definitions of the objects around this location: http://git.ghostscript.com/?p=mupdf.git;a=blob;f=source/tools/murun.c;h=1f7c005e1745fb6117fa69619cc4b9df7a229109;hb=HEAD#l648516:35.40 
  hyegeek: sorry I can't provide you with a more complete doc of what properties and functions exist for each object.16:36.24 
  hyegeek: the mutool run documentation is something we're aiming to improve, but it's not finished yet.16:36.56 
hyegeek sebras, thanks anyway. It looks like the trace-device.js example will at least get me part way there. If I can figure out how to dump more object details, it would be enough.16:37.59 
sebras hyegeek: try that and see how far you get. if you have specific questions later on I'll try to help out, but I don't know about all the details of the javascript interface myself. :)16:41.30 
hyegeek sebras, thanks16:41.48 
sebras most (all?) mupdf devs are on holiday until early january, so you might have to be quite patient if I don't have good answers. :)16:42.04 
malc_ and sebras here had to travel beyond seven seas to avid those holidays, real coders do not need them anyhow16:47.50 
 <<<Back 1 day (to 2020/12/15)Forward 1 day (to 2020/12/17)>>> 
ghostscript.com #ghostscript
Search: