Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2019/11/13)Fwd 1 day (to 2019/11/15) >>>20191114 
brenku2 Good afternoon10:43.12 
kens Good Morning :-)10:43.25 
brenku2 I have a question for someone in the know10:43.39 
  Oho, you said morning. I'm in Finland so we just had lunch ;)10:43.51 
kens I'm in the UK so its still morning here10:44.06 
brenku2 We use ghostscript as an automated service on a local server to convert our postscript files.10:44.34 
  We talked a few months ago actually, kens10:44.47 
  Anyway10:45.09 
kens I'm afraid you'll have to excuse me, I have practiclally no memory at all :-(10:45.10 
brenku2 Same here xD10:45.16 
  I only know from my notes I took10:45.21 
  I am writing documentation on this10:45.32 
  and I wanted to put the ghostscript logo in the documentation10:45.44 
  but wanted to make sure I was allowed to do that10:45.53 
kens Ah, that's going to be a non-technical question I can't answer10:46.03 
brenku2 oho10:46.11 
kens You would have to check with the commercial type people in the office.10:46.20 
  Which is in California10:46.31 
brenku2 ah ok. I know we are not needing a license10:46.58 
kens I'm not even sure who to ask....10:47.02 
brenku2 For our use case I mean10:47.04 
kens This is internal only docuymentation right ?10:47.15 
brenku2 Yes10:47.19 
  In case I die or get fired. :P10:47.28 
kens Well I can't believe that would be a problem but its wise to check10:47.35 
brenku2 ok10:47.38 
kens give me a minute to look for an email address10:48.02 
  OK I suggest you contact Kate Degennaro10:48.58 
brenku2 Thank you Kens10:49.07 
kens That's (spelling the email address) kate dot degenarro at artifex.com10:49.19 
  Do make it clear this is all internal, ntohing being published, not on the wider net etc.10:49.42 
  You oculd also mention me and suggest she asks me if in doubt about what its for10:50.21 
  I can probably remember that long :-)10:50.34 
brenku2 haha, ok, I will do so10:50.43 
  I don't NEED to add it, just kinda wanted to :)10:50.52 
kens Yeah its fair enough, I can't see anyone will have a problem, but yes, good to ask10:51.09 
ZeroWalker how can i use a font like verdana in postscript? i was able to figure out some coding yesterday, but am limited by the fonts available on postscript itself16:05.22 
chrisl ZeroWalker: It very much depends on the context16:07.32 
ZeroWalker elaborate please16:08.28 
chrisl Do you want to send the Postscript to a printer, for example16:09.09 
ZeroWalker ah yeah that's the plan, to have a template where i can switch out text and just print it without relying on some extra software. Currently it seems very possible, i kinda set up most stuff, but the font is a bit messier16:12.37 
chrisl In that case, you will need to embed the font in the Postscript job16:13.06 
kens Verdana is a TrueType font. To send that to the printer you would need to embed it in the PostScript. PostScript does not support TrueType directly so you would have to convert it into a Type42 font16:13.22 
  That's not trivial16:13.42 
chrisl ZeroWalker: Type42 fonts are covered in the PS reference manual16:20.39 
ZeroWalker oh16:25.07 
  doesn't the drivers sometimes say something about truetype though, i think i recall seeing something like "download truetype font"16:25.39 
chrisl That embeds a Type4216:25.59 
ZeroWalker can i make it do that for me perhaps?16:26.24 
chrisl Make what do what?16:26.41 
ZeroWalker the type42 thing, so i say "use truetype here" the drivers does the magic? as it was kinda complex, and if the driver already has the mechanism for it, it would be neat to use it if possible16:27.36 
chrisl I thought you were writing the Postscript16:28.05 
ZeroWalker i am, i was just wondering if you could do "use trueype here" and the drivers could see that pseudo ps code. Not sure how it's handled normally. I know very little how printers/drivers works as you can surely tell16:29.23 
kens If you are writing the PostScript you cannot use the print system16:29.52 
ZeroWalker ah okay16:30.10 
  can i make it do a type42 code for me and just myself embed it? (am guessing not, as it's probably just sent directly to the printer)16:30.50 
  i am just thinking of shortcuts as it wasn't trivial to do what i wanted16:31.09 
chrisl You'd almost certainly get a subset font, which would be of limited use16:31.16 
kens The printing system does not embed the entire font, it only embeds what it needs for the PostScript program16:31.23 
ZeroWalker subset font? you mean a close enough font?16:31.41 
kens As chrisl says, a subset font, and one encoded specifically for the order of use of the glyphs in that particular input16:31.46 
  No, a subset font is one which only contains a subset of the glyphs in the original font16:32.00 
  So if you Send a document containing the text 'Hello World' then teh PostScript program will contain a font which has definitions of the characters 'H', 'e' 'l', 'o', 'W', 'r' and 'd'16:32.47 
  And no others16:32.50 
ZeroWalker ah, but if you do a type42, doesn't it make a font out of it, or does it just make a font of that scale? I would think it does the whole thing somehow, as truetype is (from my understanding) similar to ps fonts in that they are vector based16:32.51 
  ah16:32.59 
  make sense16:33.24 
kens These days all fonts are vecto rbased, and therefore scalable, doesn't mean that a consumer of a given font type can consume a different fotn type16:33.46 
  A TrueType font consumer might well not be able to use an OpenType font for example16:33.59 
ZeroWalker well i guess i need to try to make that Type42 font, unless there's a similar font that's in ps already that i can use.16:34.06 
kens Thjere are no fonts 'in' PostScript16:34.20 
  Most PostScript interpreters ship with the base 35 fonts, but that's not a requirement16:34.38 
  And those fonts are generally in Type 1 format, or more recently type 2 (CFF) format16:35.04 
ZeroWalker yeah i don't expect them to talk to each other, i just thought as they are based on the same principle, a conversion is possible, but it's probably a lot harder than i wish it to be16:35.04 
kens Cubix splines and beziers for example16:35.17 
  TrueType uses cubics, PostScript fotns use Beziers16:35.31 
ZeroWalker ah my bad, so the standard itself expects those 35 fonts to be available?16:35.38 
kens No16:35.43 
  Most implementations ship with those fotns, its not a requirement16:35.53 
ZeroWalker ah and one can't just "convert" between those?16:35.55 
kens You can, and FotnForge, for example, does so16:36.09 
ZeroWalker ah damn, i hate it when it's like "oh this stuff is optional, but it's kinda expected"16:36.11 
kens But because the representations are different, there are bound to be some differences16:36.22 
ZeroWalker well i can check it out, was trying to find stuff but couldn't find anything that either wasn't fishy or might have licensing tied to it16:36.57 
kens You won't find a PostScript pritner which does not have the base 35 fonts in the real world16:37.02 
ZeroWalker good to know, but it's frustrating when you have those, unwritten rules so to speak16:37.48 
kens Its a 'de facto' standard16:38.02 
ZeroWalker i like it when stuff are in the standard, you either comply with it, or you don't;P16:38.11 
kens Because a pritner with no fonts was (back in the 1980s) pretty much useless16:38.22 
chrisl ZeroWalker: fontforge can open a truetype and export a Type4216:38.33 
kens did mention FontForge, albeit with a typo....16:38.52 
chrisl kens: Yeh, but that converting TTF to PS outlines, I thought16:39.20 
ZeroWalker how has ps changed, when i looked around trying to find code examples to learn it (which im ust say is very hard to find) it seemed to mee that it's been the same for 30 years16:39.39 
kens PostScript has not changed for eomthign like 20 years16:39.51 
  There have been 3 revisions I think the last was 199816:40.12 
  Well according to the 3rd eedition PLRM 199916:40.38 
chrisl A couple of rather niche additions shortly after that16:40.48 
ZeroWalker not saying that it might matter as it doesn't seem change anything, to me it just looks like you draw stuff and i can't see what you can't do currently. But i will say that it could surely be cleaner (but then again i probably write like crap)16:41.04 
  ah16:41.08 
kens The PLRM is a model of clarity IMO16:41.19 
ZeroWalker well that newer than i thought16:41.21 
  plrm?16:41.29 
kens Try reading the ISO PDF 2.0 specification :-(16:41.32 
  PLRM = PostScript Language Reference Manual16:41.41 
  And if aht doesn't make your head spin, try the JPEG 2000 spec16:42.06 
ZeroWalker i looked at that yesterday, reminded me of some other reference manual i looked at, it's like a billion pages, and there's like small parts here and there that are actually useful (for me)16:46.22 
  but it mentioned type42 right? i just got my font i think, so i gotta look how to import it16:46.45 
kens plrm covers type 4216:48.04 
chrisl You'll have to read other bits, too, because there are keys common to all font types16:48.45 
ZeroWalker well at least prlm has masters the arts of vague16:49.44 
chrisl I'm not sure you're reading it correctly, then. It's one of the clearest specifications I've read16:50.26 
ZeroWalker wrong wording, didn't mean vague16:52.06 
  can't come up with the word, but, like indirect? But it's most likely cause i am a very slow learner, and when i read a ton of stuff that put bits together, i have a hard time getting the full picture16:52.58 
  i like to get the full picture, then break it apart, so i kinda work backwards, which is stupid i know16:53.19 
kens There's a lot to it, and one of the reaons its large is because it tries to be both comprehensice, covering all the edge cases, and clear, including lots of examples16:53.45 
chrisl Of course, fonts, in general, are whole level complexity of their own16:55.03 
ZeroWalker and that's very good, just because i have a hard time with it doesn't mean that i think it's in anyway bad. I love when things are precise, otherwise it becomes the thing i said wrong (vague), and a standard that's vague is horrible16:55.14 
  btw how can i open a .ps with ghostscript, i couldn't figure out the commands for it so i drag/drop which is annoying16:56.00 
kens gs file.ps16:56.07 
  On Linux.16:56.12 
  On WIndows gswin32/gswin32c/gswin64/gswin64c file.ps16:56.29 
  The Windows executables come in two possible word sizes, 32 or 64-bit and either a command line or windowed version16:56.59 
ZeroWalker yeah and i am on windows.. it's like when i wanted to convert to png, i couldn't figure out how to make it work on windows so i used linux, i love windows but on terminal stuff it's a long way from linux in my view (love that on linux)16:57.17 
kens And if you use the windowed executable, it supports drag and drop16:57.27 
ZeroWalker yeha i got that c file, i tried using that16:57.28 
  i will check again16:57.32 
  i probably wrote something different16:57.36 
kens Windows and Linux command lines for Ghostscript are pretty much the same16:57.59 
chrisl Well, if you want to output a png, you need the relevant options for that16:58.05 
ZeroWalker nice worked16:59.18 
  but windows didn't have the -sDevice stuff i think, at least i could never get it to work16:59.44 
chrisl -sDEVICE16:59.59 
kens it is exactly the same as Linux17:00.00 
chrisl case sensitive17:00.04 
kens gswin32c -sDEVICE=png16m -o out.png input.ps17:00.14 
chrisl ZeroWalker: Do you mind me asking what you are trying to achieve with Postscript?17:02.45 
ZeroWalker yeah but to me it always said that the device doesn't exist. Will try again i hopefully messed up17:03.20 
  chrisl, i mentioned it at the start!17:03.39 
kens well possibly you tried to use a device which isn't built in on Windows (many of the 'contrib' devices are not)17:03.44 
  gswin32c --help will list the available devices17:03.53 
  as chrisl said, the whole thing is case-sensitive17:04.07 
ZeroWalker think it listed those, pretty sure i checked, and i even copypasted. But being me i probably missed something17:05.07 
chrisl ZeroWalker: I was just thinking, rather than get bogged down in the details of font embedding, you might be better to keep it simple, and "pre-process" the Postcript through Ghostscript, before sending it to the printer17:05.22 
ZeroWalker well of course it works, so i did something wrong, that's good to know:)!17:06.46 
kens End of the day, I'm heading off. Will read the logs tomorrow17:07.41 
ZeroWalker well as this might be considered commercial use, it's not really but licensing can be harsh. I don't know if i can use gs to do stuff for me17:08.05 
  cya17:08.11 
chrisl Well, it's AGPL licensed17:08.39 
ZeroWalker and to me it seems it might not comply with my usecase. It's basically for goverment use, templates for archiving, but it might be seen as commercial use17:10.07 
  but i still use it for demoing, hopefully that's ok:d17:10.29 
chrisl Well, the reason is, although *Postscript* can't use Truetype fonts, *Ghostscript* can17:11.07 
ZeroWalker ah17:11.56 
  well that would be neat to use if i could, really nice software17:12.19 
  i recall using it a bit when i learned of PCL and i was able to preview some hardcoded pcl stuff with it. That's where i first heard of it17:13.02 
chrisl Well, that would be GhostPCL, but same family17:13.27 
ZeroWalker yeah know it's not the PostScript version, i have gotten that far!17:14.44 
chrisl It's a different interpreter built on the same graphics back end17:15.28 
ZeroWalker ah so it's only that part that's different, make sense as the rendering should be kinda equal ones you got that setup like you want it to. So you can just "draw 2pixels there" or whatever, so it's just the interpreter and how it talks to it that differs17:17.51 
  makes it sound easy, but i know it for sure isn't17:18.00 
chrisl There are significant differences between the imaging models for PCL and Postscript and PDF, but the graphics back end can be configured to handle them17:18.46 
ZeroWalker ah, well i "know" that PS at least is kinda like "draw this", but that PCL is more systematic and limited in the drawing regard. At least that's how i understand it after reading about them17:21.22 
  cause my interest first came from the drivers, as there's always a PCL and PS version, and i was like, which one is best?17:21.50 
  and to me it seems like it's, PCL = speed, works great for text, everything else you don't know17:22.36 
  PS = works for everything but is slow (PDF is faster generally)17:22.55 
  so you are kinda screwed, but i am leaning towards PS cause of the "always works", but speed can be kinda important (at work)17:23.24 
chrisl Actually, my experience is opposite: Postscirpt is generally faster than PDF, because of the way it's consumed. But it depends on a lot of factors17:23.55 
ZeroWalker wait17:24.23 
  i am sure you meant Postscript > PCL, not PDF17:24.32 
  but really? i have just done very short tests, not sure how to test it well tbh17:25.07 
chrisl No, you said "PDF is faster generally", I'm saying my experience is the opposite17:25.27 
ZeroWalker but wait, i said PDF with PS is faster than PCL with PS, i thought PCL was a nightmare with PDF cause it could generate a shit ton of code if you are unlucky, but with PS it's kinda passhtru17:26.28 
  maybe that's not the case17:26.32 
chrisl PDF/PCL/PS are all different languages - "PDF with PS" or "PCL with PS" I don't understand17:27.19 
ZeroWalker oh17:27.31 
  wait whe i say PDF17:27.38 
  i mean like, printing a PDF file17:27.46 
  i didn't know it was it's own language17:27.53 
  i just see it as a format, a container, and i thought it was using "Postscriptish" ways17:28.19 
  meaning it was meant to be handles with PS for printing, but PCL can handle it, but it can go bad17:28.52 
  i guess that was totally wrong:S17:28.59 
chrisl So PS and PDF are different (but related) page description languages. PCL and PXL are different (but related) page description languages17:29.21 
  But neither PDF nor PS are related to PCL or PXL17:30.07 
ZeroWalker ah well i was kinda close17:30.45 
  i think PXL is PCL6 right?17:30.53 
  and PCL generally means PCL517:30.58 
chrisl Yes, PXL generally means PCL617:31.13 
ZeroWalker but when i say PDF with PCL etc, i mean the drivers doing the conversion, not that you wrote PDF in PCL (or well the drivers do something along the lines i guess)17:31.53 
  that must be true right, cause otherwise the printer would needto know PDF, and i don't think that's common17:32.16 
chrisl It's getting common for printers to be able to consume PDF directly, but it's a bad idea (IMHO)17:32.57 
ZeroWalker why so?17:33.28 
chrisl Postscript and PCL/PXL are streams, whilst PDF is a random access file format17:34.02 
  So to consume PS/PCL/PXL the interpreter only *needs* to store the byte it is currently reading (in practice, they store more than that). Whilst for PDF, you have to store the entire file17:35.07 
  The other side of the coin is that PS/PCL/PXL can't jump to specific pages in a document, where PDF can.17:37.51 
ZeroWalker ah, but is that really a problem nowadays, can't printers have like gigabytes of memory fi they need to, so you can just store the whole thing in RAM and the random access won't matter17:47.47 
  i think17:47.50 
chrisl That's not the only problem (although, profit margins on printers are pretty tiny these days).17:49.41 
  But say you have a 1000 page document, with a lot of photographic type images. With PDF, you have to transfer the entire file to the printer before the printer can even start to print. With PS/PCL/PXL it can start the first page immediately17:51.07 
ZeroWalker i was hoping as process power and memory get cheaper (most of the time lol) it wouldn't be a real issue, but i guess they are so hard pushed17:51.09 
  that's true, and if it's gigantic that's an issue. In my case this would never really matter, but it might be very common in some places to have such huge prints17:52.08 
chrisl "First page out" is an important metric for printers17:52.36 
  None of that really matters, because you're sure as hell not going to want to hand code a PDF, PCL or PXL file!17:53.41 
ZeroWalker yeah was just thinking if you had high speed, and let's say the file is 20mb, 20mb would take 1-2 seconds to tranfer, so it wouldn't really matter if it printed the first page directly or not. Cause the bottleneck wouldn't really be there. But it's kind of an optimal scenario i guess17:54.45 
  maybe not you!!17:54.56 
  btw isn't PXL like a binarystream?17:55.37 
  compared to PCL which is, well text17:55.43 
chrisl No, PCL is binary, too17:55.51 
  Both PCL and PXL are binary streams17:56.16 
ZeroWalker oh, think i read something about PXL being binary. Can't you write PCL, i know i have but, well it's very messy with the characters so i wouldn't call it friendly18:00.33 
chrisl PCL "commands" are escape character sequences. Anything that the interpreter doesn't recognise as a PCL5 escape sequence, it treats as text18:03.15 
ZeroWalker ah that seems to fit how i recall it working18:08.31 
  can you convert an svg to ps or something that's usable in ps?18:40.47 
chrisl ZeroWalker: It is possible yes - *we* don't have a tool that does that, though18:53.07 
ZeroWalker ah, hmm, kinda forgot about that a logo. But i think we have it in .eps, might that be usable?19:06.06 
chrisl Yes. that's exactly what EPS is intended for.19:07.18 
  The normal thing to do is to just include the EPS data in your Postscript file, generally surrounded with the save/restore, just for safety19:08.30 
ZeroWalker ah19:10.51 
  neat19:10.53 
chrisl ZeroWalker: It's up to the surrounding Postscript to get the positioning right, using a translate operation19:11.56 
ZeroWalker make sense, i guess it's at 0,0 first?19:12.35 
chrisl Yes, and in Postscript 0,0 is bottom left19:13.05 
  ZeroWalker: Depending on how well behaved your EPS is, you might also want to look up the "mark" and "cleartomark" operators19:14.53 
ZeroWalker will have to remember that, i don't have the eps at hand so sadly can't try it out right now19:15.37 
chrisl Right, I gotta go19:21.54 
 <<<Back 1 day (to 2019/11/13)Forward 1 day (to 2019/11/15)>>> 
ghostscript.com #mupdf
Search: