m.roth at 5-cent.us
2018-Apr-12 15:06 UTC
[CentOS] Windows PC PostScript printer driver -> CUPS data import fails
Yan Li wrote:> On 04/12/2018 03:08 AM, Gary Stainburn wrote: >> The PDF contains: >> >> ERROR: invalidfileaccess >> OFFENDING COMMAND: .findfont >> OPERAND STACK: >> r >> /usr/share/X11/fonts/Type1/UTBI____.pfa >> --nostringval-- >> true >> NimbusMonL-Regu >> Courier >> --nostringval-- >> Courier >> 4544317 >> Courier >> Font >> Courier > It seems that .findfont can't find a font file that the PS file is > asking for. Is it possible that your Windows 10 is printing using some > new fonts that your CentOS doesn't have? > > 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. >I'd recommend, to start, installing msttcorefonts, and see if that helps. mark
Gary Stainburn
2018-Apr-12 15:18 UTC
[CentOS] Windows PC PostScript printer driver -> CUPS data import fails
On Thursday 12 April 2018 16:06:06 m.roth at 5-cent.us wrote:> Yan Li wrote: > > > > It seems that .findfont can't find a font file that the PS file is > > asking for. Is it possible that your Windows 10 is printing using some > > new fonts that your CentOS doesn't have?That would make sense> > > > I'd try: > > 1. Use ps2ascii instead of ps2pdf+pdftotext.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.> > > > 2. Copy all font files from Windows 10 to your CentOS. Maybe put them in > > ~/.fonts and see if that could make ps2pdf happy. > > I'd recommend, to start, installing msttcorefonts, and see if that helps.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.
m.roth at 5-cent.us
2018-Apr-12 15:23 UTC
[CentOS] Windows PC PostScript printer driver -> CUPS data import fails
Gary Stainburn wrote:> On Thursday 12 April 2018 16:06:06 m.roth at 5-cent.us wrote:<SNIP>>> I'd recommend, to start, installing msttcorefonts, and see if that >> helps. > > 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 theoriginal> method lost.Also, if you're printing to pdf in Windows, see if there's an option to "embed font". mark