| <<<Back 1 day (to 2018/11/21) | 20181122 |
Tabaza | hello | 00:01.08 |
mubot | Welcome to #mupdf, the channel for MuPDF. If you have a question, please ask it, don't ask to ask it. Do be prepared to wait for a reply as devs will check the logs and reply when they come on line. | 00:01.08 |
sebras | Tabaza: hi. | 00:07.23 |
Tabaza | is it allowed to use mupdf on web and offer it to users? | 00:08.10 |
| if so, is there any PHP examples for all PDF tools? | 00:08.23 |
sebras | Tabaza: you need to explain a bit more about what you mean use on the web. | 00:08.35 |
| Tabaza: MuPDF is released under AGPLv3 and you need to follow that license. if you are not able to you may also pay for a commercial license that frees you from the requirements of AGPLv3. | 00:09.21 |
Tabaza | if you go to smallpdf.com, it offers all tools of PDF for free for users/visitors | 00:09.55 |
| i wanna make something similar to it | 00:10.02 |
sebras | Tabaza: aha. if you want to use | 00:10.28 |
| MuPDF to make a webservice then you would need to release your code under the same license, AGPLv3. that means that you allow anyone to download the source code of your service. | 00:11.38 |
| if you don't want to do that you would need a commercial license. | 00:11.59 |
Tabaza | how much it cost to obtain the commercial license? | 00:12.27 |
sebras | You can ask about the licensing fee over at https://artifex.com/contact-us/ | 00:14.14 |
Tabaza | thanks for your time and support | 00:14.32 |
sebras | (I'm just a developer, so I don't know the details of licensing for MuPDF) | 00:14.33 |
| Tabaza: if you get a commercial license you can also negotiate for support, i.e. that higher priority is put on bugs and questions you ask (compared to free users under AGPLv3). | 00:15.43 |
| Tabaza: sure, not problem at all. come back here if you have trouble contacting sales or have some other questions. :) | 00:16.05 |
Tabaza | i will also need a developer for backend processing | 00:16.26 |
sebras | Tabaza: I'm not sure what that means. it might be best to ask about that in the form on the webpage. | 00:17.26 |
| I see from smallpdf.com that they allow for conversion to/from powerpoint and excel. if this is something you also need, be sure to mention that when contacting sales. | 00:18.37 |
Tabaza | i did, and sent the form | 00:19.48 |
sebras | excellent. if you don't hear back, come back here and ask about it. the developers here are active during european and us business hours. | 00:22.24 |
tor8 | jogux: you around? | 10:48.45 |
jogux | yep | 10:48.50 |
tor8 | https://ghostscript.com/~tor/fuchsia-comment.pdf can you open and see what Preview does with that file? | 10:50.11 |
| I've spotted at least one problem with Preview (but unrelated to this) | 10:50.23 |
| it's writing text strings as UTF-16LE (little endian) | 10:50.30 |
| little endian is not mentioned in any PDF spec, the spec only supports big endian strings... | 10:50.44 |
| Apple is creating a white rounded rectangle with gray border appearance stream, but it's also writing out the /C color entry as yellow... | 10:51.32 |
| maybe it doesn't handle all icon types? | 10:51.40 |
| I changed the icon name to "Comment" rather than "Note" in the file I linked | 10:51.54 |
| see if that makes any difference | 10:52.00 |
| the two old Text annotations that were created by Preview don't have a /C set at all, but they do have an /IC interior color that seems to match the yellow | 10:54.52 |
| per spec, the IC property is not used for text annotations | 10:56.34 |
| and apple is adding a bunch of proprietary keys, /AAPL:AKExtras, /AAPL:Hash, etc | 10:57.56 |
jogux | that sounds joyous :( | 11:12.48 |
| that document seems to behave the same - the contents of the comment is empty and the icon goes back to a white square if I open the comment then close/reopen the file | 11:13.13 |
tor8 | jogux try this one too, please https://ghostscript.com/~tor/fuchsia-comment2.pdf | 11:16.22 |
| I edited that to set the IC to purple | 11:16.37 |
| does preview show any icon other than a colored square for the other two text annotations in that file? | 11:16.58 |
jogux | so comment2 appears as purple with a speech buibble and no text; after closing/reopening the file itâs purple with no speech bubble | 11:17.58 |
| the other two comments are just yellow squares | 11:18.23 |
tor8 | nice. now I know how it's abusing the spec a little better... | 11:18.48 |
| so it's using the IC to color in a little square | 11:18.55 |
| and not drawing any icons (no lines or speech bubbles) | 11:19.16 |
jogux | I donât see any icons for the two yellow ones when opening that file in chrome | 11:19.36 |
tor8 | can you create any text annotations with speech bubble icons in preview? | 11:19.53 |
jogux | it is drawing the speech bubble icon when I open the file - it just loses it when the file is saved. | 11:20.17 |
tor8 | I mean if you create a note annotation in preview, can you pick an icon then? | 11:20.45 |
jogux | not that I can see - always seems to be a plain rounded rectangle. | 11:21.51 |
tor8 | huh. good to know. | 11:21.59 |
| so, is the popup text missing or is it just the icon that's gone white? | 11:22.15 |
jogux | the text is always missing | 11:24.13 |
tor8 | I could read the text you wrote in the file-after-tor-added-note-using-mupdf-fullsave\ copy.pdf file | 11:25.15 |
| "This is torâs annotation but Joseph added text to it using macOS preview." | 11:25.30 |
jogux | yeah, and that text is there when I reopen in mupdf or preview | 11:25.54 |
| itâs just if I add annotation in mupdf then open it in preview that the text vanishes. | 11:26.07 |
tor8 | so there was no text when you added that text to the annotation in preview? | 11:27.59 |
jogux | that annotation had no text when I opened the file, yes. | 11:29.58 |
tor8 | strange. | 11:34.23 |
jogux | that just seems to be a general issue. I just tried 3 different pdf files, added an annotation with muso and opened them in preview, all 3 had no text in the annotation. | 11:34.26 |
tor8 | jogux: try https://ghostscript.com/~tor/more-comments.pdf | 11:34.29 |
| do any of the new ones I added have text? | 11:34.41 |
| if you can send me a file that you opened, did not edit the annotation, just resaved | 11:35.12 |
| and I can see if it has deleted the /Contents or not | 11:35.25 |
jogux | no text in neither the green one nor the purple one. (the yellow one has text) | 11:35.42 |
tor8 | yeah, the yellow one is the one preview has edited (with your text in it) I just reset the appearance | 11:36.16 |
| does the FreeText annotation have any text? | 11:36.47 |
jogux | yes, I see âHere is a FreeText annotationâ in all the files | 11:37.08 |
tor8 | and you can edit it? | 11:37.18 |
jogux | yes, I can edit it, and the edit appears in muso | 11:38.41 |
tor8 | so it's limited to Text annotations. what about highlights and ink annotations? | 11:39.15 |
jogux | It seems the text in the annotation is only lost if I open the annotation to view it (which seems to implicitly edit it) | 11:39.39 |
tor8 | jogux: try more_comments1.pdf (I added an ink and highlight annotation with associated text) | 11:40.14 |
jogux | highlight and ink appear fine. yellow reduce, âukâ circled in red. | 11:40.45 |
tor8 | and associated text? | 11:40.54 |
| or maybe preview doesn't show associated text for those types? | 11:41.11 |
| it should say "This is an ink." and "Reduce the price!" | 11:41.27 |
jogux | I canât see either piece of text. It feels like preview doesnât support that. | 11:46.00 |
| I canât see a way to add text to an ink annotation nor a highlight. | 11:46.15 |
tor8 | jogux: right. try more-comments2.pdf | 11:47.32 |
| I edited it to make the purple annotation a /Popup type, and associated with the green one | 11:47.51 |
jogux | both notes seem to say âThis is a purple ελληνικά help icon.â | 11:48.22 |
tor8 | there are two notes!? | 11:48.37 |
jogux | if I open the purple one or the green one they both say that | 11:48.49 |
tor8 | the purple one shouldn't be visible, it's a Popup annotation! | 11:49.00 |
| can you 'hide' or minimize the purple one? | 11:49.14 |
| right, so I think that Apple assumes all Text annotations have an associated Popup annotation | 11:49.34 |
| that won't work with older files ... | 11:49.52 |
jogux | this is very confusing. I saved the document and now both the green and purple ones say âThis is a green ASCII comment.â. | 11:50.10 |
tor8 | congratulations, I think you've found plenty of bugs in macOS Preview :) | 11:50.31 |
| so, the green annotation has a content saying "This is a green ASCII comment" | 11:50.57 |
jogux | the purple one displays as a black ? in a purple box with a black border. if I click on it, it expands to show stuff | 11:51.10 |
tor8 | and the purple annotation has contents "This is a purple greek help icon." | 11:51.10 |
jogux | stuff == text | 11:51.17 |
tor8 | the purple annotation is the Popup annotation associated with the green annotation | 11:51.38 |
| so, in adobe reader, the green one has a mouseover text saying "This is a green" | 11:51.51 |
| but if you click on the green to open it, it pops up the purple annotation as a little text window with "This is a purple" | 11:52.11 |
| in the old yellow annotations created by preview, the text annotatinos have an associated Popup annotation, but both the original and the popup have the same Contents (note 1 from mac preview) | 11:53.24 |
jogux | https://cl.ly/1c88fff81d6c is how it looks | 11:53.33 |
tor8 | from the PDF reference: | 11:56.56 |
| Pop-up annotations table 8.34 (pdfref17) | 11:57.09 |
| Parent: The parent annotation with which this pop-up annotation is associated. | 11:57.26 |
| Note: If this entry is present, the parent annotationâs Contents, M, C, and T | 11:57.33 |
| entries (see Table 8.15 on page 606) override those of the pop-up annotation | 11:57.33 |
| itself. | 11:57.34 |
| seems like Apple read that note backwards... | 11:57.40 |
| jogux: more-comments3.pdf is the same, but without an appearance for the popup | 11:58.29 |
| more-comments4.pdf has the Contents only in the popup | 12:00.37 |
| more-comments5.pdf has the Contents only in the text | 12:00.47 |
| (or vice versa) | 12:00.52 |
| and more-comments6.pdf has no pop-ups but the 'open' flag is true for the text annots | 12:04.29 |
jogux | more3 has just the green icon, the text when I open it is the purple text | 12:07.53 |
| more4 has blank text when I open | 12:08.13 |
| more5 has the purple text | 12:08.33 |
| more6⦠theyâre not open. thereâs green and purple, both have no text when I open them | 12:09.03 |
tor8 | right. so it's using the contents of the popup annotation (contrary to spec) and ignoring the contents of the text annotation | 12:17.40 |
| ...even if there is no popup annotation associated | 12:17.49 |
jogux | weird stuff. | 12:18.15 |
tor8 | and when saving, it copies the text annotation contents to the popup contents (as when you saved it, the contents both changed to "green" | 12:18.26 |
jogux | I guess this is somehow compatible with whatever adobe does | 12:18.42 |
tor8 | frankly, apple is behaving really stupidly here :) | 12:18.42 |
jogux | it does seem like that and itâs a bit surprising. | 12:19.01 |
tor8 | newer adobe readers likely write out popup annotations in all newer versions | 12:19.02 |
| but this is going to fail hard on all ancient files, the ones from back when there was only one type of annotation and it was Text | 12:19.36 |
| before they added Popup annotations to handle other annotations having associated text as well | 12:19.55 |
| I wonder what it does if you change the version numb... oh, nevermind, it actually already says %PDF-1.2 in those files | 12:20.45 |
jogux | we may also need to check behaviour in older versions of preview (I canât easily do that right now). | 12:28.42 |
sebras | tor8: LGTM "Pass colorspace name to op_BI." | 20:52.45 |
| tor8: LGTM "Support UTF-16LE PDF text strings." | 20:52.53 |
| tor8: LGTM "Use 1-indexed arrays in mutool show path syntax." | 20:53.03 |
| tor8: btw it took me some time to lookup what language escape codes were. at first I looked at unicode, only later did I find out it came from pdfref. | 22:32.34 |
| Forward 1 day (to 2018/11/23)>>> | |