IRC Logs

Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2014/05/20)2014/05/21 
marcosw Robin_Watts: I looked at differences #1-#3499 of result 301. I put the results on the twiki: GhostDocs/ATSResultsCheck04:57.53 
purb create a new line annotation is not possible using pdf_set_ink_annot_list()05:33.38 
  can anyone solve this problem?05:34.03 
mvrhel_laptop Robin_Watts: so just a heads up. I was not able to install the APK you gave me. For some reason it fails05:42.38 
purb can anyone solve this problem for windows platform?05:46.14 
  can anyone do line annotation for windows platform?06:27.18 
sebras tor8: your patch over at tor/master works fine for me.08:01.57 
ChrisZ hello, my name is Christian, i have a question about clipping in ghostscript09:37.19 
  i have EPS files, created with Photoshop, and containing a clipping path09:38.12 
  when converting these EPS to JPEG for example the clipping path is always applied to the generated output09:39.11 
  is it possible to avoid the clipping when converting EPS files?09:39.32 
Robin_Watts ChrisZ: So, what you're saying is that you'd like us to convert the EPS to a JPEG and magically known which clipping path to ignore ?10:42.08 
ChrisZ no, i just like to have a option to disable clipping completely10:45.36 
andremedeiros Hi everyone.12:15.15 
  I'm trying to render a PDF to JPEG images, but I'd like to ignore the text12:15.31 
  (ie. don't render anything with a font. just the background.)12:15.38 
  Is it possible to do it with GhostScript?12:15.45 
kens Possible, yes, easy, no....12:15.55 
  You would have to modify the PDF interpreter to turn all the text processing procedures into 'no op's12:16.22 
andremedeiros I'd also have to use gs-lib right?12:16.47 
  Can't do it right off the bat with the gs cli command12:16.57 
kens No, you can use Ghostscript, but you would have to modify the interpreter12:17.05 
  The PDF interpreter that is.12:17.20 
andremedeiros Can you point me to some documentation on where I would even start doing it?12:17.44 
chrisl You *might* not need to modify the PDF interpreter if you use -dWRITESYSTEMDICT and redefine show and co........12:18.29 
kens There isn't any documentation. YOu can look in gs/Resource/Init/pdf_ops.ps and look for the definitions of the PDF Text processing operators (eg TJ)12:18.30 
tor8 it might be easier to hack mupdf to do it (that's mainly a question of removing a few lines in C code, rather than learning to code postscript)12:18.32 
andremedeiros tor8: we've actually had a lengthy discussion in the past about mupdf and whitelines :-(12:19.01 
  GS is the way to go :-(12:19.08 
  kens: Thank you for that. I'll look into it.12:19.20 
tor8 andremedeiros: refresh my memory :) white lines on stacked images?12:19.35 
andremedeiros Aye, as in, flattened PDFs12:19.44 
kens You'll need to know what the operator is expecting to find on the stack, and replace the existing procedures with code that removes the opreands from the stack, but does nothing else12:19.56 
andremedeiros kens: wouldn't be interesting if it were easy, right? *grhmpft*12:20.15 
kens Well, its kind of an unusual request.....12:20.28 
andremedeiros I'm having troubles with text not being crisp.12:20.46 
kens But if you are failiar with PDF syntax, it shouldn't be *too* hard.12:20.51 
tor8 kens: might it be done by always forcing the text rendering mode to 'invisible' in the gstate?12:20.55 
kens tor8 yeah, that's a sound thought12:21.06 
  Tr 3 If I remember correctly12:21.20 
tor8 though I suspect that's trickier than just shorting out the bottom call to 'show'12:21.22 
kens Its not just show12:21.30 
  You'd also need cshow, kshow, xshow, yshow, xyshow, glypshow....12:21.45 
andremedeiros i'mscrewedshow...12:21.55 
kens PostScript has a lot of show operators and the PDF interpreter uses most of them one way or another12:22.18 
chrisl I thought we only use show and xyshow in the pdf interpreter12:22.20 
kens No we definitely use cshow as well and I think ashow and awidthshow for sure12:22.38 
  Let me just look for textrendering mode12:23.09 
andremedeiros I really appreciate this.12:23.24 
kens OK in pdf_ops.ps in /textbeginpage we initialise TextRenderingMode to 0 (fill), if you change that to 3 (do nothing) that might be all you need12:24.02 
andremedeiros Let me have a look12:24.30 
Robin_Watts assuming the PDF file never sets it to anything else?12:24.34 
kens Otherwise you might also need to alter the definition of /Tr in the same file12:24.39 
  In which case you should change it to {pop}12:24.55 
  Robin_Watts : chances are it doesn't get changed, and that's an easy change12:25.21 
  Err, I should check the PDF reference before saying mode 3 is 'do nothing', unless anyone knows for sure ?12:25.56 
  OK the spec says 3 is 'neither stroke nor fill (text invisible)'12:26.42 
andremedeiros Super!12:26.54 
  I'll try it out now!12:26.59 
kens Of course, if you have (for example) and image clipped to a text path, this won't give you what you might expect :-)12:27.23 
  andremedeiros : whcich OS is this ? Linux ?12:27.38 
andremedeiros Yes12:27.43 
  And images are fine.12:28.01 
  and paths.12:28.04 
kens Hmm, if the resources are in the ROM file system you will need to tell GS to use the modified files12:28.09 
andremedeiros what I want to ignore is actual text.12:28.10 
kens -I/.../.../Resource/Init12:28.28 
andremedeiros can I include just the modified pdf_ops.ps file on a directory12:28.48 
  and specify 2 include directories?12:28.53 
  so my version has precedence?12:29.01 
kens Umm, yes I think so, but if you have 2 files with the same name you'll need to be careful12:29.17 
  I htink it proceeds to search in the defined order, and stops on the first match, but I could be wrong12:29.41 
andremedeiros That's what I thought too12:29.48 
  (the order part, not you being wrong)12:29.52 
  Let me give it a try, I'll ping you in 10 minutes12:30.02 
kens Oh I'm often wrong, GS is a source of constant surprises for me12:30.11 
andremedeiros What legacy codebase isn't?12:30.30 
kens :-)12:30.37 
andremedeiros Checking out GraphicsMagick because that's what we use as a front-end to GS and it's poorly documented (as in, how to pass raw options down to GS) #thuglife12:45.18 
tkamppeter I have an Endianess question for the CUPS Raster (gdevcups) output device. The code obtains the bitmap rendered by GS via the gdev_prn_get_bits() function. If I am in a 16-bit-per-component mode, do I get big endian or little endian? And is there a function in C which turns this to big endian, indpendent whether my system is big endian or little endian?12:46.33 
kens tkamppeter : that may be a question for Ray, I don't know the answer to either question12:49.39 
chrisl I think you get native endian, and I don't think there is an existing function to do that - but yes, Ray is probably the person to answer for certain12:50.33 
Robin_Watts For bits < 8 we always pack them into bits high bit first (which generally fits better with big endian stuff)12:51.38 
  but for 16 bpc, I'm not sure.12:52.00 
henrys huh I thought it was all big endian...12:58.42 
kens I *thought* it was big-endian, but I have no evidence really12:59.34 
chrisl It's ages since I looked at the rendering end of things....12:59.46 
kens I sort of hoped Ray might just know the answer13:00.21 
andremedeiros kens: Is this still valid? http://ghostscript.com/doc/7.07/Use.htm#Finding_files13:01.10 
kens THat's archaic, version 7.0713:01.25 
  Try the current docs13:01.30 
andremedeiros http://ghostscript.com/doc/9.10/Use.htm#Finding_files13:01.55 
kens 9.14 is current13:02.03 
  Not that I think its changed....13:02.19 
andremedeiros Same thing, yeah.13:03.00 
henrys Robin_Watts: Good paul, peter and I are going to set up a meeting do you want in? I haven't even decided how to do it, maybe skype13:03.01 
  The company "Good"13:03.17 
andremedeiros kens: Got it to load the file13:14.06 
  Changed what you told me to ("/Tr { pop } bdef" and "/TextRenderingMode 3 def % 0 Tr")13:14.50 
  Doesn't seem to fix it :-(13:14.58 
kens Well, without seeing your file, I can't really say much.....13:15.15 
andremedeiros https://gist.github.com/andremedeiros/182ce4b896549a117d0b13:16.36 
  Worth mentioning is https://gist.github.com/andremedeiros/182ce4b896549a117d0b#file-pdf_ops-ps-L569 and https://gist.github.com/andremedeiros/182ce4b896549a117d0b#file-pdf_ops-ps-L65413:17.01 
  (the rest is untouched.)13:17.10 
kens Each one of those just seems to give me a dump of pdf_ops.ps13:17.44 
andremedeiros I've changed what you told me to13:17.53 
  (they just point to different lines.)13:18.02 
kens The lines aren't obvious to me, at least on a quick look13:18.21 
  'changed lines'13:18.28 
andremedeiros OK, so I changed line 569 and line 65413:18.50 
  Line 569 is now /TextRenderingMode 3 (switched it to 3 from 0)13:19.03 
  and Line 654 I've changed to /Tr { pop } bdef13:19.19 
kens And you are sure those files are being used ?13:19.37 
andremedeiros yeah13:19.42 
  if I add garbled text, GS just gives up and quits13:19.52 
kens Then I don't know13:20.03 
andremedeiros although it's worth a shot to just move the original file somewhere else and try13:20.05 
mvrhel_laptop hi Robin_Watts 13:20.37 
andremedeiros Yeah, that didn't work :-(13:20.55 
  Thanks for the help tho13:20.58 
kens Works for me, with a file I have here13:21.42 
  All the text is missing but the paths remain13:22.00 
andremedeiros you mean the file I put up on the gist?13:22.13 
kens No, I mean I modified pdf_ops as I described, and a test PDF file I have here (which contains text) renders without text13:22.42 
  Ah, but it seems it does anyway13:23.02 
andremedeiros I don't suppose you could put that up somewhere?13:23.02 
kens Not a good test file13:23.11 
  Hmm,no that seems not to work, I have no idea why13:25.05 
andremedeiros Grhmpft :-(13:27.14 
kens Oddly the TextRenderingMode *is* 313:27.55 
chrisl Not text then?13:28.18 
kens Its a QL test file13:28.28 
  SO it really is text and its going through setshowstate, which is where I'm echoing the rendering mode13:28.51 
andremedeiros Grhmpft13:32.57 
  Need to try and find a different approach13:33.06 
chrisl It's not a thing we're asked about often.... ever.....13:34.02 
tor8 Robin_Watts: argh! my CMap optimization pass seems to have broken the CMaps :(13:50.52 
Robin_Watts oops.13:51.33 
tor8 UniJIS-UTF32-H doesn't work after that :(13:51.50 
  oh well, guess I should spend the time to write that reusable set of scripts to do the optimization after all...13:52.19 
  Robin_Watts: how do we add test files to the cluster?13:53.22 
  http://bugs.ghostscript.com/attachment.cgi?id=9928&action=edit and http://bugs.ghostscript.com/attachment.cgi?id=9929&action=edit should be in there; they would have caught the error13:53.57 
Robin_Watts commit to svn.13:54.01 
tor8 I don't have a checkout of the test files (I use sshfs to peeved to get them)13:55.34 
andremedeiros kens: May I ask what spec you're looking at?13:58.29 
  I might have another way to do what I need13:58.35 
kens which spec ?13:58.47 
andremedeiros PDF13:59.30 
kens 1.7 refrence13:59.38 
chrisl andremedeiros: I may have missed it: is there a reason you want to do this?14:02.18 
andremedeiros Yeah. TL;DR we use GS to convert PDF pages to images.14:02.38 
  Reason why we want to strip out the text is because the resulting images make the text blurry14:02.48 
  so I have another tool that exports vectorized text14:03.02 
chrisl Hrm......14:04.15 
andremedeiros I think I know what hte problem might be.14:08.56 
  Note: The text rendering mode has no effect on text displayed in a Type 3 font (see Section 5.5.4, “Type 3 Fonts”).14:08.58 
kens This is true14:09.17 
andremedeiros kens: I don't suppose we could do something with the fill colour? Maybe if I can "force" an alpha value of 0 this could work14:12.16 
kens There is no 'alpha' as such in PDF14:12.30 
  and trying to create a transparency layer would be *much* more work14:12.46 
Robin_Watts andremedeiros: The problem is that glyphs in Type3 fonts are basically just a list of drawing operations.14:12.55 
kens They are still drawn as glyphs though, so you could override TJ and Tj14:13.18 
Robin_Watts You'd have more luck nobbling Type3 glyphs just never to render, I suspect.14:13.27 
kens That sounds harder then disabling text generally14:13.48 
andremedeiros kens: Same deal? { pop } ?14:15.00 
kens No, you'll need to look at what operands each operator takes, and pop the required number of operands14:15.19 
andremedeiros Of course :-P14:18.45 
  This whole endeavour kinda feels like http://www.gregcaughill.com/wp-content/uploads/2014/03/homer-simpson-marketing.jpg14:19.16 
henrys chrisl: I meant to ask at the meeting yesterday about openjpeg integration. Did you trip over any problems?14:28.27 
chrisl henrys: I haven't looked at it yet14:29.44 
henrys chrisl, kens new chairman at global I see15:21.42 
kens Hmm didn't see that15:21.55 
  Ah so Johan Volckaerts has stepped down15:22.35 
  Presumably to spend more time wiht his money15:23.39 
chrisl I wonder if that means Andlinger (or whatever it morphed into) has gone.....15:26.17 
kens Hmm, not sure, volckaerts is still listed as a non-executive director15:32.57 
  ANd the new guy has a Dutch/Belgian name, so possibly another vulture capitalist15:33.17 
andremedeiros kens: just a thought, but what if I hijack BT/ET?15:35.20 
kens No tht won't help15:35.30 
chrisl kens: I think vulture capital still - he runs a "private equity vehicle......"15:37.30 
kens No great surprise15:37.56 
  andremedeiros : If I replacethe 'Show' in /Tj and /TJ with a 'pop' then text disappears for me15:45.04 
  { 0 0 moveto pop settextposition }15:46.35 
andremedeiros OMG15:46.45 
  kens: just tried it. you were 100% right16:06.09 
  I owe you big beers!16:06.19 
kens I cna't guarantee it has no side effects16:06.31 
andremedeiros Got a paypal account I can buy you a pizza through or something?16:06.33 
kens No worries16:06.41 
andremedeiros I've tried a good few docs already and it seems to do the right thing.16:06.50 
rayjj kens: (or chrisl): can one of you have a look at my patch for fts_09_0920.pdf (also fixes 0923 and sumatra/586_-_missing_images_gs_SMask_not_applied.pdf) patch is at: http://git.ghostscript.com/?p=user/ray/ghostpdl.git;a=commit;h=21565d4ad3c3eed360d3a56c372663d1ba876c0d16:11.28 
kens 1 second16:11.41 
rayjj np16:12.20 
chrisl Seems to be a lot of whitespace changes...16:12.45 
rayjj kens: there is one bmpcmp diff that I have to look into still: tests_private/comparefiles/Bug690534.pdf16:13.14 
kens Yeah I spotted that too16:13.16 
  SO we always do a newpath now ?16:13.35 
  There's a comment at 1014 with no apparent accompanying change, that's puzzling me16:14.19 
rayjj kens: correct, since ET never leaves a valid path, and we may have "polluted" the path with 'clippath' when we are doing '*show'16:14.41 
kens Hmm, OK16:14.50 
rayjj kens: just a src, I'll have a look...16:15.03 
kens + % don't worry about transparency for invisible text16:15.16 
chrisl kens: the comment is explaining why that bit *doesn't* follow the same pattern as the marking text code16:15.29 
kens Oh OK16:15.36 
rayjj thanks, chrisl 16:16.26 
  kens: note that there are several lines with trailing whitespace removed16:17.21 
chrisl It's a shame it couldn't be handled in setstrokestate/setfillstate - but I do see why that's not viable16:18.14 
kens2 Well I can't see a problem, though my understanding of the transparency code is limited.16:18.30 
  By the way Ray, there's a question from Till earlier in the logs we were hoping you could answer realting to the byte ordering of 16bpc output16:18.57 
rayjj kens2: that's why I waited until mvrhel was on the road ;-) 16:20.06 
kens2 ROFL16:20.15 
rayjj that and he's been off on other stuff anyway. I figure that I'll end up inheriting transparency since I've mucked around in it a lot anyway16:21.15 
  that's odd. I can't reproduce what bmpcmp shows with tests_private/comparefiles/Bug690534.pdf16:24.34 
chrisl have to go.....16:24.44 
rayjj oh, nm. I do see the problem with tests_private/comparefiles/Bug690534.pdf, but ONLY after pdfwrite, then using the patched gs to view it.16:30.05 
  so the problem is with pdfwrite. Adobe shows the missing text on the file produced by pdfwrite, but the HEAD gs shows the text (in other words, we now match the Adobe display of the pdf produced by old or new pdfwrite)16:37.55 
  based on the fact that we now match Adobe's display, I'm going to push that patch and open a bug for pdfwrite (it won't affect cust 532)16:44.56 
  I opened a bug for pdfwrite. If kens doesn't want to dive into it, I'll have a look after looking into the other cust 532 issue (2524)17:12.30 
tkamppeter rayjj, I have an Endianess question for the CUPS Raster (gdevcups) output device. The code obtains the bitmap rendered by GS via the gdev_prn_get_bits() function. If I am in a 16-bit-per-component mode, do I get big endian or little endian? And is there a function in C which turns this to big endian, indpendent whether my system is big endian or little endian?17:23.44 
 Forward 1 day (to 2014/05/22)>>> 
ghostscript.com
Search: