IRC Logs

Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2015/11/17)20151118 
sebras fredross-perry: testing 78900:15.38 
fredross-perry well played00:15.47 
Robin_Watts testing .0# ?00:16.38 
fredross-perry Indeed.00:17.27 
marcosw Robin_Watts: speaking of working late...00:21.12 
HenryStiles mvrhel_laptop: hey sorry I was away before what's up?04:03.55 
kens and again henrysi7 produces a seg fault on a cluster test11:11.27 
chrisl Same file or different file each time?11:15.45 
kens different every time as far as I can recall11:15.58 
chrisl So, it could be a fault with the machine, or a compiler specific issue.....11:16.57 
kens Yes, could be either, I mention it because I'm now mostly seeing 1 seg fault per cluster run, always on henrysi711:17.30 
  I'm inclined to remove the node since its causing problems.11:17.55 
chrisl We could disable that machine, pending investigation11:17.59 
kens tor8 our emails crossed :-)11:26.51 
tor8 kens: and we both checked different things :)11:31.00 
kens Well I thought it was worth actually checking the MS viewer11:33.58 
  I bet the customer didn't.....11:34.11 
HenryStiles kens: I'll look at the logs here. I am doing work on the machine now and don't see anything odd.14:28.30 
kens HenryStiles : I don't know what might be up, at the moment its merely an observation14:28.56 
  I'ver seen 3 inexplicable seg faults over the last few days, and 2 of them have been on that node. The other one might have been, it was the first I noticed and I didn't note which node it was14:29.55 
Robin_Watts kens: Same file, or random files?15:11.38 
kens Robin_Watts : the file seems to differ each time15:13.26 
  It seems, at least generally, to be be low resolution15:13.54 
HenryStiles kens: the one I have here is pcl -> pdf -> ppm crashing going to ppm. But it happens with single transformations as well I assume.15:16.27 
kens HenryStiles : I'm not certain15:17.24 
  I haven't checked ths in any detail, its relatively new (as is the node) and doesn't go wrong often. I only recently noticed that it was ths particular node15:18.02 
faLUCE hello. I have onepage.pdf .How can I remove 10 pts left, 20 pts right, 30 pts top and 40 pts bottom from it?16:56.14 
kens Set a /CropBox16:56.29 
  http://ghostscript.com/regression/cgi-bin/clustermonitor.cgi?log=log&machine=henrysi7&report=d368650e9f3e7e6e4af2d840ffa0dd1e161a9694&project=ghostpdlOr modify any existing one16:56.38 
  Grrr16:56.43 
  Or modify an existing CropBox if there is one present16:56.53 
faLUCE kens: can you write again the link?16:57.25 
kens Ignore the link, its an accident16:57.36 
  You need to add a /CropBox to the page, or modify any exsiting CropBox16:58.00 
  Alternatively, go back to the source document, modify it appropriately, and remake the PDF16:59.15 
faLUCE kens: how can I modify the source doc?16:59.32 
kens Open it in the relevant application, and do whatever you have to in order to make the changes, how should I know precisely ? l have no idea what application wa used to create hte original.17:00.39 
faLUCE kens: I have to remove spaces of many pdfs from command line17:02.34 
kens Well, I'd start by berating however created them incorrectly17:02.57 
  Like I said, add a /CropBox to the Pages tree. If the files have multiple pages and each page has a CropBox you will have to modify each Page object17:04.03 
Robin_Watts faLUCE: Didn't you ask about this last week?17:07.29 
  kens: If I understand faLUCEs request properly, a cropbox will not do it.17:08.04 
  He needs to modify the Mediabox.17:08.11 
kens Robin_Watts : Possibly, its not clear at all from what he is saying17:08.23 
  And simply modifying hte MediaBox won't work, as the 0,0 will still be at bottom left, so the content won't shift.17:08.50 
Robin_Watts faLuce: Do you want to keep the page the same size and just restrict the area on it that is marked (so you get blank borders) or do you want to shrink the page ?17:08.55 
  kens: We've discussed that before, and I fear you're wrong.17:09.09 
kens If he wantsa to modify the content (and I can see no reason to do ths otherwise) then he'll need to set a fixed page size, set a BeginPage or Install procedure to modify the CTM by translating before rendering. Then run the whole thorugh pdfwrite to create a new PDF file17:09.48 
  Robin_Watts : possibly you're correct :-)17:10.07 
Robin_Watts There has to be a first time for everything.17:10.19 
kens With no example file, no clear explanation, and no GS command line, I'm fumbling in the dark17:10.29 
faLUCE Robin_Watts: I can have blank borders (then I will remove them with pdfcrop)17:10.31 
Robin_Watts I am unfamiliar with pdfcrop.17:11.03 
kens does caguely remember altering the MediaBox from 0 0 and being surprised by the result17:11.11 
  http://ghostscript.com/regression/cgi-bin/clustermonitor.cgi?log=log&machine=henrysi7&report=d368650e9f3e7e6e4af2d840ffa0dd1e161a9694&project=ghostpdlBut like I said, no example file, and no explanation of what is required to be altered.17:11.40 
faLUCE Robin_Watts: anyway, I can keep the same size and just restrict the area on it that is marked17:11.47 
kens Bahm stupid insert key17:11.47 
faLUCE how can I do?17:11.49 
kens Set a CropBox17:11.57 
Robin_Watts So how does pdfcrop work?17:12.37 
kens suspects it sets a CropBox :-)17:12.51 
Robin_Watts kens: That wouldn't remove the borders.17:13.06 
  I could believe it set the mediabox to the cropbox.17:13.17 
kens faLUCE : To be perfectly frank, if you want help, post an example file somewhere we can see it, then write a clear description of what you want it to look like afterwards. Then maybe we will understand what you are trying to do, and be able to help17:13.31 
Robin_Watts Or that it set the mediabox to the bbox of the marked content.17:13.37 
chrisl "-First, PDFCrop calls ghostscript to find the borders of the PDF's bounding box. Next, it determines the page orientation of each page of the PDF file. Finally, it calls PDFedit to crop and resize the pages."17:13.55 
faLUCE kens: Robin_Watts http://s000.tinyupload.com/index.php?file_id=21678900709178525082 <---- this is the file. I want to 1) split into two equals horizontal pages and 2) remove these black borders17:17.12 
kens I posted some code to Stack Overflow some time back for splitting pages up. In that case it was a 4x4 powerpoint presentation that the user wanted split into 4 single pages17:18.52 
  I imagine that you oculd reuse that code17:19.03 
Robin_Watts faLUCE: mutool poster will do the splitting for you.17:21.11 
kens is having trouble finding my answer.....17:21.25 
Robin_Watts mutool poster -x 2 in.pdf out.pdf17:22.03 
faLUCE Robin_Watts: it is not exactly the center and, in addition I need also to remove black spaces17:23.07 
Robin_Watts faLUCE: Well, mutool poster works by just setting mediaboxes. You could fiddle with the source of that :)17:24.07 
faLUCE Robin_Watts: do you mean that I can specify these args through cli?17:24.55 
Robin_Watts faLUCE: No. I mean you can fiddle with the C.17:27.01 
faLUCE Robin_Watts: this is weird... there should be an easier and faster solution17:28.13 
kens OK I found my PostScript program17:28.32 
  faLUCE : The fact that you *want* an easier solution doesn't mean there has to be one.17:28.51 
faLUCE kens: with imagemagick there should be a way17:29.06 
kens Imagemagick is an image manipulatoin program.17:29.37 
  Not a PDF manipulation tool17:29.43 
  Of course, what you actually have here is clearly an image wrapped up as a PDF file17:29.58 
  You could extract the image, then use a script-driven image manipulatoin package to modify the image. You could evne then probably re-export back to PDF17:30.31 
faLUCE kens: I could leave the wrapped image, no matter if the size of the file is big. But how can I modify the borderbox?17:33.29 
  kens: I mean, should I modify the header with a hex editor?17:33.55 
kens If you are extracting the image, you do it in an image manipulatoin program17:33.55 
faLUCE kens: let's try a solution without extracting the image17:34.15 
  how can I modify the borderbox?17:34.23 
kens There is no borderbox17:34.36 
  There are a series of boxes, including CropBox17:34.50 
  Ths won't help you if you want a PDF file with 2 pages, each of which is one of the pages in the origibal single page file17:35.10 
  Nothign you can readliy to to that file will turn it into a 2 page file.17:35.29 
faLUCE kens: no; i don't need a pdf with two pages17:35.42 
  kens: I can have two pdfs as well17:35.50 
kens Well what *do* you need ?17:35.55 
faLUCE kens: I need to generate, from the orig pdf, two separate pdfs with the borders that I said17:36.24 
kens Start by copying the PDF file17:36.43 
faLUCE kens: then?17:36.51 
kens Then modify the MediaBox of each17:36.51 
faLUCE kens: ok, and in order to modify the mediabox, what should I modify? the hex file?17:37.08 
  through a hex editor?17:37.13 
kens Any editor that does not mangle the binary17:37.26 
faLUCE but: is there a cli for that, instead the hex editor?17:37.49 
kens Warning, your first problem will be that you cannot add bytes17:37.51 
  A CLI for what ?17:38.07 
  Since you cannot add bytes, modifying the MediaBox is likely to be tricky17:38.21 
faLUCE http://linux.die.net/man/1/pdfcmb17:38.25 
kens Right, well use that then17:38.47 
  None of ths is relevant to Ghostscript or MuPDF mind you17:39.00 
  We are not a general purpose PDF support forum17:39.12 
faLUCE kens: I know, sorry, but I really did not know where to start and ask17:39.40 
kens TIme for me to go eat, goodnight all17:39.46 
faLUCE kens: there's not a #pdf chan17:39.53 
  thanks kens, for all17:39.57 
kens faLUCE : Try Stack Overflow17:39.58 
  faLUCE : One thing that occurs to me is that you could write somethign to read a PDF file, search for MediaBox, remove the lower left x,y and upper right x,y co-ordinates and replace them with ones you calculate. At the same time you could either modify or remove the Crop Box. You could write such a thing in C or probably a decent scripting language.20:30.42 
  Because PDF is a binsrty format, ths would break the PDF file. However, your files seem very simple, so you could use MuPDF to fix them afterwards.20:31.13 
  "mutool --clean broken.pdf fixed.pdf " I thnk is the correct incantation20:31.46 
Robin_Watts mutool clean broken.pdf fixed.pdf20:43.42 
kens Close....20:44.15 
marcosw_ mvrhel_laptop: you around?21:11.41 
mvrhel_laptop marcosw: yes21:12.16 
marcosw_ one of the icc testing command is:21:12.52 
  bin/gs -sDEVICE=ppmraw -sSourceObjectICC="./toolbin/color/src_color/objsrc_profiles_example.txt" -o test.ppm -f ./examples/text_graph_image_cmyk_rgb.pdf21:12.53 
  it produces this error:21:13.03 
  ./base/gsicc_manage.c:1098: gsicc_open_search(): Could not find cmyk_src_cyan.icc 21:13.03 
  + ./base/gsicc_manage.c:660: gsicc_set_srcgtag_struct(): setting of ./toolbin/color/src_color/objsrc_profiles_example.txt src obj color info failed21:13.04 
  | ./base/gsicc_manage.c:2777: gs_setsrcgtagicc(): cannot find srctag file21:13.05 
  I tried adding “-I./toolbin/color/src_color” but that didn’t help.21:15.16 
  never mind, I just saw your comment about copying the icc profiles.21:17.29 
mvrhel_laptop_ ok21:17.34 
marcosw_ mvrhel_laptop: no wait, that doesn’t help. they aren’t found in iccprofiles either. The have to be in ‘.’ to be found.21:20.27 
mvrhel_laptop marcosw_ : I had copied them into iccprofiles and then built, which puts them in the romfs21:21.11 
  if you want to put them in . and that works then that is fine21:21.29 
marcosw_ iccprofiles is searched when using the romfs but not otherwise?21:22.22 
  in any case, putting them in . works for me.21:22.40 
mvrhel_laptop good question. There probably needs to be a bit of work on the search paths for this sort of thing21:22.57 
  marcosw_: ok , well that will work for this testing21:23.26 
  bbiaw. need to go eat21:26.12 
marcosw_ mvrhel_laptop: also, all the slashes go the wrong way :-)21:29.18 
 Forward 1 day (to 2015/11/19)>>> 
ghostscript.com
Search: