IRC Logs

Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2015/08/09)20150810 
sebras kens: mornings kens.05:32.37 
  marcosw: I was unsure whether you would receive my mail. I thought that ghostscript.com and artifex.com were both served by the same amazon vps, but later I discovered that this is not the case.05:37.36 
RobinFone morning all.06:14.53 
  i have massive problems getting the irclogs here.06:15.21 
  almost makes me suspect a flaw in the webserver/dns config.06:15.58 
lilltiger Is there a way to tell gs to convert strokes to strokepath's, like illustrators "Expand" feature?07:28.56 
kens To07:29.03 
  Not really07:29.09 
  You could redefine the PostScript operator, but that's pretty much it07:29.25 
  I'm not sure what it would achieve, except using the fill rule instead of the stroke rule for pixel inclusion07:30.39 
lilltiger Is there any handy documentation on how to do that so I could try it, too see the result?07:32.24 
kens Its PostScript......07:32.38 
  "/stroke {strokepath fill} bind def"07:32.57 
  Right, that's the dumbcluck from Oracle sent off with a flea in his ear.07:35.43 
  lilltiger : You'll either need to send that PostScript as a command line with teh -c and -f switches, or add it to the PostScript file you are sending to Ghostscript (at the top!). Be aware that its possible for PostScript files to dig the original definition out of the system dictioanry if they think you are trying to do somethign like this, whch might mean your changes have no effect.07:37.01 
  If you have an example file I could take a quick hack at it.07:37.34 
lilltiger kens: sure, just going to upload it07:39.42 
kens OK07:39.56 
lilltiger kens:http://www.lilltiger.se/annat/MTG.pdf07:42.37 
kens OK give me a minute07:42.43 
  Oh, you're starting with a PDF07:42.54 
  That's much more tricky07:43.04 
  You need to alter teh PDF interpreter, not the PostScript definition07:43.19 
lilltiger kens: yes, and EPS files etc, it's for importing into a webtool that uises SVG and the issue is the strokes dosent scale corectly in these tools :/07:43.39 
kens EPS is much easir, PDF not so much07:43.50 
  These are two different page description languages07:44.17 
lilltiger kens: but converting the PDF to PS or EPS first should be the same right? as i have to make the conversation anyway07:44.25 
kens There isn't going to be a 'one size fits all' solution07:44.27 
  OMG do *NOT* do multi step conversions, the likely loss in quality is problematic07:44.52 
  Why do you have to convert PDF to EPS ?07:45.09 
lilltiger kens: not sure I have too, what I do need is "-dNoOutputFonts" and then output it to PDF without strokes, and the inputformat can be of meny different types07:47.20 
kens SO you are converting the EPS to PDF ?07:47.44 
  I'm confused by your workflow, but I must warn you that passing through conversions multiple times will likely lead to problems.07:48.22 
lilltiger or PDF to PDF07:48.24 
kens Really, don't do that without an *extremely* good reason07:48.43 
lilltiger I know that :/ but the users will be "resellers" that just get a logo and have no idea how to convert stuff at all, so I need to make it as good as possible. And if the visual result is not good enought then they will in turn contact thire supplier.07:50.39 
kens Oh there's another potential problem with PDF, the stroke and fill colours can be different, at the same time07:50.41 
lilltiger And the results right now is quite good, except when scaling07:50.55 
kens So if you stroke the path it will use the stroke colour, if you conert to a path and then fill, you mmight get a different colour.07:51.21 
lilltiger kens: cant i just convert the stroke part to a path then use the old stroke color for it?07:53.15 
kens If you look in ghostpdl/gs/Resource/Init/pdf_ops.ps You will find this :07:53.18 
  "/S {07:53.18 
  OFFlevels length 0 eq {07:53.18 
  setstrokestate .swapcolors /stroke fsexec .swapcolors07:53.18 
  } {07:53.18 
  newpath07:53.19 
  } ifelse07:53.19 
  } bdef"07:53.20 
  lilltiger : not in a standard PDF itnerpreter no07:53.33 
  You might be able to change the /stroke to "strokepath /fill"07:54.20 
  Well, it seems to work07:55.54 
  The results seem identical at 72 dpi mind you07:56.22 
lilltiger with the last code you posted?07:57.06 
kens What OS are you on ?07:57.20 
lilltiger the converter runs on linux07:57.32 
  and calls gs with a system call in php07:57.52 
kens chrisl we use the romfs on Linux by default now ?07:57.55 
chrisl *We* do, but no distro that I know does07:58.32 
kens OK so manually hacking pdf_ops.ps shoudl work ?07:58.45 
chrisl It should, yes07:58.56 
kens lilltiger : you'll need to find out where GS is installed, then in the Resource/Init subfolder edit the pdf_ops.ps file07:59.34 
chrisl What distro is it?07:59.48 
lilltiger archlinux07:59.56 
  /usr/share/ghostscript/9.16/Resource/Init/pdf_ops.ps08:00.09 
kens Find the code I put above and alter it to:08:00.12 
  "/S {08:00.12 
  OFFlevels length 0 eq {08:00.12 
  setstrokestate .swapcolors (using strokepath) == flush strokepathh /fill fsexec .swapcolors08:00.12 
  } {08:00.12 
  newpath08:00.13 
  } ifelse08:00.13 
lilltiger locate said there08:00.14 
kens } bdef"08:00.14 
  But note that when I run that with your file, it doesn't execute stroke at any point08:00.41 
  Decompressing the PDF file, its all fill operations and an image08:01.31 
lilltiger hmm, strange the borders around the logo should be strokes.. hmm or did i accidently send the one that was expanded already08:01.37 
kens THe PDF is produced by Illustrator, and stil contains the Illustrator file within it.08:03.17 
lilltiger nope, it was the right file08:03.43 
kens Well I see no stroke operations08:03.56 
  Even in the original; Illustrator file08:04.26 
lilltiger Yhee, could it be the clippath that is turned into a path when i make it into a svg08:04.52 
  so the issue might be bigger then just strokes08:05.07 
kens There's a rectangular clip, not sure if there are others08:05.38 
  clippath is a PostScript operator, I don't thnk there's a PDF equivalent, it simply has clip I bleive.08:06.11 
lilltiger Theer are 2 things in the logo that works the wrong way, one around the yellow area and one around the black08:06.22 
kens Your yellow area is a rectangle, the black border appeas to be integral to it08:07.42 
lilltiger kens: well, hard for me to translate it properly, clipp-group might be the name in illustrator08:07.44 
kens No point in givcing me Illustrator terms, I have no idea about it, just the page description languages :-)08:08.08 
lilltiger And I know nither :/ hehe08:08.32 
kens You have :08:08.49 
  a yellow rectangle with a black border (not yet sure how ths is constructed)08:09.07 
  An image (backhoe) on top of it, in black and a 'cog' shape also in black which apperars to be a series of filled shapes08:09.43 
  a black rectangle08:09.52 
  On top of that, three letters in whte08:10.02 
  Two sets of text, one in black and one in yellow08:10.11 
  OK your yellow rectangel is using the 'B' operator08:12.01 
lilltiger yes, the yellow one the border needs to become a path that is filled like if it was a border, and it's the same for the black area with the 3 letters in it08:12.07 
kens WHich is a conbined 'fill and then stroke'08:12.19 
lilltiger Ok, so there might be alot of different things that makes 'strokes' and it would be very hard to convert all thoes cases to paths with fills?08:14.12 
kens So in pdf_ops.ps you also nee to find the definition of the /B operator and apply the same change as for /S08:14.17 
  There are several ways to stroke in PDF, you would need to cover all of them (eg there's a B* which is an eofill followed by a stroke, rather than a stragith fill)08:15.10 
  Well, that caused an error in the PDF interpreter.....08:17.05 
  ah, typo08:17.30 
  Yes that seemed to work08:17.41 
  You'd need to do that for S, s, B, b, B* and b* and the list gets longer if you want to deal with text as well08:18.52 
lilltiger text do seem to work fine when i use "-dNoOutputFonts"08:20.59 
kens Well that'll change the text into a sequence of paths. I must admit I'm not entirely sure what will happen if you use a PDF as inptu when the Text rendering mode is non-standard.08:21.58 
lilltiger but I have not testat with text with a stroke right, hmm that might cause issues08:22.02 
kens There are 8 different text rendering modes08:22.38 
  fill, stroke, fill then stroke, neitehr fill nor stroke, fill and add to path for clip, stroke, add to path for clip, fill then stroke then add to path for clip, and aadd to path for clip08:23.08 
  I haven't tested the 'NoOutputFonts' code with any of these08:23.47 
lilltiger Maybe it is just easier to have an instance of Illustrator runing and use it for all the conversations, I will have to do that for .ai files, but wanted to avoid it when using .pdf's and .eps's.08:23.53 
kens If you have to do it for anything, you may as well use it for everything.08:24.21 
lilltiger well, i think the illustrator way is slower and wouldent scale very well if the userbase grows08:25.15 
kens What you're talkign about doing with Ghostscript is kind of hacky, and as likely to break stuff as fix it, I'd have thought.08:26.07 
  Better to get the input right in the first place......08:26.18 
lilltiger I wish I could demand a certain input from the customers, unfortunally that is not an option :'(08:27.18 
kens Sadly, it never is......08:27.28 
kens needs coffee08:27.51 
lilltiger right now I use gs to fix the fonts to paths and the colors to rgb, then inscape to turn the pdf to svg, then cairo to enforce the dpi of the svg.. sounds awfull but works very well with all testcases except for this stroke issue. And it does not handle new .ai-files only old ones.08:30.14 
chrisl lilltiger: what do you mean "enforce the dpi of svg files"? svg is vector, it doesn't have a "dpi".....08:33.27 
  And I suspect the difference with the ai files isn't the age, but whether they were saved with the "pdf compatibility" option08:34.07 
lilltiger chrisl: I know, but it's the viewport option in the SVG that needs to be normalized to the same relation to as the other svg's as they get componded. And cairos -d switch does that08:36.18 
chrisl FWIW, it sounds like it should all be achievable with Illustrator.....08:37.14 
lilltiger chrisl: Not only that, in older .ai formats one could just inject a header and it could be handled as a pdf, but with never that is no longer possible08:37.42 
  chrisl: yes it can be, all but the -dNoOutputFonts can be dont throught scripts in illustrator08:38.34 
chrisl Hmm, I really through illustrator would have a "convert fonts to vectors" function08:39.10 
lilltiger chrisl: it does, if it has the font installed08:39.22 
chrisl Oh, well that's crap :-(08:39.42 
lilltiger chrisl: yhee so I will have to use gs to fix that atleast08:40.05 
  and I wanted to avoid illustrator fully as much as possible as the server runs linux.. so either ill have to have another server runing the illustrator conversations or run it throught wine08:41.01 
chrisl I feel this is also a reasonable time to mention licensing - I would advise reading both the Ghostscript and (especially!) the Illustrator license conditions, because it sounds to me like you might be close to infringing the conditions08:41.24 
lilltiger chrisl: fortuanally I wont distribute the results08:41.58 
chrisl Nevertheless, it sounds like you are going to be offering a service of some kind08:42.38 
lilltiger chrisl: they are used internaly in production, so I know that for illustrator it's fine. But dont know for gs08:43.31 
chrisl lilltiger: well, the AGPL license is fairly easy to read08:44.37 
lilltiger chrisl: maybe I am missing something, but I find nothing in the AGPL that would hinder the intended use. The intended use is to convert PDF/EPS files to PDF and then convert thoes PDF's to SVG that the user that uploaded that PDF then can use in a webenvironment.08:54.16 
chrisl lilltiger: the AGPL has restrictions on use in a SAAS environment - but I suspect you are going to be fine08:55.38 
lilltiger chrisl: I suspect that as well08:59.18 
chrisl lilltiger: I was more wary of Illustrator - Adobe's licensing is rather more "locked down" than ours09:00.31 
lilltiger chrisl: indeed, but I think we are fine there as well as we do not realy distribute the files we generate, they are for internal use and we do have several illustrator licences09:18.37 
chrisl lilltiger: cool. I felt it worth mentioning as this is a public (and publicly logged) channel.09:21.45 
lilltiger chrisl: I know and i have lookt into it somewhat, but licences are hard to understand, but from what I have understood we should be just fine.09:24.36 
henrys kens2: your 0 scale bug in pcl actually discovered a class of problems. HP seems to apply range clamping to several commands that eventually effect the scale value.13:58.43 
kens2 Hmm, interesting13:58.55 
  So they end up at 0, or we shoudl be clamping to something larger,e and aren't ?13:59.19 
henrys kens2: very tiny fonts not visible without magnification but they are there.14:00.29 
  kens2: well visible but not readable14:00.44 
kens2 :-D14:00.49 
  I'm pretty certain it was an actual 0 that was causing the problem, which I *thnk* means we would print nothing14:01.39 
rayjj I guess casper is back up14:02.18 
kens2 Seems to be OK< marcosw rebooted it14:02.27 
rayjj I guess more than one person needs to be able to do that14:02.44 
henrys kens2: yes it was 0, the responsible command leaves out the parameter and the parser default the parameter to 0, which is wrong14:02.49 
kens2 Oh I see, then I guess I just handed you a pre-opened can of worms, sorry about that14:03.11 
henrys kens2: easy changes just have to find all of them.14:03.40 
kens2 Well, at least if the changes are easy its not too onerous14:04.02 
  I wonder if this means a lot of cluster diffs though ?14:04.18 
henrys kens2: maybe14:05.09 
kens2 :-( Again....14:05.18 
henrys rayjj: it was up last night when I checked.14:06.16 
kens2 marcosw rebooted it yesterday afternoon14:06.38 
henrys kens2: ah that makes sense.14:06.58 
henrys wonders if dns changes should be reviewed. It's a big deal and another set of eyes might help14:07.29 
kens2 needs a fresh coffee infusion14:07.30 
  I don't thnk it was hte DNS change14:07.41 
  Seems like casper just died co-incidentally14:07.56 
rayjj henrys: it wasn't the DNS changes, but lack thereof. When peeves changed, I forgot to update network solutions14:08.13 
henrys rayjj: oh I thought you had made a mistake and corrected it.14:08.59 
  rayjj: and the casper problem is coincidence? that seems odd?14:09.34 
rayjj once I updated NS for peeves==ns2 then casper and ns1 and ns3 were all able to be found (using peeves), but it was down. Up until then (for the previous week) peeves was being resolved by casper14:09.51 
  and casper _was_ updated14:10.04 
  since my static IP's change so infrequently, I had forgotten the one step14:10.51 
  henrys: who else knows the magic to reboot casper ?14:13.49 
henrys I think it's just marcosw 14:14.29 
rayjj henrys: have I given you the accounts and passwords for network solutions (ghostscript.com and artifex.com) or the godaddy accounts that I set up (gsview.com and jbig2dec.com) ???14:17.07 
kens2 Customer bugs showing a distinct improvement this week.14:18.11 
sebras henrys: sounds like you have another item for the meeting yes. :)14:23.12 
jogux henrys: I think the casper problem was a coincidence - with casper up DNS worked but would've been slower for the first query 50% of the time. With casper down (and peeves's IP out of date) it didn't work 100% of the time :)14:26.46 
  my guess is casper kernel paniced or something. it was accepting TCP ssh connections but not sending the intiial banner, which in my experience is generally sympomatic of a kernel panic.14:27.30 
henrys rayjj: no14:29.52 
  rayjj: can you put them on casper14:30.03 
  jogux: I guess but I can't even remember the last time casper came down. seems odd.14:31.42 
jogux nods. the /var/log/kern.log might contain a clue but I don't have permissions to see that :)14:32.23 
rayjj henrys: where should I put them ?14:33.21 
henrys home directory ?14:34.11 
rayjj the /home directory, your /home/henrys dierctory, or my /home/ray directory ?14:34.42 
henrys or I can send you a public key and we can use email but I think casper is secure enough don't you?14:34.51 
rayjj henrys: if it isn't we're in trouble14:35.06 
henrys sorry I meant your home directory14:35.15 
rayjj henrys: OK. I just wanted to know so someone could find it14:35.37 
  and now it'll be searchable in the logs :-)14:35.55 
  I'll call it domain_registrar_account_info.txt OK?14:36.19 
henrys rayjj: sure, I was going to grab it and delete it... if we want to have several people see it we should set it up on the twike14:41.13 
  s/twike/twiki14:41.20 
  although the twiki security is questionable14:41.41 
rayjj henrys: yeah, I wouldn't suggest the twiki14:43.05 
henrys rayjj: we can always encrypt it.14:51.59 
  I was thinking it would be nice to have a central place with all our accounts. Smart office has added a lot of outside accounts to keep track of.14:53.08 
kens2 print and snail mail to Joann ?14:55.52 
henrys well the idea is to have all this stuff immediately accessible. Seems like twiki + encryption is the way to go. I'll bring it up at the Tuesday meeting.14:58.13 
jogux henrys: we have a file on casper we keep the SO account on. It's as secure as the SO git is (which is more secure than the twiki).15:12.54 
  of course, the wiki and the above file are hosted on casper, so would've been useless at the weekend :-)15:13.29 
chrisl Ah, cool, back online....16:04.58 
henrys RobinFone, is that the nick for tapping into a telephone cable with scuba gear in the middle of the Pacific...18:07.16 
  ?18:07.19 
RobinFone limited wifi. i haveto run to the restaurant for a hit every now and then to stave off the shakes.18:10.08 
  we start our journey home later today. back to tahiti.18:10.56 
  then back to lax/lhr tomorrow night18:11.18 
henrys ;-)18:14.11 
rayjj hmm... somehow the openjpeg junk messages are appearing again on debug builds :-(18:58.58 
  I thought we got rid of those18:59.17 
  oh, probably with the new directory structure, my luratech dir isn't in the right place, so I've gone back to using openjpeg19:01.05 
 Forward 1 day (to 2015/08/11)>>> 
ghostscript.com
Search: