Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2016/10/05)20161006 
norbertj kens: chrisl: so remove the -dNOPAUSE in ps_impl_allocate_interp_instance() and adding XCFLAGS=-DPSI_INCLUDED (to use ps_end_page_top (which handles the keypress) i.s.o. gs_output_page. This works for me. Thanks.05:51.47 
  HenryStiles: it's just for me to have an easy all-in-one pdl on my desktop on which I can drop a ps/pdf/xps/pcl testfile to have a quick look. Before this I always had to tweak the makefiles (i.e. adding the xps to the ls-build) This is less work for me ;) And I use this as a base to determine what I need (removing devs from device_devs/feature_devs that I don't need) to build the pdl-core for our controller.05:58.18 
kens norbertj *either* of those approaches will 'work' but using XCFLAGS should result in ps_end_page_top() being called which is probably the more useful method.07:42.40 
  You shouldn't need to do both07:43.30 
deekej hello guys! :) Is there any significant API/ABI change between ghostscript versions 9.16 -> 9.20?10:48.53 
kens No10:50.44 
deekej thank :)10:51.38 
  *thansk10:51.43 
kens The Ghostscritp API has been essentially unchanged for years, possibly decades. That will be changing soon though10:51.48 
deekej you plan to do it for 9.21?10:52.09 
kens at some point soon10:52.19 
deekej ok, thanks for the info :)10:52.27 
kens And when we do it won't be a minor point change10:52.28 
deekej good to know10:52.46 
sirowain hi everyone13:28.32 
  I need help with mupdf, I basically need to add an image to an existing pdf and save it, no need to render it13:30.27 
kens sirowain : looks like you're going to have to wait a little for help, the relevant people are at lunch or something.13:36.32 
sirowain kens : thanks13:44.49 
deekej do you plan to release new version of ghostscript-9.20, after yesterday's fixes? :)13:44.58 
chrisl_x250 deekej: No13:45.30 
deekej thanks :)13:45.49 
chrisl_x250 Besides, how could we do a "new" version of 9.20? It wouldn't be 9.20, then.....13:46.17 
tor8 sirowain: do you need to add the image on top of an existing page?13:47.16 
deekej well, I was thinking something like 9.20.1 or something like that :)13:47.48 
sirowain yes, i need to 'cover' an portion of page with an image13:47.50 
kens deekej : we only do releases at 6 month intervals, barring disasters13:49.07 
chrisl_x250 deekej: No, if we did that, it would be 9.21. But the "exploits" in question are very low likelihood, and have been there for better than 15 years without causing a problem - not worth rushing out a new version for them13:49.24 
deekej ah, ok :)13:49.43 
  every upstream has it different, so I'm just trying to remember all the differences between their release processes :)13:50.33 
chrisl_x250 deekej: the thing is, most distros grab patches from our repo as and when it suits them, so.......13:51.35 
deekej yes, that's exactly what I will do :)13:51.51 
tor8 sirowain: you can use 'mutool run' to edit a pdf13:52.24 
  including adding images13:52.26 
  gimme a minute and I'll cook up an example script13:52.34 
sirowain tor8: thanks but I've not been very clear, I'm doing this in a c program13:53.54 
  I can't use mutool13:54.32 
tor8 then you can use the same approach13:54.57 
  load the image using fz_new_image_from_file13:56.52 
  create a PDF object from the image using pdf_add_image13:57.01 
  add the PDF object as a named resource in the page's resource dictionary (pdf_dict_put in the page /Resources /XObject dictionary)13:57.41 
  add a drawing command using the named resource to the content stream13:57.51 
  using pdf_load_stream(), fz_buffer_printf(), pdf_update_stream()13:59.08 
  and finally save the file using pdf_save_document()13:59.22 
sirowain tor8: thanks, I'll give it a try, I missed something14:01.22 
tor8 sirowain: http://pastebin.com/raw/k3gieyAT has a mutool run script you can look at for reference14:02.21 
  it should not be difficult to translate that to the equivalent C14:02.40 
sirowain tor8: again, thank you very much14:03.09 
Robin_Watts tor8: Is js_error tagged as no return?14:38.13 
  looks to be.14:38.49 
tor8 it should be14:38.59 
Robin_Watts http://marcos.ghostscript.com:8080/artifex/mupdf/6870dfecd94c1dec0e7970464b11d3b9d5d1250a/mupdf-cppcheck.txt throws up stuff in murun.c14:39.04 
tor8 yes, they're all tagged as noreturn14:39.22 
  does cppcheck not set __GNUC__?14:40.35 
Robin_Watts not a clue, sorry.14:40.49 
tor8 that's the only reason I can think of why it wouldn't pick up noreturn14:41.03 
  but then it ought to be confused by fz_throw as well14:41.29 
sirowain tor8: I'm trying to use pdf_add_image but I get an error (EXC_BAD_ACCESS on iOS)15:10.24 
  here's my code: http://pastebin.com/eS8gezLv15:10.38 
  the fz_image is not null15:11.02 
tor8 sirowain: I don't see any obvious errors15:39.07 
  sirowain: what type is the 'page' variable?15:39.41 
  if it's a fz_page/pdf_page then that could be where your error is. it needs to be the pdf_page->obj object15:40.09 
  pdf_lookup_page_obj if you have the page number15:40.32 
  sirowain: you can use the pdf_page_resources() and pdf_page_contents() functions15:41.51 
  and pdf_update_stream needs the pdf_page_contents object, not the page object15:42.26 
mvrhel_laptop tor8: since you are nont feeling well I will not bother you with the pdf create questions now15:42.27 
  s/nont/not/15:42.33 
tor8 mvrhel_laptop: hopefully I will be up to the task by monday, if it can wait that long?15:42.45 
mvrhel_laptop tor8: easily15:42.58 
  it is not pressing15:43.02 
tor8 mvrhel_laptop: I may not give coherent answers if you ask me today :)15:43.06 
mvrhel_laptop Yes. Get some rest etc.15:43.27 
sirowain tor8: thanks, I'm figuring out why I don't have pdf_page_resources() and pdf_page_contents() functions15:56.28 
tor8 sirowain: you might want to upgrade to the latest git version16:07.11 
  the pdf_page_contents function was added in july16:07.33 
  you should also check that the XObject dictionary exists, and create it if it doesn't, before adding to it16:08.16 
sirowain tor8: I found that pdf_add_image goes wrong because of the call pdf_insert_resource(ctx, doc->resources->image, digest, imref), in fact my doc->resources is null16:17.25 
tor8 sirowain: hm, that bug *should* be fixed. I remember approving the bug fix for it...17:09.09 
 Forward 1 day (to 2016/10/07)>>> 
ghostscript.com
Search: