IRC Logs

Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2015/03/18)20150319 
Armando hi all10:32.44 
  I am using mupdf for android, I get it compiled fine, but I need to fit the page in the screen with a more incremerented zoom, someone here can help-me?10:36.33 
Robin_Watts Armando: This is the right place. Can you be more specific about your needs?10:37.50 
Armando yah, the text in my page is very small, so I need to increase the zoom10:38.48 
  I've tried everything10:42.00 
Robin_Watts Armando: At the moment, MuPDF scales the initial view so that the page fits the screen.10:42.35 
  more specifically, so the largest dimension of the page fits the screen.10:43.09 
  Are you mainly working with PDFs you author yourself?10:43.45 
Armando yah fits but the text is very small I am myopic10:43.59 
  no Im making a app to read pdf 10:45.01 
  any pdf in my sdcard10:45.25 
Robin_Watts OK, so before we go any further... are you aware of the license terms for MuPDF?10:45.27 
Armando no, but if necessary I can combine the payment of a licence10:46.47 
  but it need to work first10:47.02 
Robin_Watts Armando: OK. So MuPDF is released under the GNU AGPL.10:47.12 
Armando yah I know10:47.30 
Robin_Watts The AGPL says many things (and you should read the license yourself), but the key things are that if you distribute an app that uses MuPDF you need to distribute the full source code to your app.10:48.00 
  If you can't live with those terms then you need to get a commercial license.10:48.26 
Armando ho, no problems10:48.31 
Robin_Watts I can't tell you how much a commercial license will be - you need to talk to Scott about that.10:48.44 
  OK, so with that out of the way... technical problem...10:48.58 
Armando ok10:49.12 
Robin_Watts I guess the first thing would be for you to define exactly what behaviour you want.10:49.13 
  Saying "I want the text bigger" is not a spec that's easy to work from.10:49.31 
  How much bigger? How should the app decide how big to make the initial page?10:50.00 
Armando ok, here is10:50.10 
  I got a pdf file first, so it will be opened in my screen to be read, but, like is, the text is very small10:51.01 
  so I need which when I opem this file in my screen it be viewed more large and the user can control how zoom it be displayed but the page need to be allawy fitted in the screen10:52.57 
kens You can't have that. You cannot change the size of the text in a PDF file. You can render to a higher resolution, which will increase the size of everything, but that's all. I think I covered this on Stack Overflow10:53.52 
Robin_Watts Armando: It sounds to me like you are asking for the text on the PDF page to be reflowed.10:54.22 
Armando I try it, but when I reflow the text, it not show any image, with I need is to show the text exactly like in reflow mode, boot normally10:56.57 
  see it http://stackoverflow.com/questions/28843897/how-i-can-resize-the-text-of-the-pages-using-mupdf-in-android10:57.18 
Robin_Watts Armando: A PDF file contains a set of graphic instructions on where on a page to put different elements; text, images, line art etc.10:59.11 
  There is nothing in there about 'flowing' a page.10:59.22 
  Hence you can zoom a page in and out at the original layout.10:59.43 
  You can have big text, but you can't simultaneously have it fitting onto the page.11:00.09 
  Now, we do some voodoo in mupdf to extract the text/images from a page and to relay it out differently.11:00.46 
  This works OK most of the time, but it does rely on heuristics and guesswork.11:01.05 
  and line art will be lost doing that.11:01.18 
Armando yha, but it always show the text small and Im myopc and can here, so I need to zoom it, but the page is out of the screen and it is very bad to have to stay positioning the page all the time11:02.22 
  so I need to show the page fitted in the screen with the text like be reflowed11:03.58 
Robin_Watts Armando: I need a Ferrari for only $100. My current car is too slow, and I cannot afford a full price Ferrari.11:04.44 
tor8 Robin_Watts: bah, this OCG handling is annoying. it's currently handled in the run processor, but I'm considering moving it into the interpreter instead11:04.53 
Robin_Watts tor8: ok...11:05.02 
tor8 it needs to look up resources in the resource dictionary, etc11:05.17 
  and the 'event' handling for the various View/Print intents11:05.33 
norbertj hi guys, do you know when Henry will be back on line?11:05.44 
tor8 we'd need a way to disable it though, for pdfclean11:05.44 
Armando yu have very luke, I use a Bike,ha ha ha11:05.47 
tor8 but I'm thinking a NULL intent would work well there11:06.00 
chrisl norbertj: *possibly* later today, maybe tomorrow - depends on how the travelling goes/went11:07.06 
tor8 Armando: get a bigger screen, or stop using a fixed layout format11:07.11 
Robin_Watts Armando: My point is that however many times you state your problem, it will not help us solve it.11:07.15 
Armando its because my english, Im brasilian11:08.00 
Robin_Watts PDF as a format has certain constraints on it. You are trying to do something that PDF is fundamentally unsuitable for.11:08.03 
Armando ok, but with andpdf it is pssible, but its very poor11:08.44 
chrisl norbertj: if you have something for henrys just put it here, and one of us will make sure he sees it (or email, or comment on the bug - whatever's easier)11:09.23 
Armando one moment please11:09.52 
  I try it: http://stackoverflow.com/questions/21063005/mupdf-android-pdf-fit-to-the-screen/28844533#28844533 but nothing work11:10.54 
norbertj +chrisl: I just want to know about 695867 if he's made any progress. The customer is bugging me ;)11:11.54 
Robin_Watts norbertj: He updated the bug before he flew, I think.11:13.01 
chrisl norbertj: he's unlikely to have done anything beyond what he put on the bug thread11:13.04 
Robin_Watts I doubt he's done anything while he's been away, because he couldn't carry an HP printer as hand luggage.11:13.22 
Armando hi Robin_Watts, how is Scott?11:13.22 
Robin_Watts Armando: Scott can be reached as sales@artifex.com11:13.40 
  He will not be able to help you with technical issues.11:13.51 
Armando ok, I can study pay a licence of this11:14.09 
norbertj +chrisl,Robin_Watts: I know, thanks.11:14.12 
Armando you see the post in stackoverflow?11:14.43 
Robin_Watts yes.11:14.52 
Armando the last11:14.52 
Robin_Watts Armando: Let's be clear here. PDF is a fixed format system. The only way to increase the text size is to zoom in. This will mean you can't see the whole page (or even whole lines) at once.11:16.07 
  You cannot reliably reflow PDFs.11:16.31 
Armando no problem, wichi I need is to resize the view11:16.52 
  boot all values I try to change all values in the source and it's driving me crazy11:17.26 
Robin_Watts You just want to start with the page zoomed in ?11:17.36 
Armando I know that, is because I have difficulty expressing myself in English, but what I need is to increase the zoon in view11:19.14 
  yes, it is11:19.37 
  zoomed in the screen with a minimal margins11:20.18 
  so I can read11:20.32 
  and if I need more zoom, I can zoom the page, but so its my own problem if the page is out of the screen, but when I start his page it need to be fitted in the screnn11:21.47 
  sorry my friend11:22.10 
  its very dificulty for me, to talk in english11:22.29 
  may be dificult for your to understand so11:22.56 
tor8 Robin_Watts: we always start with fit-to-page, but I suspect Armando wants to start with fit-to-width?11:22.57 
Robin_Watts Armando: Ah, so possibly I see what you're asking now. Currently the page is started so that the whole page fits on the screen. You want to start it so that the text content fits on the screen?11:23.15 
Armando yah, maybe is be it11:23.18 
  yes11:23.37 
Robin_Watts Or maybe (as tor suggests) that the width of the text content fits on the screen.11:23.39 
  Ok, so to be able to do that, you need to run through the page contents to figure out what the bounding box of the text contents are.11:24.30 
  Then, once you've found the required bbox, you can modify the scale calculations.11:24.54 
Armando if the text at start apear on the screen like as if it had been reflowed its the ideal11:25.05 
  ho, very nice11:25.25 
tor8 Robin_Watts: argh! effing recursive spaghetti PDF insanity11:25.39 
Armando kkkkkkkkkkkkkkk11:25.49 
  yha, before a monster job to compile it in android-studio11:26.42 
  ok, you can add-me on skype "amsmarques" to help me complete this and possible combine a payment for yo help...11:31.56 
Robin_Watts Armando: This is the best forum, not skype.11:35.45 
Armando ok11:35.54 
  Ok my friend @Robin_Watts, thank you, now Im in another job, so I return back any other way to continue, its ok?12:06.44 
tor8 Robin_Watts: am I right in understanding that pdfclean -s doesn't process annotations?12:20.54 
  Robin_Watts: do you know of any good test files with OCGs?13:15.25 
  tor/csi has been updated with OCG handling. hopefully nothing has changed behaviour-wise but I'd like to run some actual tests...13:22.19 
Robin_Watts tor8: No, sorry.13:28.55 
  tor8: (re pdfclean and annotations) urm... possibly not13:29.09 
tor8 Robin_Watts: Okay. Do you want to review a squished commit for the csi branch? That might be easier.13:32.04 
Robin_Watts Yeah, why not do me a squished csi2 or something?13:33.56 
tor8 Robin_Watts: on tor/csi-squish13:34.17 
Robin_Watts Ta.13:34.27 
  ok. all but the last one are fine.13:36.26 
  The last one will take longer :)13:36.31 
  tor8: Arrays, dicts and refs have pdf_document *'s in them.13:40.31 
  I wonder if we need the pdf_document in the patter and the xobject...13:40.45 
  probably doesn't hurt.13:40.50 
  pdf_clean_stream_object probably needs some fz_var magic for proc_buffer and proc_filter, and they probably need to be set to NULL initially.13:41.51 
  Likewise pdf_clean_type3.13:42.05 
  You've dropped an fz_drop_buffer from pdf_clean_type3 that I think is still required.13:43.49 
kens chrisl that Ubuntu packaging is plain broken13:44.05 
Robin_Watts same fz_var magic needed in pdf_clean_page_contents13:44.09 
chrisl kens: you're not kidding - it's quite a mess :-(13:44.24 
kens Are you going to raise it with them ?13:44.38 
chrisl Maybe when I calm down13:44.52 
kens Yeah....13:44.59 
Robin_Watts tor8: There are still lots of //XXX commends in load_font_or_hail_mary13:45.04 
tor8 Robin_Watts: yeah, I did mention that maybe we could excise pdf_document from the stream stuff13:45.08 
  I tried it briefly, but ran into trouble13:45.19 
kens Its a fairly serious bug in Ubuntu's GS package though13:45.20 
tor8 so doing that is a fair amount of work13:45.28 
  Robin_Watts: I moved some drop_buffers around, they were being kept/dropped inconsistently13:46.03 
chrisl kens: it is. I am, however, going to tweak the substitution code to cope, too13:46.07 
kens :-)13:46.14 
Robin_Watts tor8: In the event of a failure, the buffer won't be dropped.13:46.31 
chrisl Luckily, it's very easy13:46.33 
kens Famous last words.....13:46.43 
chrisl No, it's simply adding a stopped around a findresource call13:47.00 
Robin_Watts tor8: gotta step away for a bit. will keep looking when I'm back. sorry.13:47.02 
kens AH OK that is easy enough13:47.10 
chrisl I'll have to remember my launchpad password to report it :-(13:48.09 
  TBH, I have a suspicion it might work in the current code, anyway, because I added code to validate the cidfmap entries before we store them, so entries with fonts missing won't be written to the dictionary now.....13:49.41 
kens Seems like a lot of hassle to test though13:50.04 
chrisl Well, I tested that the validation code works, I see no reason it wouldn't work in the Ubuntu context, too13:51.02 
kens Fair enough13:51.32 
tor8 Robin_Watts: the pdf_dict_put(charprocs, key, val) in pdf_clean_type3 looks redundant...13:51.59 
  Robin_Watts: pdf_clean try/catch fixes on tor/csi-squish13:53.45 
  and hail-mary cookie handling13:57.35 
Robin_Watts I suspect the logic in there should be if (TRYLATER || (cookie && cookie->incomplete_ok))14:06.40 
  but I cannot fault your application of de morgans law :)14:06.54 
  I think the original code was probably wrong.14:07.08 
  Let's leave it as you have it for now.14:07.15 
tor8 I believe it is correct as it is. if trylater, and the cookie says that incompleteness is okay, use the hail mary font, else bail14:08.49 
kens I'm off out for the rest of the day, bye all14:19.31 
Robin_Watts tor8: ok, yes.14:49.29 
  tor8: There is still an XXX in pdf_process_annot14:55.45 
  The pdf_object change to use fz_puts rather than fz_printf will result in an \n not being sent.14:56.53 
  Stylistically, I dislike the repeated casting in pdf-op-buffer.14:58.03 
  I'd rather do a pdf_output_processor *proc = (pdf_output_processor *)proc_; at the start and then have the actual code for each function free of casts.14:58.53 
  (but I do prefer the new OO style to the old 'state' passing)15:00.16 
  pdf_out_BI has some strange comments in it15:01.16 
  and a big #if 0 section.15:01.46 
  begin_softmask has XXX in.15:04.23 
tor8 Robin_Watts: the use of puts (without a newline) change is intentional15:05.22 
Robin_Watts ok.15:05.29 
  pdf_run_gs_SMask has "printf("SMask!");" in it :)15:05.57 
  pdf_run_Tx has a // TODO: gstate = pdf_flush_text, which sounds important.15:06.45 
tor8 ah, oops. forgot to nuke the #if 0 in out_BI15:06.51 
  mm, yes, the gstate = flush_text calls seemed to be very inconsistent in the original code15:08.01 
Robin_Watts otherwise looks good.15:08.10 
tor8 so I wonder if we shouldn't add them everywhere instead15:08.53 
Robin_Watts We're supposed to flush the text whenever we do a non-text marking operation, or make a change to the text state.15:09.19 
tor8 Robin_Watts: fab. I did consider adding pdf_output_processor *op = (pdf_... casts at every pdf_out_xxx function15:09.28 
  easy to do if you think it's worth bothering with15:09.42 
Robin_Watts tor8: Yeah, you use the 'other' style in pdf_op_run15:09.57 
  tor8: It would be my preference, but probably not so much so that I'd make you go through and change an entire file :)15:10.23 
tor8 though I think the Tz flushing should not be necessary15:14.38 
  since it doesn't affect anything in the fz_text object (and the text matrix is recomputed then compared for each show_char) 15:15.10 
  oh wait, it's *because* it affects the matrix that it needs to flush15:16.54 
Robin_Watts yes.15:16.59 
  (sorry, my cache is coping badly with paging mupdf and sot in and out here ;)15:17.35 
tor8 okay, fix for the latest comments on tor/csi-squish15:17.42 
Robin_Watts ok. looks good.15:18.55 
  pdf_process_annot - did you remove the XXX in that?15:19.36 
tor8 nope, that one remains15:21.07 
  still not sure what to do there15:21.11 
  the OCG maze confuses me to no end15:21.18 
Robin_Watts I sympathise.15:21.44 
tor8 should it take the page's resource dictionary, or the annotation's resource dictionary?15:21.46 
Robin_Watts yes, probably.15:21.56 
tor8 I'm inclined to leave it up to zeniko to fix :)15:22.03 
Robin_Watts hehe.15:22.08 
  if it cluster tests clean, go for it.15:22.13 
tor8 Robin_Watts: thanks.15:22.47 
  and then we can hopefully get to your commits before we roll up a release, though I think we should probably wait a few more weeks for the dust to settle after merging these sets15:23.16 
henrys back from Seoul be in and out today.16:36.23 
Robin_Watts henrys: good trip?16:37.57 
henrys Robin_Watts: yeah it was okay, sorry I didn't follow up on your email right away, I see Miles got to it.16:38.44 
Robin_Watts henrys: No worries!16:39.01 
saper [A17:25.16 
Robin_Watts tor8: I'm guessing your commits are unhappy on the cluster then?18:08.36 
fredross-perry mac people: what’s your favorite irc client? That is all….20:47.01 
henrys fredross-perry: colloquy20:55.23 
fredross-perry that’s what I’ve got.20:55.39 
FreezingCold How do I do all pages instead of just the first one? pdftk file.PDF cat 1east output fixed.pdf22:36.53 
 Forward 1 day (to 2015/03/20)>>> 
ghostscript.com
Search: