| <<<Back 1 day (to 2021/02/02) | Fwd 1 day (to 2021/02/04) >>> | 20210203 |
jeanb | i have a semi-random question re: ghostpcl | 01:45.16 |
| i'm trying to convert a pcl file to a pdf, but it looks like ghostpcl is swapping out arial for nimbus | 01:45.39 |
| is it possible to load arial to my system so ghostpcl can use it? | 01:46.04 |
| i think the font code is 16602 | 01:46.15 |
chrisl | jeanb: You cannot, no. And why would you care? | 07:33.05 |
artifexirc-bot | <chrisl> @KenSharp ping | 09:30.58 |
| <KenSharp> pong | 09:31.11 |
| <chrisl> I've two commits for your consideration (top two): https://git.ghostscript.com/?p=user/chrisl/ghostpdl.git;a=summary | 09:32.06 |
| <KenSharp> Bug 703454 looks good, neater than I expected | 09:33.09 |
| <KenSharp> The other one is the slightly bonkers security report ? | 09:33.36 |
| <chrisl> Yeh, it's from https://bugs.ghostscript.com/show_bug.cgi?id=703452 | 09:33.59 |
| <KenSharp> That's what I thought yes. It would be helpful to be able to run the entire problem but I can't say I'm too bothered by it. I guess it makes sense to cover the possibility | 09:34.39 |
| <KenSharp> But really, if you run with no security, what do they expect ? | 09:34.54 |
| <KenSharp> The fix looks fine though | 09:35.07 |
| <chrisl> Well, from the Postscript they sent, I can see what allows the problem, but to actually make it happen now means running with -dNOSAFER (doh!), *and* breaking the internal security measures - so I don't think it's ever likely to arise in real life. *But* it a (relatively) rarely traverse piece of code, so I'm not so worried about a couple of extra checks | 09:36.55 |
| <KenSharp> Yes that was what I felt. I did read the PostScript and made some guesses about what it was doing. I wouldn't want to add massive type checking all over the place but it's fair enough for the error handler | 09:37.44 |
| <chrisl> So, if someone changes the our code to remove security measures, *and* runs with -dNOSAFER and expects it to be secure, then I'm afraid they are beyond help | 09:38.31 |
| <KenSharp> That was pretty much my conclusion even before your proposed fix 🙂 | 09:39.15 |
| <KenSharp> Both look fine to me | 09:39.22 |
| <chrisl> Cool, pushed. Thanks | 09:39.34 |
| <KenSharp> I'll pull them over to pdfi later, I'm trying to remember how txtwrite works.... | 09:39.58 |
| <chrisl> And (wrong channel!) I'm going to change the byte * to char * in the pdfi_load_font_by_name_string() for pdfi | 09:40.44 |
| <KenSharp> I did wonder why we were here, but its not a problem 😄 | 09:41.03 |
| <KenSharp> I thought @NancyABQ made that change already, maybe I misread here commit | 09:41.19 |
| <chrisl> Well, Tor is talking mupdf on #artifex, so I figured this would avoid clashing with that | 09:41.43 |
| <KenSharp> Not a problem | 09:41.54 |
| <KenSharp> And yeah, @NancyABQ commit last night changed the byte * to a char * | 09:42.09 |
| <chrisl> Okay, cool, forget that then! | 09:42.44 |
artifexirc-bot | <KenSharp> returns to cryptic note scribbling | 09:43.32 |
| <ator> #toomanychannels! | 10:37.54 |
matvils | Hi! I have maybe stupid question, that bugs me. | 13:28.43 |
| It is possible to use ghostscript to make Raster Image processing scripts for offsetprinting? | 13:28.47 |
| Basicly thouse are monohrome tif files, linear or stochastic screening. I managed to get some results with tiffsep1 and ghostscripts default ps file. | 13:28.53 |
| Second, is it posible implement some color corection with ghostscript? | 13:28.58 |
| Of course i have licensed RIP software, that do the job, but i want to move some workflow to linux stations. Maybe there is some caveats, that will kill my idea in begining? | 13:29.04 |
artifexirc-bot | <KenSharp> I don't know what you mean by 'scripts' in this sens. Ghostscript can produce monochrome TIFF files from PostScript or PDF input | 13:29.30 |
matvils | I managed to do that. But is there way to manage color corection? My guess is icc profiles? | 13:31.44 |
artifexirc-bot | <KenSharp> Ghostscript offers colour management via ICC profiles. This is documented | 13:31.58 |
| <KenSharp> in the ghostpdl/doc folder is GS9_Color_Management.pdf | 13:32.39 |
matvils | Then basicly i need to study mode postscript to configure screening and generate some icc profiles to implement. Thanks. | 13:36.23 |
jeanb | chrisl: the font is definitely arial, but it's getting swapped out for nimbus mono, which i think is throwing off the PDF file appearance when we're going from pcl to pdf. | 14:15.38 |
| i ran the pcl file through the 'pcl paraphernalia' prn file analysis utility. | 14:15.58 |
chrisl | Well, as I said (privately) we can't use Arial. | 14:16.11 |
| Next sily question: have tried raster output, and checked that looks correct? | 14:16.29 |
jeanb | i totally get that, but according to the ghostpcl mapping it should map to a sans font - not a mono? | 14:16.42 |
chrisl | It should be using NimbusSansNo2-Regular | 14:17.18 |
| Having said that, PCL font selection is not a simple mapping. It's a "best fit" based on the characteristics given, IIRC | 14:18.19 |
jeanb | tried rasterizing out of acrobat (again, a noob here) and it looks the same as the pdf | 14:20.06 |
chrisl | I meant the PCL, not the PDF | 14:20.26 |
jeanb | ah. what tool can i use to do that? | 14:21.36 |
chrisl | I assume you are using ghostpcl - I assume that's why you're asking here | 14:22.03 |
jeanb | yes. so pcl to an image format? | 14:22.46 |
| <---- total noob. | 14:22.54 |
chrisl | What platform are you on? | 14:23.08 |
jeanb | linux | 14:23.22 |
| but i can use mac/win | 14:23.40 |
chrisl | Okay, so something like: gpcl6 -sDEVICE=ppmraw -r300 -o out%03d.ppm input.pcl | 14:25.48 |
jeanb | thanks. the output is very similar to the pdf. | 14:29.46 |
chrisl | Well, it's likely that *something* in the PCL input isn't compatible with our PCL interpreter | 14:31.03 |
jeanb | that could very well be. when running the file command on the file i was given, it's coming up as "ma21-sample-notices.pcl: ASCII text, with CRLF line terminators, with escape sequences" | 14:31.58 |
| whereas the sample files included with ghostpcl come up as some variable of "HP Printer Job Language data" | 14:32.32 |
chrisl | Unfortunately, PCL is something of a moving target, and there's a lot of variation between devices :-( | 14:33.01 |
| There are also fairly fundamental issues converting PCL to PDF that make it unlikely to produce the greatest results, in general | 14:34.12 |
jeanb | i guess this file is being generated by an old mainframe system, so i'm not surprised that the conversion to pdf is a bit iffy. | 14:35.14 |
| paraphernalia shows that there is an unknown sequence, i wonder if that could be messing things up as well. | 14:35.47 |
| <Esc> # *** Unknown sequence *** 377 0 377 | 14:35.57 |
| <Esc>&d@ Underline Disable 41 0 41 | 14:35.58 |
| <Esc>&d#D (#=0) Underline Enable: default 41 0 41 | 14:35.58 |
| <Esc>&f#S (#=0) Cursor Position Stack: Push (Store) 20 0 20 | 14:35.59 |
| <Esc>&f#S (#=1) Cursor Position Stack: Pop (Recall) 20 0 20 | 14:35.59 |
| <Esc>&l#O (#=0) Orientation: Portrait 1 0 1 | 14:36.00 |
| <Esc>&l#S (#=1) Simplex/Duplex: Duplex Long-Edge Bind 5 0 5 | 14:36.00 |
| <Esc>(#N (#=0) Primary Font: Symbol Set (0N = ISO 8859-1 Latin 1) 1 0 1 | 14:36.01 |
| <Esc>(s#B (#=0) Primary Font: Stroke Weight: Medium 296 0 296 | 14:36.01 |
| <Esc>(s#B (#=3) Primary Font: Stroke Weight: Bold 296 0 296 | 14:36.02 |
| <Esc>(s#H Primary Font: Pitch (# characters per inch) 82 0 82 | 14:36.02 |
| <Esc>(s#T (#=16602) Primary Font: Typeface (16602 = Arial) 1 0 1 | 14:36.03 |
| <Esc>*c#A Rectangle Size Horizontal (# PCL units) 5 0 5 | 14:36.03 |
| <Esc>*c#B Rectangle Size Vertical (# PCL units) 95 0 95 | 14:36.04 |
| <Esc>*c#P (#=0) Fill Rectangular Area: Solid Area 95 0 95 | 14:36.04 |
| <Esc>*p#X Cursor Position Horizontal (# PCL units) 110 0 110 | 14:36.05 |
| <Esc>*p#Y Cursor Position Vertical (# PCL units) 220 0 220 | 14:36.05 |
| <Esc>*t#R (#=300) Raster Graphics Resolution (300 dots-per-inch) 5 0 5 | 14:36.06 |
chrisl | I don't use Paraphernalia, so I've no idea how complete it is, nor what device(s) it targets | 14:38.06 |
| I suppose another option is to see what an actual PCL printer does with the input | 14:39.05 |
ray_laptop | jeanb: a debug build of gpcl6 running with -ZI will dump what we are interpreting (in a sort of disasm format) | 16:26.20 |
| <<<Back 1 day (to 2021/02/02) | Forward 1 day (to 2021/02/04)>>> | |