Page 2 of 2

Re: PostScript Support?

Posted: Wed Dec 30, 2020 10:29 pm
by cmfk
Thanks Rich, yeah the device was rebooted after changing the configuration.

Re: PostScript Support?

Posted: Thu Dec 31, 2020 7:13 am
by RWAP
Ah I have found the issue - I came across this previously - the EOT character ($04) is causing issues with the capture, so we miss out the next character in the raw data.

I just need to check how I overcame this before

Re: PostScript Support?

Posted: Thu Dec 31, 2020 11:49 am
by RWAP
Please try https://www.dropbox.com/s/k44tu61rzg98d ... s.img?dl=0

This seems to work here but it is difficult getting a meaningful printout from a Windows Postscript driver!

Re: PostScript Support?

Posted: Sun Jan 03, 2021 1:59 am
by cmfk
Hello again, I’ve downloaded the new release but now it doesn’t seem to capture/store any data or create any PDFs! :cry: I don’t think I’ve missed anything in the config, seems to be all set up as per previous attempts!

Any ideas?!

Cheers

Re: PostScript Support?

Posted: Sun Jan 03, 2021 6:51 pm
by RWAP
Sorry - no idea you would need to send me the contents of /root/config and /home/pi/data directories so I can see if I can work out what is going on. It is possible that you need to increase the printer_delay configuration in case you are missing some bytes for example.

However, I can't work out how to write directly to a USB-Centronics adaptor on a Windows PC (it doesn't create a COM / LPT port unfortunately), so I could only test by using a windows printer driver, which doesn't seem to be compliant with GhostScript.

If you use the ps2pdf 1.raw 1.pdf (say) command, what errors do you see - that might give us a clue - though generally the error reports just moan about a byte at a specific file position so you then have to guess. I can't find an online method of checking a postscript file for errors - unless you can!

Re: PostScript Support?

Posted: Sat Feb 06, 2021 12:05 pm
by cmfk
Hi again,

Good(ish) news! I've figured out the issues, but don't know why it's doing what it's doing!

Opened the .raw file in notepad++ and saw some extra characters at the beginning and end of the file, same characters show up in the nano editor as well. By deleting those I could then successfully create a pdf!

There's another issue with a different file, where it seems to create duplicate characters in the raw capture. For example, "Lineto" will become "Liieto" or "Linnto", "Linetoo" etc. There were quite a few of these kinds of errors throughout the raw data, again by going through and correcting these I was able to convert the file to a PDF (there's a very good postscript addon for the Eclipse IDE, which helped check for errors!)

Might you have any idea why those additional characters are captured at the beginning/end of the files and why it might duplicate random characters?

Cheers

Re: PostScript Support?

Posted: Sun Feb 07, 2021 8:12 am
by RWAP
The ^D appears to be a CTRL D character sent by a terminal (End Transmit). You can actually try adding these characters to the /root/config/ignore_characters file on a new line.

The repeated characters tend to be caused by the /root/config/printer_delay setting being too short.

Re: PostScript Support?

Posted: Sun Feb 07, 2021 8:31 am
by cmfk
Awesome, I'll give that a go!

Re: PostScript Support?

Posted: Sun Feb 07, 2021 1:46 pm
by cmfk
So I changed the printer_delay from 5 to 10 initially, but still found the raw data had repeated characters, kept on increasing it all the way to 1000 with no change? Should adding a delay as bit as that make any change to how long the raw file is produced? It didn't seem to take any longer to process the data either way.

The ^D added to the ignore_strings file seemed to work though!