IRC Logs

Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2014/06/10)2014/06/11 
tor8 chrisl_away: https://code.google.com/p/include-what-you-use/09:28.04 
Zaister any mupdf developers present?09:55.48 
tor8 Zaister: yes, several.09:58.51 
Zaister I mean presently :)09:59.08 
  can mupdf print at all?09:59.20 
tor8 the ios and android apps can print; and the mudraw tool can generate CUPS rasters for printing but the desktop viewer isn't hooked up to any print pipeline10:00.03 
Zaister I'm asking for this: I'm working on a mupdf backend for KDE's Okular, that was originally started by one of the Okular developers but never really maintained. I have brought up this code to the current mupdf code base, but printing is missing from the generator, and I wasn't sure if it is supported at all10:01.36 
tor8 Zaister: right. I'm not very familiar with how KDE handles printing, but if it uses CUPS I would imagine that you could use MuPDF's PWG output for printing10:20.12 
  I know we've had some interest in using mupdf as a converter for some steps in the CUPS printing pipeline, but I don't think that project went much beyond generating PWG rasters10:21.27 
Zaister OK I will check that out10:22.26 
  and another thing: does mupdf support page labels?10:23.21 
  I couldn't find anything in the sources that indicates that10:23.37 
tor8 if you mean the extra strings that can be attached to a given page, like assigning roman numeral page numbers, then no, we don't support that10:24.05 
  it wouldn't be hard to add though10:24.12 
Zaister yes that is what I mean10:24.21 
  it's a bit more complex, pdf defines page ranges, each with a separate nubmering scheme10:24.54 
  so for example for a book, you have "Front Matter" and "Content"10:25.14 
  front matter might use roman numerals, and content then starts at page 1 for the page that actually is page 1 in the book10:25.48 
  I've delved a bit into the PDF specifications and it seems non-trivial at least10:26.33 
  would you be open to for an implementation?10:26.54 
tor8 yeah, you'll need to implement the "Number Trees"10:27.08 
Zaister yes, exactly10:27.18 
tor8 Zaister: if you open an enhancement request on the bugzilla we'll get to it eventually--or at least not forget it as soon as you log off IRC :)10:28.14 
Zaister I meant open for someone else to implent it :)10:28.31 
  but I certainly can do that10:28.52 
tor8 oh, yes. if you come up with a patch (and are willing to assign the copyright to artifex) we'll definitely consider taking it on10:29.07 
Zaister OK, just wanted to check if trying to take this on is worth it10:29.39 
tor8 and do feel free to hang around this channel and ask any questions about the mupdf code if you do decide to work on it10:30.55 
Zaister thanks, I will10:31.18 
henrys kens: if you get busy you can leave support questions for me.14:04.29 
kens Thanks henrys, but you get them after I go off anyway :-)14:04.48 
  Things do some to have livened up since the staff meeting :-(14:05.59 
henrys kens: marcosw vacation effect14:07.53 
kens Ah, that would be it.....14:08.06 
el_mendi Does anybod knows how to convert the Android Bitmap samples into an unsigned char * variable in order to introduce the samples in an Pixmap variable?14:35.42 
Robin_Watts el_mendi: See MuPDFCore_drawPage in platform/android/jni/mupdf.c14:43.11 
el_mendi ok14:43.30 
Robin_Watts That takes a bitmap object, checks it's the right format, locks the pixels, renders to those pixels, and then unlocks and returns.14:43.50 
el_mendi So I take the Bitmap object, lock the pixels with AndroidBitmap_lockPixels() and then create the pixmap with fz_new_pixmap_with_bbox_and_data() ?14:48.44 
  the bbox variable is the space in the page that contains de pixmaps does'n it?14:49.20 
Robin_Watts yes.14:50.06 
el_mendi If the image is bigger than the bbox will be resized itself depending on the zoom of the document? Or I will need to reescale the bitmap, loosing pixels, in order to fit in the bbox?14:50.58 
Robin_Watts el_mendi: The page will be rendered onto the bitmap according to the transform you pass in.14:51.42 
  Any sections that do not fit will be cropped.14:51.52 
  The drawing routines will not magically attempt to guess scales etc.14:52.18 
el_mendi So I need to set a transformation matrix in order to reescale the bitmap?14:56.20 
  but the samples of the bitmap will remain intact?14:56.37 
Robin_Watts The bitmap is never 'rescaled'.14:57.19 
  We draw new content onto the bitmap with a given transformation matrix.14:57.58 
  We never 'rescale' what is already on the bitmap.14:58.12 
el_mendi But then if the bbox must have the same size as the bitmap, when I specify the area of the page where the image will be drawn?15:04.59 
  I'm sorry if I don't explain myself better15:05.36 
Robin_Watts el_mendi: I would generally expect the bbox to exactly match the size of the bitmap, yes.15:11.02 
  There are cases where you can use a bbox that is a subset of the page, when you only want to redraw a small section of the bitmaps contents (say when you've highlighted some text or something)15:11.43 
el_mendi Yes, but in my case, that I want to introduce an image in an specified area of the page, I need a bbox?15:12.53 
Robin_Watts el_mendi: For simplicity, I would start with just redrawing the whole page.15:13.35 
  Once you have that working, then maybe you can think about reducing the size of the bbox to save render time.15:14.00 
el_mendi But I just want to create an Image Xobject in order to introduce it in the resources of the page, for that I need an fz_image object, and for that I need a pixmap object15:16.50 
  So if the pixmap just contains the whole information of my bitmap, and the image the same, do I suppose I must specify the render area in the Xobject variable?15:17.47 
Robin_Watts Ah, that's a different kettle of monkeys.15:20.48 
  fz_image objects do NOT need to come from a pixmap object.15:21.46 
  fz_image objects generally have a compressed buffer of data. So a JPEG image would have a buffer of jpeg data.15:22.37 
  A tiff image would have a buffer of tiff data.15:22.48 
  A flate compressed PDF image would have a buffer of flate compressed data etc.15:23.17 
el_mendi Yes15:23.25 
Robin_Watts Ah, so you're trying to make an fz_image from an fz_pixmap, so you can call into the pdf_device, right?15:24.15 
el_mendi yes15:24.33 
Robin_Watts The code I pointed you at was passing in a bitmap to be drawn on.15:24.50 
  You'll be doing something different.15:25.00 
el_mendi And I was trying to create the fz_pixmap from a Bitmpa object from Android15:25.00 
Robin_Watts You'll be passing in a bitmap, and wanting to make an fz_pixmap from that.15:25.29 
el_mendi yes15:25.35 
Robin_Watts As such, you'll be wanting to set the bbox to be the complete bitmap.15:25.41 
el_mendi And when I specify the area where I want to render the pdf_device?15:28.08 
  In the pdf_device dictionary?15:28.29 
Robin_Watts I don't follow.15:28.49 
el_mendi Sorry15:30.15 
  First I create the pixmap15:30.33 
  from my Bitmap object of, for example, 1024x760 pixels15:31.46 
  so the pixmap will contain 1024x760 samples15:32.11 
  then I create the fz_image object from that fz_pixmap15:32.26 
  so the image will be the same size15:32.34 
  isn't it?15:32.54 
Robin_Watts It will contain 1024x760 pixels, so 1024x760x4 bytes (as each pixel is 4 bytes in RGBA format)15:33.13 
  Yes, the image will be the same size.15:33.19 
el_mendi If I want to put my image in an area of, for example, one third of the image's area...15:33.54 
  Where I specify that?15:34.14 
  I mean the page's area in which I will put the image15:35.41 
Robin_Watts Once you have an image, you will be calling an fz_device function to place that image onto the page, right?15:36.46 
  fz_fill_image or something.15:37.23 
  That takes the device pointer, the image, and a matrix with which to scale the image.15:37.53 
  conceptually, IIRC, the image is treated as a 1x1 square, and is scaled by the matrix onto the page.15:38.19 
  hence the x and y parts of the matrix will set the lower left corner of the image.15:38.36 
  and the a and d will set the width/height of the image on the page.15:38.48 
el_mendi So... lets see if I undestood: I create the fz_pixmap, then fz_image, then a pdf_device in which I introduce my image with the function send_image() and then I call fz_fill_image with the dimensions and position of the image?15:43.05 
Robin_Watts el_mendi: If you are using the pdf_device, then you shouldn't need to call send_image.15:43.54 
  fz_fill_image will cause the pdf_device to call send_image internally.15:44.28 
  If you are working *without* the pdf_device then you'll need to call something like send_image yourself.15:44.51 
  You may be interested in looking at: http://git.ghostscript.com/?p=user/robin/mupdf.git;a=summary15:45.45 
  The 4th and 5th commits on there are likely to be of interest to you.15:46.10 
  But this code is NOT likely to go in exactly like that.15:46.30 
  and may not go in at all for a while at least.15:46.42 
el_mendi ok ok, is just to see something similiar and try to figure out how to do it by myself15:47.21 
Robin_Watts el_mendi: The most difficult bit of what you are doing is probably going to be hooking up the pdf_device so that it can safely 'extend' the page contents.15:48.42 
  And that's exactly what those 2 commits do.15:48.57 
el_mendi ok15:50.56 
  one question15:51.02 
  the pdf_device contains all the contents of the document?15:51.19 
Robin_Watts No.15:52.38 
  I'll try to explain. We'll have to start with some background.15:53.43 
  The way mupdf works is that it can open various different file formats.15:54.02 
  You can get 'fz_page' objects that correspond to particular pages from the document.15:54.28 
  You can then 'run' those pages through various different 'fz_devices'.15:54.44 
  These different devices do different things.15:55.00 
  For instance the draw device actually renders the contents of the page.15:55.10 
  the text extraction device extracts the text from the page for searching etc.15:55.27 
el_mendi aaah ok15:55.43 
Robin_Watts The list device stores the raw graphical objects from the page in a list so it can be replayed back later etc.15:55.57 
  So the 'input' to a given device are the raw graphical operations that make up a page.15:56.29 
el_mendi aha15:56.47 
Robin_Watts The PDF device is a partially written attempt to allow us to convert other formats into PDF.15:56.53 
  That is, it converts the raw graphical operations it is called with back into a stream of PDF operators, and a set of resources.15:57.23 
  Currently it works by creating a new page in the document (or overwriting an old one)15:57.47 
  Now, you want something that takes your new content as input - the pdf device does that.15:58.56 
  but you really want your content *added* to a page, not overriding the page.15:59.15 
  and the pdf device does not do that currently.15:59.29 
  but with those two commits, it can.15:59.37 
el_mendi so I need to save the previous content of the page15:59.42 
Robin_Watts No, you need to use the two commits.16:00.10 
el_mendi add the new content and then create a pdf device with the previous content and the new together as input16:00.20 
  ok ok16:00.24 
Robin_Watts You call pdf_clean_page_contents on the page you want to add your changes to, and pass in a function that will be called back.16:00.55 
  That will clean the page contents, and will call your function back.16:01.14 
  Your function will then make a pdf_device from the buffer you are passed (that contains the current page contents)16:01.46 
  Then you call fz_draw_image() to put your image on the page, and update the resources.16:02.05 
  then you close the device.16:02.16 
  Then you return to pdf_clean_page_contents, which sets the newly cleaned data + your extras back into the document.16:02.39 
  and that should be it.16:02.55 
el_mendi Wow, that was very useful!16:03.17 
  But.. I didn't understand what do you mean wit pass in a function that will be called back16:04.34 
  I need to create a function to create the pdf_device with a buffer in the arguments and call it from the function pdf_clean_page?16:05.20 
Robin_Watts Apply the commits, then look at pdf_clean_page_contents.16:05.21 
  You'll see that one of the arguments it takes is a function pointer.16:05.38 
el_mendi ah right16:06.48 
  And do I need to do something special when I create my function in order that I can pass it as an argument?16:07.48 
Robin_Watts el_mendi: Nope.16:08.33 
el_mendi Ok, so the function must return the new buffer?16:09.25 
Robin_Watts el_mendi: The function is passed the new buffer for it to modify.16:10.46 
  Apply the commits and look.16:10.55 
henrys mvrhel_laptop: looking at the digital signing craziness. I can’t believe other developers are paying 1000’s for EV16:14.36 
  mvrhel_laptop: maybe we should just forget about this and be “untrusted"16:15.26 
mvrhel_laptop henrys: perhaps. I was not aware it was that much16:16.01 
henrys well if we want “EV” - https://evcs.websecurity.symantec.com/evcs/process/enrollment16:19.18 
Robin_Watts henrys: Do we really want a hardware token to protect our keys?16:20.21 
mvrhel_laptop these guys do it too. http://www.digicert.com/code-signing/ev-code-signing.htm16:21.20 
Robin_Watts http://webdesign.about.com/od/ssl/tp/cheapest-ssl-certificates.htm16:21.55 
henrys I’m just looking at best practices here: http://blogs.msdn.com/b/ie/archive/2012/08/14/microsoft-smartscreen-amp-extended-validation-ev-code-signing-certificates.aspx I don’t know the implementation details of how these things are secured.16:21.58 
Robin_Watts http://www.sslshopper.com/cheap-code-signing-certificates.html16:22.48 
mvrhel_laptop henrys: yes I was reading that same thing16:24.22 
henrys Robin_Watts: right but that doesn’t get you the “best” trust from MS16:24.28 
mvrhel_laptop symantec and digicert appear to be the 2 primary ones16:24.56 
henrys see the best practices link16:25.03 
mvrhel_laptop Digicert appears to be less16:25.07 
  $16:25.10 
  $331/ year16:25.44 
  This seems like a $$ making racket16:26.09 
Robin_Watts The first column in the "cheap-code-signing-certificates" was for DigiCert.16:26.15 
mvrhel_laptop yes16:26.19 
  ok. I will review all of this.16:26.54 
henrys Robin_Watts: that’s not EV is it?16:27.07 
Robin_Watts https://www.digicert.com/order/order-1.php16:27.14 
  $469 for 2 years EV16:27.28 
mvrhel_laptop http://www.digicert.com/code-signing/ev-code-signing.htm16:27.42 
Robin_Watts or $295 for one year.16:28.15 
mvrhel_laptop I see 449 / year16:28.32 
  is it cheaper where you are?16:29.00 
Robin_Watts What do you see here: https://www.digicert.com/order/order-1.php16:29.18 
mvrhel_laptop If I selecte EV code signing16:29.45 
  I see 995 / 3 years16:29.55 
henrys mvrhel_laptop: it just seems crazy to me for gsview16:29.56 
Robin_Watts oh, sorry!16:30.03 
  yeah, ev code signing = 331.67 a year for 3 years.16:30.27 
  or 449 for one.16:30.38 
mvrhel_laptop right16:30.43 
henrys mvrhel_laptop: have you also looked at the windows logo thing? is that something we want to pursue or just signing.16:31.16 
mvrhel_laptop henrys: I have not looked at any of this stuff yet. 16:31.37 
Robin_Watts Urm... Surely we just want to look at what requirements steam has?16:31.51 
  If we can sell gsview on steam without any of this signing rubbish, we should just do that.16:32.12 
mvrhel_laptop I will look over that too16:32.34 
Robin_Watts I have a friend who is an indie developer, and has stuff in on steam. I'm sure he doesn't have this whole certificate shakedown.16:32.48 
mvrhel_laptop that is what if feels like at these subscription prices16:33.05 
  s/if/it/16:33.10 
henrys mvrhel_laptop: well I was trying to offload this from you. Maybe we should just be responsible for producing the binary and the rest is a marketing problem for miles and his new IT guy.16:34.44 
mvrhel_laptop henrys: I agree to some extent. I do want to have some recommendations and an understanding of what I need to have wrapped up in the real installer16:35.40 
  I am suprised the cost of stuff on steam (that is what people are paying) there is real money to be made there16:36.15 
Robin_Watts mvrhel_laptop: A lot of steam sales are at discounted prices (sales etc)16:36.46 
mvrhel_laptop ok16:36.55 
henrys mvrhel_laptop: yes if you make gsview into a game I’m sure it would do great ;-)16:37.09 
Robin_Watts but it's the most reliable delivery system out there.16:37.10 
mvrhel_laptop :)16:37.22 
Robin_Watts Even if you buy games in a shop these days, they are actually steam behind the scenes most of the times.16:37.38 
mvrhel_laptop kids this is the most fun pdf reader out there!16:37.39 
henrys is skeptical of the gsview commercial potential in general16:37.46 
Robin_Watts steam does free to play stuff, with in-app purchases.16:38.55 
  That's the way we should be going IMHO.16:39.00 
Robin_Watts ponders "Achievements"...16:39.49 
  "You have distilled a PS file!"16:40.02 
henrys I was thinking a puzzle where the user has to figure out which pdf object should go next.16:40.49 
  I really was not up on this though, why doesn’t microsoft have a fit? Apple wouldn’t like a competing store at all.16:42.48 
Robin_Watts henrys: steam came before the app store.16:43.11 
  steam came before the apple app store.16:43.20 
henrys so there are not apps for ipad, surface etc?16:43.55 
  on steam16:44.26 
mvrhel_laptop I see that Adobe Acrobat Pro is now a monthly subscription16:44.32 
  $19/month16:44.35 
Robin_Watts windows, linux, steamos, mac.16:44.38 
mvrhel_laptop henrys: over time as we add features there is a market for a cheaper solution for what they are offering16:45.46 
  looks like all their stuff is now subscription based16:46.28 
  yuck16:46.35 
Robin_Watts yeah, adobe do everything by subscription now.16:46.57 
henrys mvrhel_laptop: indeed and a lot of folks don’t want subscription - it’s the only option for CS as now as I understand it.16:47.03 
mvrhel_laptop yes. I did not realize that until now16:47.15 
henrys mvrhel_laptop: everybody complained but the revenues worked for adobe so they wen’t with it.16:47.29 
mvrhel_laptop makes me think that we really should just do the MS certification and have a "trusted" option for people16:48.05 
henrys mvrhel_laptop: of course you completely eliminate the pirates.16:48.11 
mvrhel_laptop true16:48.17 
  although I am sure someone will come up with a way around it16:49.12 
kens goodnight all16:49.20 
mvrhel_laptop bye kens16:49.32 
Robin_Watts henrys: Nah, the pirates will just work a bit harder.16:50.07 
henrys mvrhel_laptop: getting back to the original issue we want to get you into SOT as soon as possible and you really can use up a lot of time sorting out how to market. We can tell miles Robin_Watts recommends steam and let him go figure out what we need to do.16:54.44 
mvrhel_laptop henrys: I agree. Lets me wrap up a few things on the installer that I want to get fixed. I won't worry about authentication etc then.16:55.52 
Robin_Watts When are we going to think about doing the chargeable stuff?16:56.23 
mvrhel_laptop There don't appear to be any crashing bugs and I fixed an annoying scrolling issue that kens had found. 16:56.32 
Robin_Watts I suspect that for valve to let us onto steam they need a way to get their percentage.16:56.55 
henrys Robin_Watts: oh no free apps on steam?16:57.17 
Robin_Watts so they might not be keen on carrying us for free until we have the in app purchases working.16:57.18 
  no free apps that don't have in app purchases.16:57.48 
  or perhaps no free apps at all. Only 'free to play games with in app purchases'.16:58.07 
mvrhel_laptop well maybe that is not the best approach. Miles thought his guy could get everything set up for us to do it on our own16:59.52 
  lets let them worry about it for now17:00.08 
henrys Robin_Watts: it’s really Miles stuff - let’s get the binary up on gsview.com and put marketing it in the agenda assigned to Miles and he can solicit recommendations17:00.10 
Robin_Watts henrys: can't argue with that :)17:08.41 
  The only danger is that we ship something now for free that we later want to make chargeable.17:09.04 
henrys mvrhel_laptop: do you want to disable some stuff? Is that where this is going?17:14.09 
  then we’re left with this feature is available in the commercial version that doesn’t exist.17:15.25 
mvrhel_laptop henrys: no. right this sec I am fixing it so that different icons are used for pdf, ps, xps etc file types. Right now nothing is going to be disabled. My hope is that the windows users of us will use this as our main viewer for a couple months and beat out any issues17:15.45 
  I don't see this getting released until sept.17:16.00 
henrys mvrhel_laptop: okay I thought we could get it out now. nvm17:16.25 
mvrhel_laptop I would hope between now and then I can tweak a few things and figure out what we want disabled / enabled17:16.26 
  no, I have been using it for a while as my default, but I think now it is at the point where others could try but an annoying thing to me is that all my file types had the same icon17:17.13 
  at least PS = PDF = XPS etc17:17.24 
  we def. want printing fixed too before we release17:17.47 
  that is the xps write stuff17:17.54 
  with the text17:18.03 
henrys mvrhel_laptop: true17:19.00 
mvrhel_laptop henrys: you there?19:23.01 
  So I am at what I consider a reasonable stopping point in gsview. There are always going to be things I would like to add (e.g. annotation, password stripping and password addition). I may get to those later this summer. But for now I think it is in a reasonable state where people can play with it.19:24.21 
  I updated the installer in my gsview directory on casper19:24.48 
  All the code is current and rebased on my branch also 19:25.12 
  henrys: so I will now go and wrap up the loose end with kens and ICC19:25.28 
  it would be nice still to add in page insertion into gsview. I had chatted with tor about that19:26.07 
  if he was able to add it to mutool, then I can use that right away19:26.18 
  I really think that is required on a tool that we are going to charge $$ for19:26.47 
  anyway off to lunch19:26.53 
henrys takes many submits to create one customer bug report, no bugzilla kung foo20:17.46 
  or fu rather20:18.23 
 Forward 1 day (to 2014/06/12)>>> 
ghostscript.com
Search: