Log of #mupdf at irc.freenode.net.

Search:
 <<<Back 1 day (to 2018/11/19)20181120 
jogux I’m trying to narrow down if a bug is in smartoffice or mupdf… is anyone able to try adding a text comment/note/annotation to this file with mupdf, saving, opening and tell me if the contents of the comment is preserved please? https://bugs.ghostscript.com/attachment.cgi?id=1627914:41.01 
pink_mist sebras: ping, it's now long past monday :P14:45.28 
tor8 jogux: https://ghostscript.com/~tor/stuff/after%20step%202.pdf16:39.03 
  jogux: that's opened in mupdf-gl, added two annotations and did a plain "save as" with no options set (so a full save, not an incremental one)16:39.23 
  https://ghostscript.com/~tor/stuff/after_step_3.pdf with an incremental save16:41.12 
  seems to work fine in both cases16:41.32 
jogux thanks tor8 - let me just check those (sorry, balancing multiple things)16:58.12 
  so when I open the note in both of those, the note appears empty in macos preview17:00.37 
kens Want me to check Acrobat ?17:01.00 
jogux tor8: also when I open them back in muso they’re also empty.17:01.37 
tor8 jogux: odd. it appears fine in acroread and evince (poppler)17:01.42 
  both show a note, author "tor" with content "This is a text note."17:02.08 
kens also in ff in pdf.js17:02.23 
jogux whereas the existing comment that is in that document shows fine with the contents “note 1 from mac preview”.17:02.23 
kens ah I was looking at the wrong note :-)17:02.42 
jogux ahem. having said that, it’s showing with a timestamp of 1 Jan 1970.17:02.44 
  tor8: did you try loading those pdfs back into mupdf?17:03.26 
tor8 weird. I've set the date to /M (D:20181120163654Z)17:03.28 
kens the popups are closed in Acrobat, so I have to hover the mouse over them. The original note has gone.17:03.44 
tor8 yes, they load with contents set.17:03.58 
kens That''s 'step 2'17:04.04 
jogux kens: can you expand on “original note has gone”?17:04.11 
tor8 and looking at the file structure, the annotation objects look okay too17:04.15 
kens The one that says 'note 1 from Mac preview' is not presennt in 'step 2' when I open it with Acrobat17:04.43 
  The two tor added are tehre, but 'closed'17:04.51 
  SO a mouseover is needed17:04.57 
jogux kens: thanks. so that “not present” part sounds like a bug at least.17:05.28 
kens I see very different behaviour with pdf.js and Acrobat17:05.48 
  Its not obvious which is correct17:05.55 
tor8 acroread 9 on linux behaves the same on all three versions with the old annotations (that's the original file, fully saved, and incrementally saved)17:06.27 
kens I'm just grabbing the original and step 317:06.56 
jogux here’s what I see in muso:17:07.34 
  https://cl.ly/f5a29894149917:07.35 
  have there been any fixes in this area lately?17:08.03 
tor8 nothing that would explain the annotations disappearing completely17:09.01 
kens No, acrobat is in fact showing all of them, it was a glitch in pdf.js17:09.30 
tor8 jogux: the annotation added in "after step 2" has text in korean17:10.28 
kens So I see the closed popups (yellow squares) on step 1, 2 of them, bot minimac, "note 1 from macpreview" and note 217:11.02 
  same on step 2 and 317:11.12 
tor8 the note icon looks rather different from what current mupdf produces as its appearance stream though17:11.18 
jogux e2f757a5c78fce69faeeacb0850b886374c63b5f is I think the mupdf sha we’re currently using on ios/macos.17:11.28 
tor8 so there could be a *lot* of fixes you don't have if you're using a year old mupdf?17:11.28 
kens step 2 and 3 have a different icon, but haev tor's annotation17:11.41 
  sstep 2 has a freetext annotation, step 3 doesn't17:12.26 
jogux tor8: I think we’re up to date as of 28 Aug 2018, so not too far out of date.17:13.40 
kens GS renders all of them the same as Acrobat17:14.16 
jogux I’m very puzzled. when we open that document pdf_annot_contents() is returning an empty string for the third annotation.17:28.54 
  and it seems STRING(obj)->len is 0.17:45.03 
tor8 jogux: how recent is the libmupdf?18:25.01 
jogux it’s from sha e2f757a5c78fce69faeeacb0850b886374c63b5f18:25.23 
  I just rebuilt with master and I see the same problem.18:25.44 
tor8 jogux: yeah, with that sha1 it's not saving properly for me as well18:26.15 
  sorry, user error.18:26.29 
  I opened the original file not the one I saved...18:26.38 
jogux I’m just trying to open the full save one you posted further up.18:26.55 
tor8 yeah, pdf_annot_contents hasn't changed since then18:27.32 
  it's doing the automatic conversion to UTF-818:27.46 
  which I added not too long ago18:27.51 
jogux yeah. pdf_new_utf8_from_pdf_string is getting called with a zero length string for the annotation you added.18:30.40 
  (lldb) p *(pdf_obj_string *)obj18:34.21 
  (pdf_obj_string) $3 = {18:34.22 
  super = (refs = 1, kind = 's', flags = '\0')18:34.23 
  text = 0x0000000000000000 <no value available>18:34.25 
  len = 018:34.26 
  buf = {18:34.28 
  [0] = '\0'18:34.29 
  }18:34.30 
  }18:34.31 
  I don’t understand this at all. The logical explanations right now seem to be either I’m doing something stupid or mupdf itself is broken on macos.18:35.08 
  can mutool dump out annotations as text?18:35.43 
tor8 try 'mutool show document.pdf pages/1/Annots/*/Contents'18:49.31 
  that should show if it can at least parse the file contents properly18:49.50 
  yeah, we should never create a pdf_obj with that type of content18:51.11 
jogux damn. I think something has overwritten the file I was testing with at some point.18:51.35 
  now both your files (freshly downloaded) work in both the builds I have.18:54.32 
  gah. macos preview is I think “fixing” the files when I open them.18:54.56 
  so that explains that :(18:55.01 
  however macos preview still can’t view the annotation mupdf added.18:55.14 
tor8 yeah. macos preview has a nasty habit of clobbering and writing all over PDF files even when you don't ever say "save"18:55.24 
  jogux: weird. it's got an appearance stream...18:55.47 
  maybe there's a bit flag or something it respects that every other viewer ignores?18:56.00 
  or is it getting hung up on the absence of a linked Popup annotation?18:56.22 
jogux I don’t know. the text content is empty when I open the note, and the icon is wrong.18:56.48 
tor8 the icon is supposed to be the "three bars" note icen18:57.03 
  icon*18:57.06 
jogux preview is showing a blank white square18:57.22 
tor8 empty text content is strange18:57.25 
  huh. even stranger.18:57.30 
  a blank white square where the icon is?18:57.48 
jogux yep - https://cl.ly/55156b67180618:58.47 
  is the file after preview fixed it any use to you?18:59.19 
  what’s weird is that in other files (or even in this file, if macos preview hasn’t already been used to add two annotations) mupdf annotations display fine in preview, as I understand it.19:00.15 
  (sorry, need to head and catch my train home now - thanks for your help!)19:00.31 
tor8 jogux: (for the logs) the file preview has "fixed" might help me track down what it's doing19:30.36 
 Forward 1 day (to 2018/11/21)>>> 
ghostscript.com #ghostscript
Search: