IRC Logs

Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2012/12/07)2012/12/08 
JakeSays is there a windows printer driver that embeds ghostscript? i seem to recall something about mswinpr.drv03:15.04 
  but i can't find its source anywhere03:15.11 
ray_laptop JakeSays: The ghostscript 'mswinpr2' device uses a Windows printer driver to OUTPUT data converted from PostScript or PDF. On the other hand, if you want to be able to "print" to ghostscript, for instance to create a PDF from a Windows APP...04:10.53 
  JakeSays: then what you want is any of several free PDF printer drivers that use ghostscript to convert from PostScript that the Microsoft PSCRIPT5.DLL (generic PostScript printer) driver emits.04:12.05 
JakeSays ray_laptop: what i'm really after is a printer driver i can study. i need to write a windows printer driver that will 'print' to a custom document format04:12.23 
ray_laptop JakeSays: when ghostscript outputs to the mswinpr2, it is acting as an application, not a driver.04:13.29 
JakeSays ray_laptop: hmm. so mswinpr2 isn't an actual printer driver?04:14.46 
ray_laptop JakeSays: Unless you have the Microsoft driver development kit (DDK) I don't know of simple examples. I have done some Windows drivers (years ago) prior to the Vista/Win7 XPS based printing system.04:15.07 
JakeSays ray_laptop: yeah i have the ddk. i also did printer driver work, but it was back in win 3.104:15.51 
  so my memory is a bit rusty04:16.00 
ray_laptop JakeSays: no. mswinpr2 just makes calls to output to a printer. The source is in gs/base/gdevwpr2.c04:16.17 
JakeSays xps would be awesome, but its not supported on old xp machines04:16.45 
ray_laptop for the mswinpr2 ghostscript device, gs just makes a bitmap and outputs that using GDI calls to whatever printer is selected04:17.15 
JakeSays ah ok, so yeah mswinpr2 isn't what i'm after04:17.43 
  hmm. although i could probably prototype using svg. maybe print to ps, convert to svg04:19.50 
ray_laptop JakeSays: if what you want is to print to a certain type of printer, you may be able to write a ghostscript device (or modify an existing one) then use Redmon as your port monitor and install a 'PostScript' printer (what Windows thinks is a PS printer) -- then your gs device formats the data on the back end04:20.10 
  JakeSays: what are you trying to get _to_04:20.34 
JakeSays ray_laptop: capture printed forms and extract data from them04:21.08 
ray_laptop JakeSays: Oh. Ghostscript can do that -- maybe without even needing a custom device. What data are you trying to get ? text ?04:22.06 
JakeSays ray_laptop: text and its x,y position04:22.34 
ray_laptop Ghostscript has a 'txtwrite' device04:22.47 
JakeSays and maybe some line data for context, etc04:22.51 
  hmm04:23.04 
ray_laptop JakeSays: see http://http://www.ghostscript.com/doc/9.06/Devices.htm04:23.58 
  section 4.6 describes the 'txtwrite' device04:24.26 
  JakeSays: -dTextFormat=0 is probably what you want04:25.05 
  Format 0 is intended for use by developers and outputs XML-escaped Unicode along with information regarding the format of the text (position, font name, point size, etc).04:25.26 
JakeSays ray_laptop: ah yeah. that would work perfectly!04:25.31 
  xml even!04:25.54 
ray_laptop why not -- everything else is XML it seems04:26.36 
  (or claims to be)04:26.50 
JakeSays that will make prototyping extremely easy04:26.59 
ray_laptop right04:27.06 
  good luck.04:27.15 
JakeSays ray_laptop: thanks for the help!04:27.26 
ray_laptop I'm going to head to dinner, but I'll check the logs here when I get back to see if you've had other questions. 04:28.10 
JakeSays ray_laptop: sounds good. thanks04:28.20 
ray_laptop you are welcome04:28.28 
robin_watts_mac hey henrys 05:36.26 
  Have you arrived?05:36.29 
  For the benefit of ray_laptop and henrys: The plan is to meet tomorrow for breakfast at 8:3005:40.03 
JakeSays ray_laptop: that worked perfectly! no need for a custom print driver :)05:47.19 
ray_laptop hi, robin_watts05:53.23 
  JakeSays: great !05:53.34 
JakeSays ray_laptop: do you have a sense of how difficult it would be to extend the text device to also detect/output long vertical and horizontal lines?05:53.36 
robin_watts_mac hi ray05:53.59 
ray_laptop JakeSays: well, there are several ways applications draw lines. Adding a txtwrite_stroke_path and/or txtwrite_fill_path proc to the device's procs would catch most of them. Then you just have to analyze the path.05:55.39 
JakeSays ray_laptop: sounds like it'd be easy enough to test:)05:57.26 
ray_laptop JakeSays: but I've seen STOOPID Excel output that does vertical lines as a column of thousands of short lines, where the length of the short line is the width of what ends up looking like a vertical line.05:57.37 
JakeSays damn05:57.53 
  well fortunately the scope of the application output i have to support is very limited05:58.19 
henrys ray_laptop and I ate at knuckles, no fine dining for us slobs05:58.21 
ray_laptop and other apps sometimes do lines as images. But if you have a constrained set of apps that generate the data, you can customize it05:58.31 
JakeSays right05:58.40 
  heh. we do have a few apps that output selective fields as images to make our capture process harder05:59.20 
henrys robin_watts_mac: thanks for getting the email to me.06:00.18 
ray_laptop JakeSays: the "trace" devices can be used to see what the application is generating once it percolates through the parser/graphics_lib into device proc calls. "tr_mono" (base/gdevtrac.c) might make it simpler for you to see what you need to do06:03.08 
  JakeSays: If you want to use the trace devices, you need to add them to the DEVICE_DEVS list in psi/msvc.mak -- just add it to the end of DEVICE_DEVS2= ... $(DD)tracedev.dev06:10.50 
  JakeSays: unfortunately, since the tr_ devices aren't used, it seems that it has bit-rotted.06:11.19 
robin_watts_mac henrys: np.06:11.47 
robin_watts_mac beds.06:12.11 
ray_laptop g'nite, robin_watts06:12.40 
  the internet at this hotel (Hyatt Burlingame) really sucks06:23.11 
  Miles just changed breakfast to 8:30 (I thought it was 9:00)06:26.37 
  I better get my beauty sleep ;-)06:26.56 
JakeSays ray_laptop: i just encountered a pdf that outputs every char as 0xffff - example: <char bbox="397 333 400 333" c="&#xffff;">06:43.25 
kens JakeSays the txtwrite device is very new if you find problems with it please report them on Bugzilla, along with a file which exhibits the problem and a command line and I'll take a look at it.13:10.31 
Pure Hi.17:14.34 
robin_watts_mac Hi17:14.45 
Pure I'm trying to print via CUPS and I get this message on lpstat -p17:14.51 
  /usr/lib/cups/filter/gstoraster failed17:14.53 
  Is this a GS problem now?17:15.05 
robin_watts_mac You probably need to speak to tkamppeter_ - that sounds like a cups issue.17:15.20 
chrisl Pure: gstoraster is a cups "product". Your problem may be a gs issue at its core, but it will need to go to the cups people so they can tell us exactly how to reproduce the issue in Ghostscript.17:17.30 
Pure I've been trying to get this to work for two hours, heh.17:17.33 
tkamppeter Pure2, you need to switch CUPS to debug logging mode (command line "cupsctl LogLevel=debug"), then clear the queue ("cancel -a") and print the failing job again, this way you get much more info in error_log.21:13.24 
 Forward 1 day (to 2012/12/09)>>> 
ghostscript.com
Search: