Log of #mupdf at irc.freenode.net.

Search:
 <<<Back 1 day (to 2017/09/28)20170929 
Ionic tor8: is it intentional that mutool draw does not output anything to stdout unless given -o - explicitly? reading the source code (both for my currently installed version 0.11 and current git HEAD), I see that it should indeed default to outputting to stdout - but it's not. instead, mutool draw foo.pdf is just a sophisticated way to burn CPU cycles.00:01.09 
  that should have been 1.11 naturally00:03.11 
DomiX hi, I'm searching a tool to delete a page from a pdf but I do not find the command11:51.13 
tor8 DomiX: you can use mutool clean. if you want to delete page 5: "mutool clean input.pdf output.pdf 1-4,6-N"12:26.55 
Robin_Watts tor8: 'N' ?13:20.00 
kens Where N is the last required page I would guess13:20.18 
Robin_Watts just 6- will do, I think.13:20.25 
kens If you want all the remaining pages maybe, but not if you want to stop before the end I would imagine13:20.45 
Robin_Watts kens: yeah, but the original question was to just remove page 5. Not important really, just that he might come back in 5 mins and say "hey, it didn't work..." :)13:23.30 
kens Well, he might, but I doubt it. As I commented over in #artifex13:24.08 
Robin_Watts kens: mmm.13:24.41 
tor8 no, literal N to mean the last page in the document13:32.59 
kens Hmm, that's different to the GS implementation then, I coded it so - with no trailer means 'to the end'13:33.38 
tor8 not sure if the parser handles 6- but I know it does cope with 6-N13:33.42 
kens Fair enough, GS definitiely won't understand N13:34.03 
tor8 that way you can reverse pages with "N-1" for example13:34.13 
kens AH, I'm not sure I considered reversing pages13:34.38 
  I did implement even and odd13:34.45 
Ionic tor8: did you see my message?13:40.51 
tor8 Ionic: questions about command line options to mudraw are better addressed to Robin_Watts13:53.27 
Ionic either one is fine :)13:53.42 
  I just feel that this is more of a bug than an intended feature13:53.56 
tor8 the default for mudraw is indeed to burn cycles13:53.59 
  we use it like that to burn cycles and then count them with the -s flag13:54.22 
  or -s5 to do a bitmap checksum when doing regression testing, etc.13:54.49 
  if you don't need the fine grained control over banded rendering that mutool draw gives you, mutool convert has an easier and more consistent command line13:55.40 
  but I don't think mutool convert writes to stdout at all13:56.06 
Ionic that's weird, because from http://git.ghostscript.com/?p=mupdf.git;a=blob;f=source/tools/mudraw.c;h=2ec4eaa5ee06c584c55d8cd5b55f875fade4f0e1;hb=HEAD#l1732 I gathered that the default should be output to stdout13:56.57 
  maybe I haven't analyzed it deeply enough though13:57.46 
tor8 the code is more convoluted than that...13:58.00 
  if you use the pdfwrite device with mutool draw and don't give a file name it will write to "out.pdf"13:58.24 
Ionic I've seen that OUT_PDF is handled differently, yeah13:59.02 
tor8 and text output will print to stdout13:59.27 
  but png output will not print to stdout13:59.33 
Ionic and some others13:59.44 
tor8 bitmap output will not print to stdout would be a more accurate statement14:00.00 
Ionic okay, so it sounds like that's really intentional, even if the main function is a bit misleading in that case14:01.00 
tor8 yes. it's a tool that has grown organically and sported a fair number of mutations and tumors along the way :)14:01.28 
Ionic ah yeah, bitmap functions check for if (output) and only write data out if that's actually non-NULL14:02.06 
tor8 I think it's so you don't accidentally destroy your terminal by dumping lots of binary data to it14:02.27 
Ionic via the bander14:02.30 
  well, a lot of bitmap tools (for instance netpbm) write to stdout by default14:02.56 
Robin_Watts -o - *should* dump to the console, but that has problems on windows with binary stuff.14:02.57 
Ionic Robin_Watts: yeah, that's working correctly - I was just thrown off that not providing -o at all doesn't write out any data with bitmap output14:04.41 
  even though the mudraw main function initializes the internal out variable to stdout in such a case - but bitmap output actually only outputs data if -o was explicitly provided14:05.42 
 Forward 1 day (to 2017/09/30)>>> 
ghostscript.com #ghostscript
Search: