Log of #mupdf at irc.freenode.net.

Search:
 <<<Back 1 day (to 2020/05/11)Fwd 1 day (to 2020/05/13)>>>20200512 
ator sebras: "Move covenience[sic] functions for parsing/creating PDF dates." has a typo in the commit message :)08:58.53 
  sebras: pdf_new_date (formerly pdf_format_date) sets the string to "" if strftime fails. maybe we should have the same fallback string as when gmtime fails?09:00.06 
  "Make sure date parser does not read past end." calls strlen twice in pdf_to_date09:00.30 
  -if (s[0] == 'D' && s[1] == ':')09:01.20 
  +if (e - s >= 2 && s[0] == 'D' && s[1] == ':')09:01.20 
  are equivalent, given a zero-terminated string09:01.20 
  I don't think that commit actually does anything useful, or am I missing something here?09:01.59 
  what's your source for tm_year handling?09:03.43 
Kabouik Hello #mupdf. I am trying to copy text from a PDF file, if I remember correctly it should be with right click to draw a box, but somehow it doesn't work anymore in my installation of mupdf-gl. No box is drawn, the text is just highlighted, but it will be unselected immediately when I release the right click and nothing is copied to clipboard (even when hitting ctrl+c while the text is highlighted)12:31.33 
ator Kabouik: do you have mupdf built from source or installed from your distro?12:50.07 
  if the latter, blame the distro maintainers for not building with the shipped thirdparty library that adds clipboard support to freeglut.12:50.27 
  they usually (following their strict guidelines of always building with system packages) link with a version of freeglut that does not support system copy&paste12:51.39 
Kabouik It's installed from repos I think, I'm using Solus12:52.23 
  Sad thing, they usually are not very keen on adding custom stuff and it's hard to convince them, but I know it would be best12:52.47 
ator I'm afraid you're going to have to build from source to get copy&paste functionality back then.12:52.48 
Kabouik At least I know where the issue is now, thanks12:53.02 
ator the good news is, once you've built it, mupdf-gl is a standalone binary you can just drop into your path. no other dependencies required.12:53.09 
Kabouik I'll still open a task on their tracket to mention the issue, hopefully they will add the dependency12:53.23 
  The bad news is built softwares are always harder to keep up to date12:53.53 
ator I've tried getting my clipboard patch upstream to the FreeGLUT folks, but it's proving difficult to get them to do anything about it.12:53.57 
Kabouik I'm looking forward to using the fill-form feature that is said to be coming soon to desktop mupdf for instance12:54.11 
  (Working around it using free text annotations at the moment)12:55.03 
ator it's here already! maybe not the easiest to use always, with a dialog popping up to fill in forms, etc.12:55.07 
Kabouik Oh, well then maybe the mupdf version in my repos is not the latest. In which version was it added?12:55.39 
ator Kabouik: download the source archive from here https://mupdf.com/downloads/12:55.44 
  1.14 or 1.15 I think12:55.55 
  we just released 1.1712:56.00 
Kabouik Ok, I have 1.16.1 from repos it seems12:56.16 
ator then you should be able to fill out forms with mupdf-gl12:56.32 
Kabouik So it should be here, I may just be missing how form filling works (cliking on fields does not show any popup)12:56.39 
ator (even though clipboard access missing is a bummer)12:56.50 
Kabouik Yeah12:56.56 
  Weirdly I seem to recall clipboard did work before, but maybe they updated mupdf without the dependencies later. Or maybe I just dreamt that it was once working12:57.25 
ator Kabouik: there are two PDF form types. the original AcroForm that was added way back in the mists of time, which we support now.12:57.46 
  and a relatively new format called XFA which is basically just an abomination of XML, completely separate format, wrapped up in a PDF container12:58.15 
  we don't support XFA forms12:58.19 
  given that it's an underspecified XML mess12:58.27 
Kabouik I supose XFA is the format that works in almost no Linux native applications, right? I remember I always have to keep an old binary of Master PDF Editor to open those12:58.52 
ator which has nothing to do with PDF, at most the PDF being a flattened static drawing of what the form is supposed to look like12:59.00 
  yeah. I think only Adobe's software is capable of XFA12:59.18 
Kabouik The sad thing is most people using PDF forms use XFA. I guess it's some kind of default in Acrobat and nobody making forms actually knows anything about form formats or compatibility, so they use what they are offered12:59.59 
ator Kabouik: mupdf-x11 has clipboard support, but does not have form filling or annotation editing features.13:00.04 
  yeah. it's a constant issue with forms in PDF these days.13:00.24 
Kabouik Master PDF Editor can read XFA I think, maybe even fill fields13:00.28 
kens Note that XFA forms are deprecated in PDF 2.013:01.19 
Kabouik Oh right, then that was why I had clipboard before ator. I used to use mupdf-x11 over the last months because it allowed me to hide the title bar (I was the one asking for that a couple weeks ago), turned out I could hide mupddf-gl title bar using i3 settings too so I switched to it. And lost clipboard at the same time probably13:02.01 
ator Kabouik: I'd be happy to walk you through building mupdf from source. building mupdf should be trivial if you have the required system packages installed.13:03.05 
Kabouik So mupdf-gl can open the form I'm reading now, meaning it's AcroForm. Still no pop-up when I click on a field.13:03.28 
ator Kabouik: is the PDF available on the internet?13:03.41 
Kabouik Or wait, maybe it just looks like a form but is a regular PDF. Let me check the info with i.13:03.43 
  It might not be an actual form: https://0x0.st/i_5M.png13:04.27 
  Yep it's here: https://www.skatteetaten.no/globalassets/skjema/alltid/rf-1402e.pdf13:04.39 
ator mutool show file.pdf Root/AcroForm should be telling, if you see an XFA entry and a blank Fields, that's the problem13:05.06 
Kabouik I am so surprised they didn't use Acrobat to create the PDF.13:05.13 
kens LOL QuarkXpress, thre's a blast from the past13:05.48 
ator that document is not a form in either AcroForm or XFA format. it's just a PDF of a form :)13:05.50 
kens is unsurprised13:06.04 
Kabouik Yep that's what I was thinking too13:06.12 
kens I wouldn't expect Quark to be able to make a fillable form of any type13:06.16 
Kabouik I guess I'm like the guy looking at a painting of a window and trying to open the window.13:06.56 
kens likes the analogy13:07.17 
  I may keep that one for people who want to know why they can't search for text in a PDF file which is just an image13:07.38 
Kabouik Speaking of, any OCR add-ons for mupdf?13:08.13 
kens LOLs13:08.25 
ator not yet. Robin_Watts has been experimenting with an OCR add-on for ghostscript though.13:08.37 
Kabouik Wait I think there are OCR standalones anyway13:08.43 
kens Tesseract will do the job for you13:08.58 
ator just render with mutool draw and feed the images through tesseract13:09.00 
Kabouik Thanks; I have no use for it right now but hey.13:09.54 
  To be honest I never really looked into mutool or even knew about it. I'm so happy to see it can merge files. Is convert the function to use to extract single pages?13:11.41 
ator no, convert regenerates a file from the graphics operators13:12.32 
  if you want to extract a specific page (or range of pages): mutool clean -g input.pdf output.pdf 113:13.20 
Kabouik Okay, nice. It was not obvious from mutool --help that clean would be the solution13:13.55 
ator you *can* use merge to extract pages too, just give it a subset of pages from the input file13:14.34 
  or rearrange their order, etc.13:14.44 
Kabouik Right, makes sense13:14.48 
  Interestingly, I don't see any -q options in the help of mutool clean13:15.09 
ator mutool clean rewrites the file, with possibly a subset of pages13:15.11 
  g as in garbage13:15.24 
Kabouik Damn it, I need to change my IRC font.13:15.38 
  https://0x0.st/i_5j.png13:16.32 
ator Kabouik: yeah, your IRC client is clipping the font rendering by a pixel at the bottom13:17.08 
  bump the line distance13:17.25 
Kabouik It seems annotations don't support dead keys, they just print the diacritics alone instead of combining them with the letter13:26.16 
  Like ` + a gives `a instead of à13:26.32 
  Here is not really the place to report bugs though, sorry13:26.48 
ator Kabouik: also an issue with the system provided freeglut, that's fixed if you build with our modified version.13:35.57 
  I'm starting to wonder if we should just error out on a compile error if building against a freeglut that's not our own....13:36.31 
Kabouik Interesting, I'll mention that too when filling a task at the Solus dev tracker13:36.42 
  Maybe just a warning?13:36.59 
kens ator, and wait for the howls of complaint from the package maintainers ?13:37.01 
ator kens: better than the howls of disappointed end users...?13:37.23 
kens I'm inclined to look at it that way personally13:37.41 
Kabouik Meet halfways, a warning so that maintainer know and choose to act or not13:37.51 
ator they've chosen to act, by modifying the build system to link against the system library.13:38.18 
  they did not choose wisely.13:38.28 
Kabouik But perhaps they just don't know the limitations of doing so, it's not obvious at first glance, unless you copy text or annotate13:38.49 
ator WARNING: Your version of MuPDF has been built WITHOUT support for clipboard access and WITHOUT unicode input! Please file a complaint with your friendly local distribution maintainer.13:41.01 
Kabouik Works for me. :>13:41.20 
kens As long as it says "Warning Will Robinson..."13:42.16 
ator kens: I never did get into lost in space.13:48.33 
kens It was on Satturday mornings when I was a kid13:48.55 
  Along with Flash Gordon13:49.03 
Kabouik Doss that sound right to you for my ticket?13:49.39 
  The MuPDF that was included in the repository was not built with the shipped third party library that is required for clipboard support and unicode in freeglut. The system freeglut package does not support system copy/paste or unicode, so these features are missing in our version of MuPDF in the Solus repository.13:49.39 
  MuPDF developpers have tried submitting their patch upstream to the freeglut folks, but it has proven difficult to get them to do anything about it. They are now considering adding a warning when building MuPDF if it is not built with the shipped library to make it clear that key features will be missing.13:49.39 
ator yes.13:50.11 
  Robin_Watts: sebras: three commits on tor/master for review13:50.28 
  The image redaction one has reworded the enum and ui string, and is otherwise unchanged.13:50.47 
Kabouik https://dev.getsol.us/T2156 posted the ticket here13:51.10 
  I know building from sources would solve the issue but regardless I think it'd be nice if it could be fixed for all other users of the repo version, and repo updates are a major convenience that I'd like to keep whenever possible13:52.09 
malc_ whack a mole - https://en.wikipedia.org/wiki/File:KB_English_Workman.svg - "error: wrong number of arguments to rotate(): 3"16:05.01 
sebras malc_: ator: I might have a fix for that on mupdf:sebras/master16:29.16 
  malc_: still, neither the enter arrow, nor the shift arrows, are being drawn correctly.16:29.52 
malc_ sebras: i noticed that you and then tor fixed the previous svg issue haven't noticed other relevant commits on your branch16:31.03 
paulgardiner There are two commits on my master branch, one that fixes the signature problem, the other fixing a potential crash when using our openssl pkcs7 support. A cluster run is ongoing.16:31.15 
sebras paulgardiner: "Fix possible crash when using openssl for digital signature support." fixes a problem I stumbled upon when trying to reproduce your problem.16:39.22 
  paulgardiner: but I never got around to looking at where the problem was last night.16:39.47 
  paulgardiner: that one is due to my refactoring. sorry about that.16:41.14 
  the other one seems to be mdp-related.16:41.21 
pedr0 hi all - I am using the javascript interface - I've an object which returns true when the isIndirect() is called upon it, however the code produces a TypeError when the function toIndirect() is called upon the same object.16:43.56 
  I get 'TypeError: undefined is not callable'16:44.27 
  oh - I am wrong the function to be called should have been 'asIndirect()'16:46.24 
  although I took that piece of code from an example, pdf-merge.js at line 816:46.48 
sebras paulgardiner: do you mind if I change "and further changes to the" -> "any further changes to the" in the first commit message?16:48.28 
  paulgardiner: "Fix possible crash when using openssl for digital signature support." LGTM.16:49.17 
pedr0 hi all - I am running into some difficulties when trying to read a stream using the JS API. Is there any example available somewhere ?18:56.49 
malc_ sebras: 0f9ecd1ce01313251ff80c74ecd23e57062faadb's comment ends with "assumed to be origo." typo?19:54.59 
sebras malc_: yes, it's swedish! :)19:56.31 
malc_ recalls certain chef :)19:57.02 
sebras malc_: but I think the code works better.19:57.46 
malc_ checking...19:58.13 
sebras malc_: apparently the rotate() is used for the tab key arrow pointing right.19:58.15 
malc_ sebras: works20:36.50 
sebras malc_: except the new issues. :)20:47.02 
malc_ sebras: it renders workman hence perfect :)20:47.25 
 <<<Back 1 day (to 2020/05/11)Forward 1 day (to 2020/05/13)>>> 
ghostscript.com #ghostscript
Search: