IRC Logs

Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2015/09/08)20150909 
fredross-perry robin_watts: take a look at b137f19 in my repo00:20.19 
lhx Question: is it possible to change the jpeg quanitzation away from the default when -sDEVICE=pdfwrite? I really want to change the jpeg quanitzation as opposed to to PPI of the jpegs in some large PDF files. Thoughts?02:25.49 
  I've tried -dJPEGQ and -dQFactor and it doesn't seem to have any effect02:28.36 
rayjj lhx: The QFactors (which apply to JPEG, as far as I know) are described in the notes following: http://www.ghostscript.com/doc/current/Ps2pdf.htm#note_704:12.12 
  Thus, you can set paramters into the ColorImageDict, ColorACSImageDict, GrayImageDict, and/or GrayACSImageDict that should allow you to alter the QFactor04:16.27 
  lhx: this would be done from the command line with something like the following immediately preceding your input file: -c "<< /ColorImageDict << /QFactor 0.2 /Blend 1 /HSamples [2 1 1 2] /VSamples [2 1 1 2] >> >> setdistillerparams" -f 04:19.20 
  lhx: note that you may find it easier to put the all of the PS that sets the distillerparams into a file and then just put the name of that file just before the input file. In that case, the -c and -f are NOT used, but simply: myparams.ps infile.ps04:21.14 
  or infile.pdf04:21.20 
lhx rayjj: thanks! That was an awesome explanation. Is there a reason why that's such a PITA to do it that way instead of having a nice CLI flag?06:21.42 
chrisl lhx: probably because that's how Adobe's Distiller does it. In addition, we already have far too many command line options, if we added ones for everything that can be configured in pdfwrite, we'd end up with a document the size of War and Peace, just for the command line args!06:24.57 
lhx chrisl: thanks for the perspective. I try to stay away from acrobat when I can so I didn't have context06:26.08 
chrisl lhx: I don't blame you! But unfortunately, Adobe is seen as a benchmark for these things....06:27.28 
lhx chrisl: I do have the ligthroom and PS subscription06:27.46 
  chrisl: but I refuse to pay $20 a month for PDF software06:27.57 
chrisl The thing is, we *have* to support these things through setdistillerparams since that can be called in the incoming Postscript jobs, and since there is a defined way to push Postscript via the command line, it makes sense to utilise that, rather than add to the existing proliferation of (already confusing!) CLI options06:30.07 
rayjj lhx: I agree wholeheartedly06:30.15 
chrisl Additionally, these are settings that are changed only very rarely.....06:30.44 
rayjj chrisl: yeah. I don't want us to turn into the imagemagick CLI !06:31.18 
chrisl Ick!06:31.49 
rayjj just 'convert' has 311 lines of emitted by --help06:32.01 
  although, if we collected the Use.htm and Language.htm options, we may already be close :-/06:33.15 
chrisl Hence preferring not to add even more!06:33.51 
lhx heheh... I guess I don't fundamentally understand the technology06:34.13 
rayjj chrisl: yes! totally in agreement06:34.19 
chrisl And that's before my inherent dislike of ImageMagick!06:36.40 
rayjj lhx: the issue is that ghostscript does _so_ much that it has options for this and that and the other. Viewing on the screen, making jpegs, pngs, tiffs, pnms, printer format streams, cups, "high level" PS Level 2, PDF (at anything from 1.2 to 1.7), extracting text, ...06:37.15 
lhx rayjj: sure... so why not another flag? ;)06:37.34 
chrisl lhx: it's also preferable to avoid having 2 or more different ways of achieving the same goal, where possible......06:38.52 
rayjj lhx: there are basic options in Use.htm, GS specific options in Language.htm and options that only are relevant to a specific device (conversion task) in Devices.htm, then there are the "high level" devices -- ps2write and pdfwrite that add even more options06:39.02 
lhx been using pdfwrite06:39.40 
rayjj chrisl: so, that would imply that -dQFactor should also control the pdfwrite device ?06:39.51 
  chrisl: but the pdfwrite allows for different ImageDict for Color, ColorACS, Gray, GrayACS, ...06:40.33 
chrisl rayjj: possibly. But as I said, we *have* to support setdistillerparams for pdfwrite, so..... it's debatable06:40.44 
rayjj chrisl: IMHO, having to have "distillerparams" that are ignored by other devices makes sense.06:41.42 
  and the basic problem is the implicit connection between CLI options and device specific options. For example: -sCompression=lzw is only relevant to TIFF devices, but as a command line option it just "works" without error and is ignored for other devices06:43.56 
  sort of like lhx's attempt to use -dQFactor=_.__ being ignored by pdfwrite, but affecting the jpeg device06:45.03 
chrisl Sure, but changing that stuff now is really out of the question :-(06:45.54 
rayjj we might be better off with --device-opts="___" in order to differentiate it from 'generic' or 'parser' options06:46.52 
  chrisl: well, we /might/ be able to implement a new approach (not necessarily what I had) and deprecate the old. maybe ???06:47.51 
chrisl But we can't drop support for the old, so the confusion would continue to arise06:48.17 
rayjj yeah, but if the 'old' options were pre-processed into new options, and those were printed (in a "verbose" mode) the correspondence between the old and the new would become somewhat clearer06:49.54 
lhx there was plenty of confusion reading the docs in that I ran 5 trials with different jpeg -dQFactor numbers and wondering what the hell I was doing wrong. The documentation is super unclear in that scenario06:49.55 
  I eventually found it, after having to read a footnote of a chart... 06:50.08 
chrisl lhx: the JPEGQ and QFactor options are in the section specifically for the JPEG output device - it's hard to see how that could be clearer06:52.07 
rayjj so if someone had -sDEVICE=ppmraw and -dQFactor=0.9 we could (in verbose mode) indicate that -dQFactor=0.9 was used to set a parser variable "QFactor" to 0.9 (and that it did not end up as part of the "device-opts" options06:52.09 
  or ^^^ with -sDEVICE=pdfwrite (same -- it is ignored, except to set a variable in the PS parser systemdict)06:53.10 
lhx chrisl: gs accepted the flag silently, the docs don't say it only works in the JPEG output device, and that's one of the few places JPEG quantization is mentioned. In the http://ghostscript.com/doc/current/Ps2pdf.htm page, you have to read a *footnote* to find this out06:53.44 
rayjj lhx: that's sort of what I was trying to get at06:54.04 
lhx rayjj: 10-406:54.39 
chrisl So, in the section on the jpeg output device, it should state that it's only referring to the jpeg output device??06:55.01 
rayjj we don't have a clear disctinction between device options/flags/switches and other (parser or "main" options)06:55.16 
lhx chrisl: Granted, I'm a noob to gs, and I'm also not the best programmer, but I do live in tmux, use emacs, code golang, and write in latex all the time, and I was having trouble groking...06:55.17 
rayjj lhx: you are not the first. And also tripping over the need to have -d___=___ for some options and -s____=___ for others -- it's documented, but not at all obvious why or which06:56.43 
lhx I also try to RTFM when I can :)06:57.06 
rayjj of course, to us, it is totally obvious :-)06:57.11 
lhx of course :D06:57.42 
chrisl That does assume a certain familiarity with Postscript......06:57.48 
lhx which I don't have06:58.25 
rayjj but even I sometimes forget and use something like -dBandListStorage=file instead of -sBandListStorage=file06:58.31 
  but at least that causes a 'typecheck' error06:58.50 
chrisl I suppose docs like Device.htm assume a familiarity with Ghostscript's concept of devices - but I don't see how we can avoid that......07:00.19 
kens Write a decent manual :-)07:00.33 
rayjj and then there's -diDisplayFormat=___ (for the "display" device") Good thing I sitll have a good memory and learned that I can input values in hex with -dDisplayFormat=16#____07:00.40 
lhx I appreciate the perspectives and the help. The documentation needs to have some more handholding for the absolute noob I think07:01.12 
  if you want the absolute noob's impression07:01.20 
  lol07:01.28 
rayjj lhx: yeah. So that's why we are here :-)07:01.37 
  (job security) ;-)07:01.47 
lhx :)07:01.52 
lhx secures the jobs with force07:02.33 
lhx and uses paper... lots and lots of paper07:02.54 
rayjj kens: I'd be inclined to write a sane front end, THEN write documentation for that instead of trying to write a black and yellow book for the current CLI07:03.09 
kens rayjj I'd write a sne device API, and a sane fonrt end API first07:03.52 
lhx night night everyone07:04.05 
rayjj lhx: g'nite07:04.16 
  for me as well...07:04.21 
kens I would say though, that even in my fomrer life which had both, and a manula., people found it hard to get started07:04.27 
rayjj kens: getting "started" isn't usually our problem. It's "how do I do this "***""?07:06.03 
  if they can't get gs installed and display a 'tiger' then, that's one thing, but there are lots of other things that people want to do that is really hard to dig out of the docs (or even the code)07:07.29 
kens Given that the code I referred to had no fornt end to speak of, "getting started" means that sort of thing, not firing it up and running tiger07:08.27 
rayjj and, of course, all the "lore" incantations that we get with -dWRITESYSTEMDICT -dPARANOIDSAFER -DDWIM ...07:08.36 
  maybe we should just get rid of all the options except -dDWIM07:09.36 
  google probably has a module laying around that we could use for that ;-)07:10.47 
chrisl We should get rid of everything except "-c" - *everything* set via real Postscript :-)07:10.47 
kens You'd still need -f as well though07:11.34 
chrisl No, you have "run"07:11.50 
kens Hmm yes fair enough07:11.59 
chrisl I'm guessing there'd be some resistance to that idea....07:12.31 
rayjj chrisl: yeah, and make PCL users use -J".." with PJL07:12.48 
kens boggles07:13.01 
chrisl Exactly!07:13.06 
kens Someone opened a bug report about using EPS2write to create multi-page PostScript ????07:13.30 
rayjj and gxps would take -X"___" where ___ was some XML gobbledygook07:13.54 
chrisl I'd argue XPS could also use PJL07:14.36 
rayjj too late for me to re-invent the world. Time for bed.07:14.57 
kens It will have to use 'something' for us to get PDF/A out of it07:15.05 
rayjj chrisl: XPS has it's own Job level stuff -- we'd just need to have a CLI option to adding/overrnding what's in the XPS)07:16.09 
  kens: XML can do ANYTHING, hadn't you heard ;-)07:16.41 
chrisl rayjj: true, but typing XML would be a bigger PITA than type Postscript....07:16.41 
kens rayjj I try not to listen to evangelists, of any strip07:17.02 
  stripe07:17.06 
rayjj chrisl: well, this discussion wasn't tending toward easier user experience, AFAIK07:17.24 
chrisl rayjj: good point, XML it is!07:17.45 
rayjj chrisl: now I'm going to have nightmares :-D07:18.22 
  my kids go to school 1 hr later tomorrow, but even so, it is past time for me to say hello to my pillow.07:19.28 
  g'nite07:19.38 
kens goodnight ray07:20.25 
chrisl kens: I wonder if it would be viable for eps2write to warn or error if the output file doesn't have a %d in it?08:01.21 
kens But what if you know hte input is a single page file ?08:01.43 
  Or do you mean only when producing second and subsequent pages ?08:02.09 
chrisl Hence possibly a warning would be best08:02.14 
kens I think I considered it at the time and decided not to bother, I can't remember why08:03.17 
  Its a dumb thing to d anyway, and exhibits a complete lack of understanding08:03.38 
chrisl Agreed08:03.47 
  It's unfortunate, and insane, that epswrite ignored the restriction08:04.28 
kens Yes, that's just mad08:04.38 
  But then epswrite was, frankly, crap08:04.59 
  At least the OP is happy with ps2write08:05.15 
chrisl Well, that is the correct tool for that job, so....08:05.32 
kens Well I was slightly concerned that there might have been a real problem underneath it08:05.57 
chrisl TBH, I first thought the problem might be with the tiff device08:06.21 
kens Well, since he didn't supply an example file.....08:06.36 
  I diagnosed the problem just from the bug title :-)08:06.50 
chrisl Yeh, but he mentioned multi-page tiff files - which are (or were) problematic08:07.20 
kens That didn't occur to me, but I already knew he was on shaky ground at best because there is *no* way to get eps2write to produce a multi-page EPS :-)08:08.03 
  As far as I can see, he should have got an EPS with the content from every page in the input written to the same output, ie everything on one page08:10.16 
chrisl Which probably explains the description08:11.16 
kens has lost the originalbug report....08:11.36 
  Well I suppose it depends what he means by 'garbage' TIFF files. To me that rather implied broken, not 'not what I expetced', but yeah.08:12.33 
  He was probably getting all his marks on a single page.08:12.54 
  LOL SO the 'intentionally crash' bug was deliberately introduced to Igor ? ROFL......08:15.03 
chrisl I wonder how many people that's going to bounce around before someone just fixes the damned thing08:18.26 
kens :-)08:18.36 
  Are you the memory manager today ?08:19.05 
chrisl I suppose on those terms, it will probably be me08:19.29 
tor8 kens: chrisl: I did think of reassigning it to Igor. but having a ghost own a bug didn't seem very productive in the end.08:19.35 
kens That's what I thought08:19.43 
chrisl I just feel it seems like a pretty trivial thing to open a bug for - rather feel that opening the bug took longer than just fixing it would have08:20.31 
kens tor8 Yeah I didn't mean to suggest that. But it tickles me immensely to see that Igor deliberately introduced a route to a crash and apparently didn't regard that as a problem.08:20.31 
  I'd do it, and get you to check it, but I expect its as quick for you to do it yourelf08:21.27 
chrisl I'll get to it at some point - but I'm buried in gdevp14.c and ICC profile reference counting..... again :-(08:22.37 
kens Oh yeah I saw that08:22.48 
  I may do it anyway then and pass it by you, I thnk I'm nearly finished making PJL use dynamic memory allocation, and the next thing is to start adding new code for pdfwrite's benefit, I can take a pause there08:23.32 
tor8 kens: Indeed! I definitely see your source of mirth. It's so typical of Igor.08:33.45 
kens :-D08:33.55 
  Well it seems I've managed to break the PJL parser more or less completely, I can't say I'm surprised, now to fix it.08:35.15 
  chrisl ping12:53.23 
chrisl kens: pong12:53.33 
kens I see a problem in psitop.c in the ghostpdl targte, want me to mail you about it, discuss it here, or esomething else ?12:54.01 
chrisl ghostpdl doesn't work, and isn't intended to work just now12:54.36 
kens I know, jujst wondered if you wanted to know about ths particular problem12:55.00 
chrisl Sure, can you summarise it here? Then we can decide if it's bug worthy12:55.26 
kens In ps_impl_allocate_interp_instance() it sets up a fake argv12:55.51 
  And sets argc to 10, but the argv only contains 4 args12:56.05 
  THe code in imainarg.c doesn't stop on encountering a 'null' argumen12:56.24 
chrisl Oh, I think I noticed that.... but fixing it didn't make it work, so I gave up12:56.43 
kens In the current code the uninitialised data happens to work, but when I changed the memory layout, it doesn't12:56.51 
  Well, when I say 'work' I mean it gets further.12:57.20 
  I only noticed because I accidentlaly built and debugged 'ghostpdl' when I meant 'ghostpcl'12:58.01 
chrisl I guess I could fix it, but as all that will be thrown away, it didn't seem worth the effort. I do wonder how it ever worked.....12:58.32 
kens If you intend to discard it, then ignore me.12:58.50 
chrisl Well, if you notice, it sets a bunch of options non-optionally, which seems broken to me.12:59.24 
kens I can't believe it ever worked reliably, since it depends what's in the uninitialised memory. Mostly (for me) it seems to be poitning to real memory, but I ended up with one set at 0xa which seg faulted of course12:59.36 
chrisl I think that either needs all replaced, or *majorly* rewritten13:00.42 
kens ANyway, as long as its defunct that's fine13:00.48 
chrisl I wonder what the "proper" way is to define a device with a device finalize method might be.......13:01.30 
kens As I recall, there is no macro for that.13:01.44 
  I discovered when doing the device subclassing htat there is no simple way to do such a thing13:02.01 
chrisl Wonderbar :-(13:02.05 
kens ps_impl_allocate_interp_instanceIt certainly reduces the utility of the finalize method.....13:02.43 
chrisl Probably explains why no device actually uses one13:03.13 
kens OK so the PJL parser no longer seg faults, now it just doesn't work, progress!13:03.18 
  and yeah, its xetraordinarily difficutl to write a device with a finalise, which is undoubtedly why nobody does13:04.06 
chrisl Does that imply it's effectively deprecated, and to get that functionality, it should be done with a memory manager finalize method, I wonder?13:05.03 
kens I admit that hadn't occured to me13:05.28 
chrisl In this case, either approach will work - so I'll use the easier one13:06.29 
kens :-)13:06.36 
chrisl But I think I will need to get rayjj to check this out before handing it to the customer......13:07.52 
kens I think it should be possible to write a macro for a device that includes a finalise routine13:11.44 
bananapie Hello. I am writing an entry for cidfmap to use a custom ttf file for a specific font. I have two fonts to subsitute, one is called 'Arial', and with the entry I added ( with help from bug 691513 ), the arial font works perfectly. My problem is I also need "Times New Roman", cidfmap doesn't take spacing and the font gs is looking for is 'Times New Roman' and not 'TimesNewRoman' or 'Times New Roman'. How do I add spaces 13:11.56 
  in a font name in cidfmap ? ( gs 9.16 from sources / Ubuntu 14.04 ). Thx13:11.56 
chrisl kens: yeh, but I don't want to do that if it's effectively deprected13:12.51 
  bananapie: try doing "(Times New Roman) cvn"13:13.18 
kens cidfmap is PostScript, so writ the fontname as a PostScript string then use the PostScrip cvn operator to convert it into a name13:13.21 
bananapie Thanks kens and chrisl, I'll try what you have suggested.13:14.58 
  given, that I'm a noob with gs and postscript, it'll take me a few minutes. I'll post back to let you know if it worked.13:15.46 
henrys kens, chrisl :I'm removing psitop and all of PSI_INCLUDED as well, I thought that implicit in the project I'm doing.13:17.08 
chrisl henrys: I wasn't aware you were doing so, but I felt it would be required13:17.54 
henrys chrisl: we did agree to not let anyone build that sometime ago, didn't you cause the build to fail in some way?13:19.01 
chrisl henrys: not in the new scheme - I was just going to remove the target for the release. I must admit, I had hoped to have made more progress on it by now :-(13:19.59 
kens henrys, chrisl, just ignore me then, I'm not up to speed on what the 2 of you are doing, and its only because I built the wrong target by accident13:26.28 
chrisl I'd really wanted the gpdl project hidden (for now) in the VS solution, but Robin_Watts had other ideas.......13:27.50 
kens Its just one letter different and in my befuddled state I got confused....13:28.22 
henrys chrisl: is the cluster building that?13:29.22 
chrisl henrys: I don't believe so13:29.35 
bananapie ok. I don't know what I am doing. I tried '/(Times New Roman) << /FileType /TrueType /Path (/usr/share/fonts/truetype/msttcorefonts/TimesNewRoman.ttf) /SubfontID 0 /CSI [(Identity) 0] >> ;' and it complains "While reading gs_cidfm.ps:13:33.00 
  Error: /rangecheck in --.dicttomark--13:33.00 
  " and I tried using Fontmap.GS "/(Times New Roman) /TimesNewRoman ;" and have TimesNewRoman in cidfmap, and it simply complains "Can't find CID font "Times New Roman""13:33.00 
  I know the solution is probably really simple and straightforward, but I can't figure it out.13:33.17 
kens '/' introduces a name, if you are converting a string to a name you don't put a '/' there13:33.24 
chrisl replace "/(Times New Roman)" with "(Times New Roman) cvn" sans quotes13:33.49 
kens Oh and you din't put 'cvn' to convert the string to a name13:33.56 
bananapie "(Times New Roman) cvn << /FileType /TrueType /Path (/usr/share/fonts/truetype/msttcorefonts/TimesNewRoman.ttf) /SubfontID 0 /CSI [(Identity) 0] >> ;"13:35.17 
  without the quotes ;)13:35.25 
chrisl Indeed13:35.31 
bananapie thanks.13:47.51 
chrisl You got it working?13:48.04 
kens Did it work now ?13:48.06 
bananapie Yes.13:51.44 
kens Great!13:52.00 
bananapie I'll post the final line in a few moments13:52.13 
  I made a stupid mistake that I am fixing.13:52.21 
kens Story of my life....13:52.43 
bananapie :D13:53.28 
  Thanks for your help guys.13:53.32 
  "(Times New Roman) cvn << /FileType /TrueType /Path (/usr/share/fonts/truetype/msttcorefonts/TimesNewRoman.ttf) /SubfontID 0 /CSI [(Identity) 0] >> ;" was wrong because the file was actually Times_New_Roman.ttf13:53.46 
kens oh well, at least its easy to fix :-)13:54.16 
bananapie The PDF rendering is still slightly off, but it's probably because I didn't list bold and italics in the cidfmap13:54.21 
  thanks a lot kens and chrisl13:54.24 
kens You're welcome13:54.31 
chrisl No problem13:54.36 
  bananapie: Remember, you are (probably) using a substitute font, so you may never get the rendering *exactly* right.13:55.38 
bananapie oops, wrong button13:56.05 
chrisl bananapie: You only missed me saying: Remember, you are (probably) using a substitute font, so you may never get the rendering *exactly* right.13:56.41 
bananapie ok thanks13:56.51 
  I am comparing the rendering to evince which is, as far as I know, using the same fonts on the machine.13:57.33 
kens Well, it might be....13:57.51 
chrisl Well, it should close then.13:58.01 
bananapie There is still some funky spacing in the letters in the title. The rest of the text is close enough that most people wouldn't notice13:58.34 
chrisl Well, my stabbings at the pdf14 compositor don't seem to have introduced problems - so that might be a good sign13:59.26 
kens Its certainly better than the opposite....13:59.44 
  bananapie : is the file publicly available somewhere ?13:59.58 
bananapie The pdf says 'version 1.5', btw. It uses the h-identity-16 thingy.14:00.09 
  with utf1614:00.12 
  This makes it work almost perfectly : 14:00.23 
  (Times New Roman) /TimesNewRoman ;14:00.24 
  /TimesNewRoman << /FileType /TrueType /Path (/usr/share/fonts/truetype/msttcorefonts/Times_New_Roman.ttf) /SubfontID 0 /CSI [(Identity) 0] >> ;14:00.33 
  But (Times New Roman) << /FileType /TrueType /Path (/usr/share/fonts/truetype/msttcorefonts/Times_New_Roman.ttf) /SubfontID 0 /CSI [(Identity) 0] >> ; , causes funky spacing issues.14:00.56 
kens You're missing a 'cvn' in that last one, I hope that's a paste error :-)14:01.37 
  Or are you really substituting like that ?14:02.10 
  TO be honest, its kind of hard to comment without seein a concrete example14:02.42 
bananapie I can send you the file over private chat if you don't show it to anyone...14:03.00 
kens If you mail it to ken.sharp at artifex.com it'll reach me hopefully without any translation going on14:03.41 
  I will delete it afterwards14:03.51 
  Of coruse, my version of MS Times New Roman may not match yours precisely either :-)14:04.23 
bananapie I sent you the file with my notes.14:05.57 
kens OK let me go look14:06.03 
  GOt it, give me a minute14:06.16 
bananapie it doesn't load with Ubuntu 14.04's included ghostscript, I had to compile because of Identity-H-utf16.14:06.20 
kens WSell I'll be using the HEAD of Git and I'm on WIndows anyway :-)14:07.00 
  So there are 4 missing CIDFOnts, Arial, Arial,Bold, Times New Roman and Times New Roman-Bold14:08.05 
  OK so the default font substitution **really** messes it up :-D14:09.00 
chrisl Identity-UTF16-H is a custom CMap. unique to Ghostscript, And because Ubuntu (and other distros) share CMaps between GS and all the other PDF consumers, they only have the standard Adobe CMap set14:09.43 
bananapie The first 3 words should be "Resume de votre" in the title. Both es in the word 'Resume' have accents pointing up14:10.13 
kens Its OK I cna view it in Acrobat14:10.41 
bananapie with msftt-core-fonts on Ubuntu, it renders perfectly in evince with no patches.14:11.08 
  at least it seems perfect. But Ghostscript screws the pooch on this one.14:11.33 
  :d14:11.37 
chrisl There could be many, many reasons for that, the missing CMap being only one14:12.19 
kens well there is no Times_New_Roman.ttf in mY windows fonts, btu there is a times.ttf14:12.52 
chrisl bananapie: my guess is that, at best, you end up with the default CIDFont fallback of DroidSansFallback14:14.02 
bananapie yes. It tried to fallback to 'Adobe-Identity' and landed on 'DroidSansFallback'14:14.27 
  front 'pdffonts' 14:15.52 
  name type encoding emb sub uni object ID14:15.52 
  ------------------------------------ ----------------- ---------------- --- --- --- ---------14:15.52 
  Times New Roman CID TrueType Identity-H no no yes 3 014:15.52 
  Times New Roman,Bold CID TrueType Identity-H no no yes 4 014:15.52 
  Arial,Bold CID TrueType Identity-H no no yes 5 014:15.54 
  Arial CID TrueType Identity-H no no yes 6 014:15.56 
chrisl bananapie: so, here's the rant: Embed the font! To PDF really portable, *always* embed the font(s) - that way you know that the correct font is always available to the interpreter14:16.16 
kens Hmm I can't seem to get GS to use my modicfied cidfmap :-(14:16.23 
chrisl kens: with -I ?14:16.49 
kens yeah14:16.54 
  -I/ghostpdl/Resource/Init14:17.01 
bananapie it's fine, I found the issue14:17.04 
chrisl kens: try a relative path?14:17.27 
kens Umm, I could try that I guess14:17.42 
bananapie http://pastebin.com/KUbA0hj014:17.45 
  The spacing issue was that the bold fonts were not defined in the cidfmap14:18.01 
  I added the two bolded fonts as suggested by kens, and it worked.14:18.15 
kens OK well that would help anyway of course.14:18.35 
bananapie I wasn't getting any warnings about Arial,Bold and Times New Roman,Bold because it was substituting Times New Roman,Bold with Times New Roman14:18.35 
  that's why the two different syntaxes earlier made a difference.14:19.02 
kens chrisl sorry, when I say it doesn't work I mean it throws me a PostScript errror14:19.20 
chrisl Oh, well, probably a typo then.....14:19.39 
kens Yes it was sorry I wasn't clearrer14:20.23 
  Anyway, since the problem is fixed, I'll delete the file.14:20.58 
chrisl NP, it's just I messed with the file permissions a while back, so...... got a little paranoid14:21.14 
kens It was my own fault, I was just slow to spot it14:21.31 
bananapie Thanks kens and chrisl. Your help is very much appreciated. 14:21.47 
kens NP14:21.57 
bananapie I added my solution to the web for the sake of https://xkcd.com/979/14:22.05 
kens :-D14:22.28 
bananapie is there a handy command that I can run on a PDF file that will list the fonts that will be sustituted if converted in gs ?14:24.13 
kens No14:24.20 
bananapie :(14:24.24 
kens Any font which is not embedded in the PDF file will be substituted by another14:24.36 
bananapie ok14:24.40 
  thanks14:24.42 
kens THe substution process for simple fonts is complicated and impossible to describe14:24.52 
  For CIDFOnts either you have a substitute defined in cidfmap, or you get DroidSans14:25.09 
rayjj well, it _is_ /ghost/script14:27.45 
  oops, my window was scrolled *way* up14:28.12 
kens wonders what rayyjj was replying to.....14:28.39 
rayjj nm14:28.48 
chrisl rayjj: do you know if the device "finalize" method is something we still use, or should we use the finalize method in the struct descriptor?14:29.38 
rayjj chrisl: hmm... I'd have to research that14:30.12 
kens device finalize methods are *definitely* executed when the device is freed14:30.36 
chrisl rayjj: well, none of the device init macros allow the device finalize to be set, which is why I ask14:30.59 
rayjj chrisl: some of the devices have specific finalize functions, but looking at them, they are all hooked into the structure descriptors, *not* the dev->procs.finalize procedure14:35.43 
chrisl rayjj: so I guess that's the preferred method these days - I must have missed those, as I didn't see them14:36.24 
rayjj the only usage I see is int gx_device_finalize that calls it if it is non-null14:37.03 
kens Yes, that's the one that calls it on a device being freed14:37.20 
chrisl rayjj: so, this fixes the mutex leak on error/interrupt: http://git.ghostscript.com/?p=user/chrisl/ghostpdl.git;a=commitdiff;h=0dd8e2314:37.47 
rayjj chrisl: LGTM14:38.58 
  thanks for finding that one14:39.12 
chrisl rayjj: thanks. It was "good" it still manifested on the master code - made it easier to test!14:39.45 
mvrhel_laptop tor8: so I have a commit on my mupdf repos for the issue with the forms values. This fixes the issues seen with that one file anyway15:49.51 
tor8 mvrhel_laptop: I started looking a bit myself as well, and I think something similar to what you've done is the way forward for now15:51.04 
  however, pdf_to_utf8 allocates a new string, whereas pdf_to_str_buf returns a pointer to the internal storage15:51.35 
  so your patch will leak memory15:51.41 
mvrhel_laptop ah15:51.46 
tor8 mvrhel_laptop: there's a function, pdf_get_string_or_stream which does exactly what pdf_to_utf8 does (except re-encode as utf-8) which is called internally by pdf_field_value15:52.25 
mvrhel_laptop ok let me have a look at that15:52.49 
tor8 there are a few other spots in the pdf-forms.c that call pdf_to_str_buf which should be replaced with pdf_to_utf815:53.10 
  but changing all of them does imply having to free the pointers somewhere as well15:53.26 
  which is more than I wanted to deal with today15:53.53 
mvrhel_laptop tor8: do you want me to just leave this to you and I will push on working with files that have decent text encoding...15:54.55 
tor8 mvrhel_laptop: you can do that. I expect to have to deal with this within a week or two anyway.15:55.36 
  I've spent the day preparing the opengl based viewer for doing separate page and annotation rendering15:56.02 
  all in preparation to do form filling15:56.18 
  mvrhel_laptop: not sure, but the functions I just added in the latest commit on tor/master might be of use to you15:57.24 
mvrhel_laptop ok thanks tor816:01.41 
kens night all16:02.18 
rayjj interesting. The new Dean of the Engineering College at Mizzou is a woman with a biomedical engineering background: Loboa was associate chair of and professor in the Joint Department of Biomedical Engineering at the University of North Carolina-Chapel Hill and North Carolina State University. 19:08.26 
  I guess emphasis in the Engineering college will be toward that :-) The Bioengineering dept. were the "stars" when I was there because we brought in the most grant money. I'm glad that "it's back".19:10.31 
  There was some grant mismanagement (to put it in a P.C fashion) and the department had some rough times for a bit19:11.18 
 Forward 1 day (to 2015/09/10)>>> 
ghostscript.com
Search: