Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2016/11/28)20161129 
MacWinner i'm using gcc version 4.8.2 20140120 (Red Hat 4.8.2-15) (GCC)00:00.27 
  seems to be related to the mupdf-gl tool. I dont think I use this unless it's linked into mutool somehow.. maybe I can just build without it00:05.35 
  just did make HAVE_GLFW=no, and it seems to skip over it00:10.18 
norbertj hello guys, I tried to build (on windows) with the cmdline: nmake -f psi/msvc.mak WIN64= XCFLAGS=-DPSI_INCLUDED DEVSTUDIO= gpdl07:17.52 
  but running the executable bin/gpdlwin64.exe fails with segmentation fault. Doing same with WIN64= replaced with WIN32=1 (as in de VSproj) works ok.07:18.49 
  note: building with the VSsolution and then running executable works (both 32 and 64bit).07:19.26 
  perhaps because of the extra PreprocessorDefinitions="WIN32;NDEBUG;" for the x64-solution build in ghostpdl.vcproj?07:21.32 
faris_ Hey! Is the search broken in 1.10a version on iOS?12:15.22 
  Has anyone had a problem with that after upgrading to the latest version released yesterday?12:16.00 
kens norbertj for the logs. Everyone is travelling today, but I'll ask Chris to look into the build problem when he gets here.13:06.49 
norbertj kens: no worries, no hurries. I just noticed it. And I can always use the solution to create a working executable, but as I use vs2015 for git-pull I always have to stash the windows.14:24.20 
ray_laptop norbertj: (for the logs) You didn't mention which version VS you were using (not that I saw), but I tried with VS 2015 (Visual Studio 14.0) and I see a crash14:59.02 
  :-(14:59.06 
  norbertj, chrisl: (for the logs) when I build with the VS 2015 using the Solution file, gpdlwin64.exe (release build) works fine. Whew!15:19.24 
  so it appears that building with nmake is the problem. I'll continue to look at it.15:20.24 
  for the logs, email sent to Norbert, cc support15:26.37 
  norbertj: (for the logs) I shifted our discussion to email if that's OK16:07.19 
deekej hello guys, I have a question - would it be possible to add COPYING or LICENSE file into urw-base35.zip archive?16:36.30 
  it's present in git repo, but not in the archive... Should I create BZ request for it?16:36.54 
radistao Hi, could some ghostscript/postscript guru help me in the question:23:07.30 is it possible to call gs with postscript not as file, but as a string argument?23:08.04 more details here:23:08.14 http://stackoverflow.com/questions/40855044/run-ghostscript-gs-with-post-script-as-a-command-line-argument-but-not-a-file23:08.14 following this doc: http://www.ghostscript.com/doc/9.18/Use.htm#Input_control23:09.11 20:09.31 
  but i can't understand how to split the .ps file (13 lines) to those tokens20:10.06 
ray_laptop radistao: oh, good, you are still here20:14.37 
radistao "oh, good" or "oh, god" ? :)20:15.59 
ray_laptop gs can accept strings or just raw PS (subject to shell restrictions) as command line arguments using the -c option to begin arguments via the PS interpreter20:16.10 
  for instance gs -c "(Hello World) = quit" is the same as gs -c "(Hello)" "( World)" = quit 20:17.21 
  arguments (which may be arbitrary length strings) are fed to the interpreter20:17.54 
radistao ok, so, "= quit" should be always at the end?20:18.46 
ray_laptop everything (EVERYTHING) following the -c is fed to the interpreter (possibly after the shell finished mangling it) up until the first argument that starts with '-'20:19.16 
radistao let's say i have such ps file:20:19.27 
ray_laptop -f is often used, but any option suffices, such as -q20:19.39 
radistao << /EndPage { exch pop 2 lt { gsave ....... {false} ifelse } bind >> setpagedevice20:19.56 
  i should make now:20:20.08 
ray_laptop radistao: if you have a PS file, just put the filename as an argument. gs can take ANY number of files as input, and when it finishes with one, it starts the next20:20.37 
radistao gs -c " << /EndPage { exch pop 2 lt { gsave ...... {false} ifelse } bind >> setpagedevice = quit"20:20.37 
  but that's exactly my problem:20:21.02 
  i need to avoid file20:21.09 
ray_laptop radistao: well, you don't want '= quit' '=' is a PS operator that prints the object from the top of the stack and 'quit' is an operator that tells gs to exit20:21.46 
kens Why do you need to avoid a file ? The PDF file will already be a file after all20:22.14 
ray_laptop radistao: but yes (assuming that your shell doesn't mangle anything inside the " ... " ) you can do this20:22.50 
radistao gs -c " << /EndPage { exch pop 2 lt { gsave ...... {false} ifelse } bind >> setpagedevice" -f inputFile.pdf20:23.02 
ray_laptop radistao: but where is the actual input file coming from20:23.07 
  radistao: if you have inputFile.pdf why can't you have watermark.ps as a file ?20:23.40 
kens ray_laptop : from the SO quation, the input is a PDF file20:23.42 
ray_laptop kens: right, so just gs ... watermark.ps inputFile.pdf20:24.19 
kens And indeed, this was my question, I don't see what the gain is from using -c/-f over a file20:24.21 
radistao http://stackoverflow.com/questions/40855044/run-ghostscript-gs-with-post-script-as-a-command-line-argument-but-not-a-file20:24.25 
  this is the question itself20:24.33 
kens radistao : I alredy chimed in on that question (unless you've added more)20:24.42 
ray_laptop radistao: yeah, we saw that. So you _CAN_ do it using -c but you don't need to20:25.00 
radistao you are one of those who answered?20:25.38 
kens Note that if you are using Ghost4J you will need to open source your code.20:25.40 
  radistao : yes20:25.46 
radistao ah, now i see, Kens :)20:26.05 
kens Yes, that's me20:26.10 
ray_laptop radistao: now if you were piping the input from someplace and wanted to avoid having a file for BOTH inputs (using the gsapi_run_string interface), I could see it20:26.12 
kens As I (and now Ray) have said, its entirely possible to use the code with -c, but I don't see the point20:27.05 
radistao actually, i use not just GS command line20:27.15 
ray_laptop but if you can have the inputFile.pdf on the file system, I don't know why you can't have the watermark.ps on the file system as well, but just use -c (and be happy)20:27.25 
radistao but i call java library from java application20:27.33 
  let me try....20:27.44 
kens radistao : I know you said you are using Ghost4J, but you can us a file spec fr that. Or if you cna't, then your PDF input won't work either.20:28.08 
radistao am i right that new lines in Post script may be easily replaced with spaces?20:28.38 
  the problem of file is:20:28.44 
kens Yes, all white space is equivalent20:28.55 
ray_laptop radistao: RTFM, but yes20:28.56 
  radistao: the PostScript Language Reference Manual is HIGHLY recommended20:29.29 
radistao yeah, i tried it20:29.59 
  900 pages is out of my facilities20:30.18 
ray_laptop and http://http://www.ghostscript.com/doc/current/Use.htm20:30.34 
  oops -- http://www.ghostscript.com/doc/current/Use.htm20:30.40 
  chatzilla added something20:30.53 
kens radistao : you only need the wjole spec if you want all the details, the syntax is all you need when you're using code supplied elsewhere (by me ;-)20:31.19 
radistao that i read as well - there is no even one simple example though20:31.21 
kens Given that Ghostscript is a PostScript interpreter, we assume some familiarity with the language20:31.49 
  If we were writing a Java interpreter we wouldn't feel the need to write simple Java examples either20:32.12 
ray_laptop radistao: just read the first part about the syntax and stack, then skip to the EndPage section and look up non-obvious parts of your EndPage proc. Otherwise, you (IMHO) are just dangerous20:32.22 
kens ray_laptop : the EndPage stuff is cribbed from another answer I posted on SO. Used verbatim its OK20:33.08 
  I still cannot see why using it from a file is a problem20:33.21 
ray_laptop cutting and pasting what you don't understand can be harmful to your users20:33.24 
  kens: you and I know it's OK, but radistao doesn't20:33.45 
radistao i know, but i don't have a choice, unfortunatelly20:34.08 
kens You still haven't said why you can't use a file20:34.22 
ray_laptop I've seen some pretty horrendous "examples" on the net (not from you)20:34.33 
radistao because i want to distribute the application without additional file20:34.56 
  now the app is "all in one", but mark.ps must be included when i run the command20:35.24 
kens radistao : if you want to distribute the application, you do understand you will need to open source your application ?20:35.28 
ray_laptop kens: that's probably how the Cairo PDF backend came about, and we both know what a steaming pile that is20:35.35 
kens ray_laptop : some of my posts on SO are not pretty, but I warn the users in that case :)20:35.59 
ray_laptop radistao: if your app can read "mark.ps", then you can just pass that same filename to gs to process20:36.25 
kens radistao : ng more than a single file.I also don't see how you intend to supply GS wiithout hav20:36.38 
  bah chat mangled my text20:37.40 
ray_laptop kens: and I admit I've done some hackish PS in my day as well (more often for customers, not wanting it to get spread as much as SO does)20:37.48 
kens I don't see how you can distribute a AGPL compliant app with only 1 file. At the very least you need to supply a copy of teh AGPL, and some means whereby the user can download the source code, usually a readme wth a link20:38.32 
radistao ok, looks like after that i should stop working on the project - it appeared to be much more sophisticated than i expected....20:40.21 
ray_laptop radistao: so, if the file isn't present, you don't put the filename in as an argument. Can't be any more difficult than reading the PS file and stuffing it in as arguments following -c20:40.59 
  unless this is an assigment for a class and the instructor told you to do it a certain way ;-)20:42.13 
kens radistao : you can work around all these restrictions (help files, licence built into the app etc), but I want to be sure you understand the restrictions of working with the AGPL20:42.15 
ray_laptop (in the forlorn hope of having students learn)20:42.28 
kens Ghostscript is 'open source' not 'free'. There are restrictions on what you can do with it20:42.46 
  without a commercial licence at least20:43.23 
ray_laptop free of $$$ cost, but NOT free of meeting license requirements20:43.36 
  but if someone pays $$$ for a license, then they can distribute under different license terms (not AGPL)20:44.30 
radistao ok, i see - i should read more about the license...20:44.54 
ray_laptop radistao: basically if your Java app loads a gs shared_object/dll (or invokes it) and is informed that the 'gs' is distributed under the AGPL and provided with a copy of the license, and how to get full source for gs then the user can replace the gs so/dll with an updated newer/fixed/customized version20:48.31 
radistao and?20:49.08 
  i mean what harm if user uses his own gs lib?20:49.37 
ray_laptop radistao: the best way to insure that you are "legal" is to not distribute gs, and have the user download it from ghostscript.com 20:49.40 
kens The user needs to be informed tht part(s) are AGPL licenced, a copy of the AGPL needs to be included, and the user needs to be told where they can go to replace it.20:49.45 
  radistao : the harm is that people could otherwise include GS in paid-for applications which do very little but leverage their entire functionality off Ghostscript without paying anything towards the cost of maintenance support and engineering20:50.56 
ray_laptop radistao: exactly, users have the right to use their own gs lib, which is freely distrbuted (by us and others in an AGPL compliant fashion). It's only when it is statically linked into an app that you have to make sure they can re build the app (from source) with all the GPL/AGPL components that were built into your app20:51.27 
radistao if they download gs?20:51.28 
kens The AGPL doesn't entirely prevent that, there are some quite large companies who are free-loaders but it makes it harder, and means is more obvious that peope are being asked to pay for something which is mostly the work of others, and avilable free of charge.20:52.07 
radistao damn, it became super complicated now ((20:52.19 
kens ray_laptop : I believe Miles' position includes the DLL, so if you link to that you have to be AGPL compliant20:52.37 
  radistao : the easy solution is to open source your code under the AGPL, then you are compliant20:53.06 
ray_laptop radistao: so if your app doesn't include gs, you are compliant. If you distribute gs, you must do so in a compliant fashion which means that users that get your package MUST be offered source that lets them replace the 'gs' portion20:53.09 
  kens: I thought Miles drew the line at distribution -- if you distribute the DLL/so you must be compliant. Otherwise linux apps that use gs would not be compliant20:54.40 
kens ray_laptop : Not sure. Anyone who gets that far usually just forks a process20:55.08 
ray_laptop the key is informing users of the license, and how to get source and how to upgrade to a newer gs20:55.34 
  kens: and we've had little or no traction with people forking a process. But it the process is not just stock gs or is distrubted "bundled" in an app, we have enforced the AGPL20:56.46 
kens If its distributed then we certainly can enforce AGPL. The large infrigers usually just incude instructions on downloading Ghostscript.20:57.58 
ray_laptop basically, if you have AGPL gs on your system, any app can use it, whether or not it is AGPL20:58.06 
kens Whic at last makes it obvious they are free-loading, and means that people can't yell at us when we tell them they have no support from us for the product they paid for ;-)20:58.45 
ray_laptop in fact, one problem our OEM customer used to have is that sometime (particularly on Windows) they would inadvertently run GPL Ghostscript which may not be their customized version20:59.28 
  on Windows, the registry based params would get zapped. We've had to make sure that supported customers know to customize their key entries21:01.18 
 Forward 1 day (to 2016/11/30)>>> 
ghostscript.com
Search: