Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2018/05/28)20180529 
kens chrisl ping ?08:36.18 
chrisl kens: pong08:36.25 
kens In Bugzilla we have JasPer down as a product, can we get rid of that ?08:36.40 
chrisl Yeh, I think we should - it's been long enough08:36.56 
kens If you know how, could you do it then please ?08:37.13 
chrisl Hmm, actually, I'm a little concerned about it screwing up the database - like we were warned about deleting users would08:37.57 
kens I was worried about that, yes08:38.16 
  I don't know enough about this....08:38.30 
chrisl FWIW, you cannot open new bugs against Jasper08:38.32 
kens Ah then perhaps that's good enough08:38.45 
chrisl It would be nice to "hide" it, though08:39.01 
kens I was just doing a database search so yeah removing it would probably be bad08:39.05 
chrisl It *seems* it is safe to do, but goodness knows what bugzilla version that might apply to08:40.41 
kens If you aren't certain lets not bother08:40.56 
  I don't want to nreak anything :-)08:41.04 
DynGuy Hi all, it's so cool to know that the chan exist. I realy need a answer to a technical question regarding GhostScript API. My question is : Is it possible to call gsapi by passing a base64 or bytes object directly instead of filename. I understand that gsdll32.dll will handle this filepath. But I work on PDF files that are not stored on physical drives but stored as base64 on a DB. I would like to convert them as image, without s17:24.38 
  Thx in advance :) 17:25.20 
ray_laptop DynGuy: you can use the "run_string" interface and pass data directly to Ghostscript to be parsed. see https://www.ghostscript.com/doc/current/API.htm17:42.44 
  you pass raw binary to that interface, NOT base64, so you would have to decode the base64. The string segments you pass to gsapi_run_string_continue can be any length, and boundaries.17:44.41 
  boundaries of the strings don't matter17:46.26 
kens rayjj : DynGuy Whil eyou can feed the string to the API, if its a PDF file Ghostscript will write it to its own temporary file first anyway. THis is because we need random access to the data and PDF files can be arbitrarily large.18:26.40 
  So whil eyou can feed the data in memory, it won't prevent a file being created, there is no real performance benefit to not writing a temporary file yourself.18:27.26 
DynGuy Hi All, thanks a lot for your quick answers ! @ray_laptop : Im gonna try to check this method on the API. @kens : it's very interesting. So if I understand well, in any case GhostScript must have an access to physical drive ? in order to save its own temp file ? I thought that the process was made in memory directly... ? 18:31.41 
  Thx18:31.43 
kens DynGuy well.....18:32.19 
  Essentially yes. There is a ram file system available where the temporary file could be stored, but the same problem exists18:32.53 
  PDF files can be arbitrarily largem and you could easily exhaust memory18:33.08 
  If all you have is RAM.18:33.16 
  If you are intending to get a PDF file out then there are several (possibly quite a few) otehr intermediate temporary files that will be created as well18:34.23 
  Some of the ohter devices require writing to a file system as well, even for image formats18:35.08 
DynGuy Yes sure, I understand the reason now and you're right ! :) Let me clarify my need. I need to convert as Image PDF file stored store on a DB as Base64 and get only from a REST web service. This application is cloud based on SAaS mode so I cannot have access to file system. This is why Im looking for a solution to make this convertion on the fly on memory... Even if you're right out of memories risks !... The application limits PDF18:39.11 
  Seems that GhostScript is one of the best library to make this... If you know that it will be too dificult or even not possible, you're the best person to say that :) 18:40.39 
kens I think its possible, but you would have to reconfigure Ghostscript to use the ram file system for its temporary file storage, off the top of my head I don't know how to do that.18:41.15 
  Its nearly 8 pm here, and I'm about to pack up18:41.29 
  Also, you probably want to consider the licence, Ghostscript is licenced under the AGPL and what you are talkign about sounds a lot like SaaS18:41.59 
DynGuy Ok kens ! Thanks a lot for your help. All is against me for this task ;) Im gonna find another design to achieve what we need ! Thx again18:42.58 
kens NP18:43.18 
  OK Use.htm mentions temporary files18:44.03 
  That's probably where to start for documentation on moving that into the ram file system18:44.21 
  Apparently the TMPDIR or TEMP environment variable18:45.11 
  I'm not hugely confident about that working with the GS ram file system though18:45.56 
DynGuy seems to be complex to done and maybe instable regarding GS architecture... you're still there, just a last question/advice . regarding my need, do you any ideas ? 18:48.06 
kens I guess you could try MuPDF18:48.27 
  The main problem for all PDF parsers is that they are going to expect the file to be on disk, so that they can do random access.18:48.56 
  The practical limit on the size of a PDF file is the offset in the xref tbale, which is a 10 digit decimal number18:49.24 
  So most designers will assume that the file is on disk.18:49.45 
DynGuy I get it...18:50.19 
kens goes in search of coffee.....18:51.23 
DynGuy So it will be on my side, to find another solution... If lib designers did it like that, it's not for no reasons 18:51.45 
  Thx18:51.46 
ray_laptop DynGuy: I am confused by " I need to convert as Image PDF" -- is your input an image and you want to create a PDF from it, or do you have a PDF and you need to convert it to an image (in some format like jpeg or png) ?19:07.54 
  If you don't have a temp file system available and your input is PDF, then as kens pointed out you can still use the run_string calls to write a RAM file and then send the command to run that RAM file. That is fairly simple.19:10.51 
DynGuy ray_laptop : sorry for the confusion, in fact I have PDF base64 that I want to convert as Image. So you mean that with run_string I could do it full on RAM ? Can you give me some clues ? Thx20:55.38 
 Forward 1 day (to 2018/05/30)>>> 
ghostscript.com #mupdf
Search: