Page 1 of 2

PostScript Support?

Posted: Sun Dec 20, 2020 3:45 pm
by cmfk
So I went ahead and got the retroprinter to connect to an ancient Sun workstation to enable PDF creation on printouts. After a whole lot of playing around with settings I couldn't get anything sensible out of it. Turns out it outputs postscript(?) which this doesn't seem to support? Are there any plans to support it or have I missed something?!

Re: PostScript Support?

Posted: Sun Dec 20, 2020 5:22 pm
by RWAP
I did not realise that some computers / equipment would just print to postscript rather than HP PCL.

You should be able to overcome this by editing /home/pi/printpcl.sh (line 124):

Code: Select all

gpcl6 -dNOPAUSE -sDEVICE=pdfwrite -r720 -g$pageSize -sOutputFile="${outputDir}/${pdfPrefix}$(date +'%Y-%m-%d_%H%M%S').pdf" -sColorConversionStrategy=RGB "$filename"; 
Try replacing this with

Code: Select all

ps2pdf "$filename" "${outputDir}/${pdfPrefix}$(date +'%Y-%m-%d_%H%M%S').pdf";
This is untested at the moment. Add some captured sample files if I need to investigate please (as I don't have any postscript files).

I don't know if the -g$pageSize parameter could be used to stipulate the output page size

Re: PostScript Support?

Posted: Sun Dec 20, 2020 6:04 pm
by cmfk
Thanks for the quick reply, I'll give it a go tomorrow when I'm back in work and let you know how it goes!

Re: PostScript Support?

Posted: Mon Dec 21, 2020 2:53 pm
by cmfk
Hi again,

So I went ahead and made the change, originally it had some error where it’d create endless PDF’s from one printout. Checked the change I made and hadn’t capitalised something in the code. Changed that and now it doesn’t create any PDF’s.

Which files would you like me to upload?

Re: PostScript Support?

Posted: Mon Dec 21, 2020 3:10 pm
by RWAP
cmfk wrote: Mon Dec 21, 2020 2:53 pm Hi again,

So I went ahead and made the change, originally it had some error where it’d create endless PDF’s from one printout. Checked the change I made and hadn’t capitalised something in the code. Changed that and now it doesn’t create any PDF’s.

Which files would you like me to upload?
Upload a sample postscript file (from /home/pi/data/raw/) and your printpcl.sh file - did you change it usingthe nano editor, or in Windows?

If you changed the script file in Windows, you may have inadvertantly changed the line endings!

Re: PostScript Support?

Posted: Mon Dec 21, 2020 5:39 pm
by cmfk
Files attached, I did edit the file using the nano editor so line endings should be unchanged. 2 .raw files and the printpcl.sh attached

Re: PostScript Support?

Posted: Wed Dec 23, 2020 6:55 am
by RWAP
OK I seem to have it working here - can you please try:

https://www.dropbox.com/s/9buj3z15228qw ... 8.img?dl=0

You will need to set /root/config/emulation
to
PS
(it is currently HP)

Re: PostScript Support?

Posted: Wed Dec 23, 2020 3:38 pm
by cmfk
Lovely, many thanks for the work done on this! I'll give it a go as soon as I can and let you know how it goes.

Thanks again!

Re: PostScript Support?

Posted: Tue Dec 29, 2020 1:31 am
by cmfk
Hi again,

So I got the new version installed and set the emulation to PS, now it's creating blank PDFs? Was there anything else I needed to change and curious to know if you managed to create PDFs with the data and what they looked like?

Added files again incase they're needed

Cheers

Re: PostScript Support?

Posted: Tue Dec 29, 2020 9:03 am
by RWAP
cmfk wrote: Tue Dec 29, 2020 1:31 am Hi again,

So I got the new version installed and set the emulation to PS, now it's creating blank PDFs? Was there anything else I needed to change and curious to know if you managed to create PDFs with the data and what they looked like?

Added files again incase they're needed

Cheers
I shall try this again here when I get a chance - did you restart the Retro-Printer after changing the emulation configuration ?

Rich