DevHeads.net

Windows PC PostScript printer driver -> CUPS data import fails

Hi all,

For some years now I have been using a simple system I found online which
allows me to easily import data from Windows Programs.

Hopefully others out there are using the system and already have found the
answer to my problem.

I have installed on my Centos server a virtual CUPS printer which receives a
PS file, and then runs 'ps2pdf' and 'pdftotext -layout' to end up with a text
file.

On the Windows PC's it's simply a case of installing a printer pointing to
this server, and using the HP Colour Laster 2800 PS drivers.

Now to my problem. We have finally moved onto Windows 10, and now when I try
to install the printer that model printer is no longer available. When I try
similar HP Colour Laser PS drivers the ps2pdf command fails.

[root@lou inet]# ps2pdf 20180412_104403_tcards.ps
GPL Ghostscript 9.14: Unrecoverable error, exit code 1
[root@lou inet]#

The PDF contains:

ERROR: invalidfileaccess
OFFENDING COMMAND: .findfont
OPERAND STACK:
r
/usr/share/X11/fonts/Type1/UTBI____.pfa
true
NimbusMonL-Regu
Courier
Courier
4544317
Courier
Font
Courier

Has anyone else had this problem, and have they managed to find a solution?

Gary

Comments

Re: Windows PC PostScript printer driver -> CUPS data i

By Yan Li at 04/12/2018 - 11:01

On 04/12/2018 03:08 AM, Gary Stainburn wrote:
I'd try:
1. Use ps2ascii instead of ps2pdf+pdftotext.

2. Copy all font files from Windows 10 to your CentOS. Maybe put them in
~/.fonts and see if that could make ps2pdf happy.

Just my shot in the dark.

Re: Windows PC PostScript printer driver -> CUPS data i

By m.roth at 04/12/2018 - 11:06

Yan Li wrote:
mark

Re: Windows PC PostScript printer driver -> CUPS data i

By Gary Stainburn at 04/12/2018 - 11:18

On Thursday 12 April 2018 16:06:06 <a href="mailto:m.roth@5-cent.us">m.roth@5-cent.us</a> wrote:
That would make sense

I did first try ps2ascii as it was the most obvious choice. However, it gave
nothing like the output I was expecting.

ps2pdf + pdftotext -layout gives me almost exactly how the report originally
looked, apart from the occassional alignment issue.

Thanks for this. I will try these two options if I need to.

However, I have found in Windows 10 there is a printer driver Microsoft "Print
to PDF" which creates a PDF file without the initial PS stage. This is better
because it now keeps some of the non-display characters that the original
method lost.

Re: Windows PC PostScript printer driver -> CUPS data i

By m.roth at 04/12/2018 - 11:23

Gary Stainburn wrote:
Also, if you're printing to pdf in Windows, see if there's an option to
"embed font".

mark