Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2017/06/11)20170612 
gree303 hi @all14:12.03 
alexcher gree303: Hi, what's your question?14:19.50 
gree303 Hi alexcher, thanks for asking. I'm tryin to place a second layer into any vector based file format (requirements: cmyk + additional spot color). Any idea if ghostscript is capable doing so?14:26.38 
kens Depends entirely on what you mean I'm afraid, that isn't enough information to go on.14:27.37 
  <sigh> freenode kicked me off again :-(14:29.55 
gree303 I tried it with eps and inkscape; also tried imagemagick with multilayer pdf/eps, but both options won't accomplish the task. that's why I'm here to ask if ghostscript can handle multiple layers. 14:30.19 
kens Sorry I'm not trying to be awkward but its unclear to me what you are asking for.14:30.54 
  'layers' could mean many things, depending on the file format.14:31.10 
  You can only send PDF or PostScript to Ghostscript directly.14:31.23 
  For vector outpur formats you can get PostScript, PDF, XPS or PXL with varying degrees of success, depending on the input.14:32.05 
  You can defer page emission until specific criteria are met, this means that you can 'combine' or 'overlay' content on top of existig content.14:32.51 
  THis could be considered a 'layer'14:33.01 
  Then there are 'layers' in Photoshop. Our Photoshop output doesn't allow for creation of those.14:33.22 
  Then there is 'optional content' in PDF which is often (,isleadingly) called 'layers', most notably by Acrobat.14:33.47 
  So perhaps rather than asking for 'layers' it might be easiest if you describe what you are trying to achieve14:35.13 
kens will be back in a moment, feel free to comment and I'll read it when I'm back14:36.17 
gree303 hi kens, thanks for the note. with 'layer' I refer to photoshop/illustrator based layers. but not like the svg-layers, which are sub-based-layers. in detail the additional layer will be used as 'CutContour' Layer, as extra seperated layer above the 'background' layer. Furthermore the CutContour has to be in a certain color (spot color/cmyk). My 'background' design is based on a single-layered SVG image. For further steps within printing proces14:41.32 
  to be added as an additional layer above the 'background'-layer. Exported vector format has to support cmyk/spot colors and multiple layers ( like in "photoshop/illustrator"). Many thanks ahead.14:41.32 
  @kens, me too - I will be back within 1hr - thx14:42.16 
kens Well, we don't output Photoshop layers, and we don't write Adobe Illustrarot .ai files. So we can't do anything for you which relies on those.14:42.55 
gree303 just as an example, doesn't has to be ai/psd file at all. I thought of eps.14:43.29 
kens You can readily enough add cut/register marks, and they can easily be in a /Separation (spot) colour. Provided you output to PDF or PostScript (EPS is a subset of PostScript of course).14:44.08 
  But that wopn't be a 'layer', at least not in PostScript, since PostScript has no concept of layers.14:44.58 
gree303 are you talking about vector based pdf's? this might be the answer. imagemagick isn't capable of processing vector pdf's. 14:45.20 
kens You *could* I think create the cut/register as Optional Content in a PDF file using pdfmark operations. I'm not certain we support all the pdfmark operations you would need, I'd have to check14:45.58 
gree303 sound promising, could you pm or mail me if you find time? thx14:46.33 
kens ImageMagick is an 'image' (ie bitmap) tool, so not it can't deal with PDF files, it uses Ghostscript to render them to an image14:46.34 
  I'd suggest you look at the Adobe pdfmark reference14:46.56 
gree303 ic, ok, so maybe using sub-layers from SVG files. I'll rethink the entire process and also have a closer look into gs. and also look into adobe pdfmark14:47.10 
kens http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/pdfmark_reference.pdf14:47.17 
  You would process the original file (so it would have to be PostSciript or PDF) then use an EndPage procedure to add the Optional Content using pdfamrk operatiosn, I woudl expect14:48.04 
  THis isn't going to be trivially easy by the way14:48.13 
  Its going to mean some PostScript programming to get it to work14:48.27 
gree303 i'll need some time to get into this. thx for now - sound very promising. 14:49.08 
  (s)14:49.10 
kens NP14:49.15 
miqlas Hi Guys15:58.04 
  I try to get ghostscript compiled on Haiku, but i always hit the walls with top speed :S15:58.50 
  If nobody minds, i would like to explain the situation, maybe somebody already had this fight and can have some constructive ideas.15:59.57 
kens chrisl is our buil expert, but go ahead16:00.15 
miqlas so i took the latest gs sources and extracted it.16:00.16 
  i use haiku x86_64, latest version with all the required stuff, auto*, make, gcc 5.4 and the supporting shared libs like jpeg, tiff, libz, and so on.16:01.20 
kens I'd start by not using the shared libraries myself, just use the ones shipped with GS.16:01.45 
miqlas did a configure with --prefix=/aniceplaceforgs16:01.46 
kens But I guess it maybe is easier ot have the already supplied shared libraqries rather than porting those too16:02.02 
miqlas kens, i tried, but plenty provided in-tree sources are just a vanilla sources, and they don't have the reuired haiku supporting patches, so it breaks really early. that's why i would like to build it with syslibs16:02.44 
kens Yeah well the GS supplied sources aren't ported to Haiku for sure16:03.01 
miqlas So i just renamed every intree sources, what i got as shared libs on haiku.16:03.05 
kens Though dome of them do include GS-specific patches16:03.17 
miqlas ouch, it could be a problem for sure16:03.35 
chrisl lcms is probably the biggest headache on that front, just now.16:04.03 
kens No GS will operate with (reasonably up to date) versions of the standard libraries, but with some limitations16:04.10 
miqlas So i just renamed freetype, jbig2dec, lcms2, libpng, openjpeg, tiff, and zlib flders, so the configure script won't find them and will use the system provided ones.16:04.53 
  it went really far16:05.03 
  but then it complains that "compress" undefined reference.16:05.49 
chrisl That's zlib16:06.03 
miqlas compress is exported by libz, and as i renamed the zlib folder it should use the system provided one.16:06.28 
  so i have no idea what went wrong.16:08.04 
  tried to configure it with LDFLAGS="-lz" but no dice16:08.19 
chrisl Was the -lz missing in the first place?16:08.43 
miqlas the gs build tool is really complex for my eyes, so i have no real idea, what it does. LDFLAGS="-lz" not helps, for sure16:09.40 
  But i see it in my top-level makefile:16:10.23 
  "LDFLAGS=-lnetwork -lz $(AC_LDFLAGS) $(XLDFLAGS)"16:10.25 
  (-lnetwork is like -lsocket in Haiku)16:10.40 
chrisl Clearly, use a different name just to confuse every one......16:11.13 
miqlas ofc :) unorthodox, you know :)16:11.59 
  and to break every *nix stuff, what doesn't know about our fetish.16:12.32 
  so libz exports this (objdump -x output):16:13.27 
  0000000000002cee g F .text 0000000000000038 compress16:13.29 
chrisl In your top makefile, search for "AUXEXTRALIBS" and add -lz to that16:13.30 
miqlas i suppose this is the stuff what required16:13.40 
  chrisl: okey!16:13.57 
  building...16:14.58 
  will take some minutes as i just reconfigured the whole stuff :(16:15.31 
  i think i should buy an i7 laptop to make my ports...16:20.58 
  Ok, it died here: https://0x0.st/IEa.txt16:23.26 
  -lopenjp2 i think16:23.34 
  oh, snap, it is already in AUXEXTRALIBS16:24.02 
chrisl Yeh, you might want to reinstate our opj sources, and see if it works16:24.25 
miqlas here is my top-level makefile: https://0x0.st/IEM.txt16:24.33 
  opj? you mean the in-tree stuff?16:24.52 
chrisl Yeh16:24.59 
miqlas eeeh :)16:26.17 
  reconfiguring...16:26.52 
chrisl That looks like all the openjpeg symbols we call, so it's it's finding the lib at all16:27.19 
miqlas but i have no idea if my battery can do so much, i already built the whole stuff 3-4 times today...16:27.49 
  reconfigured, added the -lz to EXTRALIBS, make running16:30.12 
chrisl AUXEXTRALIBS != EXTRALIBS16:30.47 
miqlas are you sure? i see here "AUXEXTRALIBS=$(EXTRALIBS)"16:31.58 
chrisl They *can* be the same, they are not necessarily the same16:32.32 
miqlas in this special case it seems they are the same for me, but ofc i can be wrong too16:33.29 
chrisl They are generally only different for cross compilation. Adding -lz to AUXEXTRALIBS in this case is a workaround16:34.20 
miqlas i got an objdump output, for me it seems it got all the required symbols, for what the compiler complained i nthe earlier run: https://0x0.st/IEe.txt16:35.39 
  i think i wil lreanme or compiler to complainer16:35.59 
  * i think i will reanme our compiler to complainer16:37.24 
  omg, it finished without error16:37.52 
chrisl So, for some reason, the openjpeg lib didn't work16:38.18 
miqlas chrisl: it was crazy, because if i used the in-tree zlib, then it complained about openjp2, if i used only the in-tree openjp2, then it complained about zlib, if i used booth in-tree, then it complained about openjp2, so i had no idea, what should i do.16:40.36 
  but thanks, it looks better now :)16:40.43 
chrisl Well, to explain.....16:41.05 
miqlas i should use make soinstall now, right?16:41.27 
chrisl Er, did you "make so"?16:41.43 
miqlas nope.16:42.09 
  i did just make16:42.13 
chrisl Well, there isn't a so to install16:42.20 
  You've built an exe16:42.31 
miqlas it seems it trying to rebuild everything... again...16:43.18 
chrisl It will, yes16:43.37 
miqlas ouch16:43.41 
  ok, i got a cold beer, no problem16:44.09 
  but if it isn't ok to do make soinstall, then please let me know, because i don't think my battery can survive yet another run16:44.58 
chrisl Well, TBH, since I know almost nothing about Haiku, it's rather hard for me to guess whether it'll work or not.....16:45.52 
miqlas then let's see! adventure time!16:46.41 
chrisl So, we have to build some utils for use during the build: echogs, mkromfs, genarch and genconf. These are *only* used during the build.16:47.35 
  Your original zlib failure was because the mkromfs build didn't get the -lz parameter (although the final Ghostscript link would have)16:48.26 
miqlas oh, did i found a bug in gs?16:48.47 
chrisl Yep16:48.53 
miqlas see? unorthodox :)16:49.04 
  should i create a bugreport?16:49.19 
chrisl No, I have a solution here - I did a major rework last year to better support cross compiling, and I just left a small thing out16:49.57 
  But thanks16:50.23 
miqlas cool, can we have this fix in the next version?16:50.29 
chrisl It will be in the next release16:50.42 
miqlas oh, snap: https://0x0.st/IEV.txt16:51.05 
  make soinstall wasn't a great idea.16:51.15 
chrisl I don't really understand why there should be an undefined reference to "main" when creating a library16:52.24 
miqlas but it seems "make install" does the magic, i already got a 20mb gs executable16:53.11 
chrisl Yes, you have an executable, but I assumed you wanted a library because you asked about make soinstall16:53.46 
miqlas nope, i want the executable :)16:54.37 
chrisl Oh, well, you should have said ;-)16:54.50 
miqlas Ladies and gentlemans: https://0x0.st/IE4.txt16:55.46 
chrisl Cool16:56.08 
miqlas is there any way to test it?16:56.54 
  generate a pdf or something like that?16:57.05 
chrisl gs -sDEVICE=pdfwrite -o stuff.pdf -c showpage16:57.26 
miqlas btw, the gs fonts are missing, but i already made a recipe for them16:57.30 
chrisl The gs fonts are *not* missing, according to your build output16:58.11 
miqlas well, i got an empty pdf16:58.15 
chrisl That's what I'd expect16:58.29 
miqlas chrisl: you mean this? " /usr/lib/DPS/outline/base : /usr/openwin/lib/X11/fonts/Type1 : /usr/openwin/lib/X11/fonts/TrueType"16:58.52 
chrisl No, I mean: https://0x0.st/IEV.txt16:59.08 
miqlas it is an error, so what should i see there?16:59.34 
chrisl The top few lines there are the last few gs font files being built into the romfs16:59.52 
miqlas oh, ok, sorry for the misunderstanding.17:00.34 
chrisl NP, some of this stuff is *far* from obvious!17:00.49 
miqlas i never thought it will compile some fonts into the binary, but yeah, makes sense17:00.55 
  now i got a gs executable, it works (theoretically), so i can go and take over the world, right? 17:01.22 
  nope, i have to make a proper recipe for gs first17:01.44 
chrisl Here's patch for the zlib issue: http://git.ghostscript.com/?p=user/chrisl/ghostpdl.git;a=commitdiff;h=284f5fe121d17:02.48 
  FWIW, I tried a build linking against the system open 2.1.2 here, and it ran to completion17:04.53 
miqlas chrisl: thanks!17:05.13 
chrisl But I'm still confused about why building a shared library should complain about a missing main symbol17:05.39 
miqlas chrisl: i just tested ghostscript with this sample file: https://www.pa.msu.edu/people/perkins/testps/samplec.ps17:05.39 
  got this: https://0x0.st/IEw.pdf17:05.50 
chrisl There are also files you can test with in the "examples" directory in the source tree17:06.27 
  But the truth is, just spitting out that "empty" PDF you did first exercised a *hell* of a lot of the code in there, so.......17:07.49 
  The only bit you haven't really touched at all is the rendering17:08.18 
miqlas i tested some examples, all of them looks ok for me, so i think it working correctly17:09.20 
chrisl Did you do other outputs than PDF?17:09.51 
miqlas i did the tiger, the doretree and the alphabet examples, looks ok17:09.54 
  what else could i have?17:10.04 
  maybe there is plenty other options, but i know almost nothing about gs yet17:10.30 
chrisl jpeg, pnm, tiff, lots and lots17:10.46 
miqlas also with ps2pdf?17:11.18 
chrisl No, ps2pdf outputs pdf, it's just a shell script that calls Ghostscript17:11.43 
miqlas i don't think so17:11.44 
  so should i call gs directly to generate jpeg?17:12.29 
  doretree looks nice: https://0x0.st/IEY.pdf17:13.06 
chrisl Yes, you'd do "gs -sDEVICE=jpeg -o out%03d.jpeg <input file>"17:13.15 
  So, when you posted the output from gs -h, that included a long list of "devices" which are all the output options you have in your gs executable17:14.49 
miqlas works!17:14.51 
  thanks for your help, i will do a recipe and send the haiku patches to gs17:15.14 
  but i have to go now17:15.18 
  bye and thanks again17:15.23 
chrisl NP17:16.01 
 Forward 1 day (to 2017/06/13)>>> 
ghostscript.com #mupdf
Search: