cups-pdf has known issue that text can not be searched or copied from generated PDF files.
I think that using proper PS driver should solve issue. I think that because I noticed that cups-pdf can print proper PDF file if proper ps file is printed. I executed following test.
I created cups-pdf printer
lpadmin -p p1 -v cups-pdf:/p1 -E -P /usr/share/ppd/cups-pdf/CUPS-PDF_opt.ppd
There is testPage.txt text file. I have converted it to ps files in three ways.
enscript testPage.txt -o testPage_enscript.ps
a2ps testPage.txt -o testPage_a2ps.ps
lpadmin -p ps -v file:///cups/prints/testPage_psprinter.ps -E -m drv:///sample.drv/generic.ppd
lp -d ps testPage.txt
I printed all 3 ps files on cups-pdf printer.
lp -d p1 testPage_enscript.ps
lp -d p1 testPage_a2ps.ps
lp -d p1 testPage_psprinter.ps
testPage_enscript.ps and testPage_a2ps.ps were printed correctly, text is searchable and can be copied. Only testPage_psprinter.ps was printed to invalid PDF file, text is not searchable and can not be copied.
As I understand cups-pdf is a PostScript printer. Any client that prints something on printer uses printer driver. In cups-pdf case driver coverts any document to postscript and next cups-pdf converts postscript to PDF. Am I right? It seems that the key to solving the problem is using the right PS driver. I have checked following drivers without success.
1. Generic PostScript Level 1 Printer Foomatic/Postscript1 (recommended) (color, 2-sided printing)
2. Generic PostScript Printer Foomatic/Postscript (recommended) (color, 2-sided printing)
3. HP LaserJet 9000 Series Postscript (recommended) (grayscale)
Is there any PS driver that works properly with cups-pdf?
Asked by Mariusz
(369 rep)
Sep 26, 2024, 10:29 AM