LPR: what is the location of the file that will be sent to the printer? - printing

For a research project about printing nanofluids I need some more control over my Epson Stylus SX600FW.
I am sending a file to the printer using lpr test.ps, then it is in the print queue. Now I want to see the file (in pdl?) that the printer driver will send to the printer. Where is the temp storage location of this file?
Or is there any other way to obtain this file? This file should contain ESC/P-R sequences in which I want to make some changes and then send that file to the printer.

Using the URI file:/tmp/ouput.prn, and by configuring it with the (gimpprint) driver of your printer, you can obtain the output that is being sent to the printer.
This is a hexadecimal file. Using the parse-escp2 perl script from the test directory of gimp-print you can view this file in a bit more understandable format.

Related

Converted pcap file not able to load in veloview

I have captured udp log files. I can create the pcap file with captured udp data from log file using pcapDotnet but the newly created pcap files im not able to open veloview.exe. Tool itself getting crashed but same pcap files i can open in wireshark.
Wireshark captures and opens network-level traffic (meaning all kind of packets)
Veloview expects packets generated by Velodyne Lidars, with a specific dataformat (it runs at application level). Please check that your pcap file contains the original datapacket format.
For now, Veloview only reads Velodyne generated data, saved as legacy ".pcap" files (no .pcap.ng, and newer formats). So please try saving in this format.
Best regards,
Bastien Jacquet, VeloView Lead Developer

How to print with PCL

I have Xerox workcenter 7120, this printer is on network. I would like to print pdf file with PCL command from Linux host. My printer support PCL.
But I don't know how can I send print job on my printer with PCL.
I have find this document how explain all PCL command pcl command xerox
PCL itself is quite complex, so it's not that easy to give simple answer to your question.
First you need to convert PDF to PCL data and then you send PCL data to printer. AFAIK, GhostScript utility can do the conversion for you.
BTW, check if your printer supports PJL and possibly direct PDF printing. That could be much easier to implement since there is no need to use PCL at all.
In general, you connect to your printer's IP address, port 9100 (default) and send series of commands (PJL and/or PCL) along with actual PDF (if your printer supports it).
Example:
%-12345X#PJL COMMENT *Start Job*
#PJL JOB NAME = "test"
#PJL ENTER LANGUAGE = PDF
... actual PDF binary contents goes here ...
%-12345X#PJL EOJ NAME = "test"
%-12345X
%-12345X - escape sequence for PJL
#PJL [something] - PJL command

Ghostscript output to file with ESC-P sequences

For a project (printing nanofluids with an Epson printer) I want to see the the code that the computer sends to the printer. I am running Ubuntu 16.04 and have an Epson Stylus SX600FW printer.
Using Ghostscript 9.18 I am trying to print a simple file test.ps and I want to obtain the output file that is being send to the printer. This file should contain some ESC/P sequences if I am right.
I tried to obtain such a file using:
gs -sDevice=epson -sOutputFile=test1output test1.ps
Whatever I try, I can't find the output file anywhere, so I doubt it is even created. Then next if I have the output file, how can I read the ESC/P sequences? Thanks in advance!
For me, that command line results in a file called 'test1output' in the current directory. If you are unable to find the file you could try specifying a complete path and file spec, or at least -sOutputFile=./test1output
As for reading the sequences, any binary editor will read the file.

File format of spool files with .tmp extensions?

In many Windows setups, when you print directly to a printer, two files are typically created in the windows spool directory "C:\Windows\System32\spool\PRINTERS". A spool file "80021.SPL" and a shadow file "80021.SHD" are examples of these files. The spool file contains the meat and potatoes of the drawing instructions so the printer can print the page. The data in this spool file comes in a smorgasbord of different formats depending on the language technology and the print driver used. However, when you are printing to a printer that's on a print server, a single ".TMP" file is created instead and gets transmitted to the print server. I think its fair to assume that this is just the .SHD and .SPL files combined into a single transport file to get it to the server. However, its unreadable, i'm nto sure if its zipped, encrypted, or what, but I can't decipher it. When printing PDFs you can typically see plain text PostScript instructions in the spool file (.SPL), by just opening it and viewing it in a text editor. You can even send that spool file (.SPL) to a postscript viewer like GhostScript and have it show you the pages drawn on screen. But when the job is all packaged up in a .TMP file, its basically just a binary pile of bits. Does anyone know how to uncompress the data from these transport .TMP spool files?
I believe that file you have will be an EMF file that is padded with a proprietary MS structure at the beginning. Easiest way to find out if you are dealing with an EMF structure is to look for the ANSI characters ' EMF' in tmp file you have.
Assuming that you do find these characters it is just a matter of removing the proprietary structure data from the beginning of the file then treating it as a standard EMF file. Fortunately all EMF files have a standard header format so it should be reasonably to determine where the EMF file starts.
There is a good description of EMF file headers here

Convert a text file with Embedded HP Printer Codes to PostScript

I have an application that prints by generating text files with embedded printer codes, then basically just copies the file to the printer to print. I need to take that print file and convert it to an image - just as if it was printed then scanned.
My first thought was to setup a printer with a postscript printer driver attached to a file port, and then run the result through ghostscript to create a tiff, but it isn't working.
Any ideas?
The printer codes are probably PCL. Maybe pcl-parser could serve as a start for your own tool to do this? There also seems to be a commercial product called PCLXForm.
Edit: Also investigate GhostPCL.

Resources