I am sorry, but my initial report was not fully accurate. When preparing
the files you asked for, I discovered some more details.

Ubuntu 11.10 and 10.04 do NOT differ in the way 'gedit' prints. Both
produce PS files that result in non-searchable PDFs (generated with
`ps2pdf`). See the files 'print_gedit_ubuntu*.*' in the attached zip.

Ubuntu 11.10 and 10.04 DO differ in the way Firefox (10.0.2) prints. Ubuntu 
10.04 delivers searchable PDF, 11.10 does NOT.
See the files 'print_firefox_ubuntu*.*' in the attached zip.

As an alternative I did not use my (cups-pdf like) PDF printer, but the
built-in 'Print to File' printer to produce the PS file. To my surprise
this PS file CAN be converted to a searchable PDF with `ps2pdf`. See the
files 'print*_to_file.*' in the attached zip.

What is going on here? Does gedit or Firefox behave differently when
printing to the 'Print to File' printer? Or, does the 'Print to File'
printer process things differently, and how?

When inspecting the PDF files with the `pdffonts` utility, you see that
all searchable PDFs have 'TrueType' (sub)fonts embedded with an explicit
"ToUnicode" map. The NON-searchable PDFs have 'CID TrueType' (sub)fonts
embedded WITHOUT the "ToUnicode" map.

Why does the 'Print to File' printer produce 'TrueType' (sub)fonts, and
does my own PDF printer produce 'CID TrueType' (sub)fonts? Is is the
PPD? I use /usr/share/ghostscript/9.04/lib/ghostpdf.ppd.

http://www.ghostscript.com/doc/current/Ps2pdf.htm#Problems mentions that
"Ghostscript has been writing incorrect ToUnicode CMap without CMapName
into the PDF since version 8.10 (rev. 3611) . This bug is fixed in
version 8.54 (rev. 6201)". Since, Ubuntu 10.04 uses GPL Ghostscript 8.71
(2010-02-10), and 11.10 uses GPL Ghostscript 9.04 (2011-08-05), I guess
this bug cannot be a cause anymore.

Release notes of the latest Ghostscript 9.05,
http://www.ghostscript.com/doc/current/History9.htm#Version9.05 ,
mention the "use of the DroidSansFallback TrueType font to automatically
substitute for missing CIDFonts". I installed gs905 on Windows and
applied ps2pdf to the failing PS files. Again, no luck (PDFs are still
non-searchable).

Version details:

10.04: Linux pm-ubuntu 2.6.32-38-generic #83-Ubuntu SMP Wed Jan 4 11:13:04 UTC 
2012 i686 GNU/Linux
11.10: Linux pampus 3.0.0-16-generic #28-Ubuntu SMP Fri Jan 27 17:44:39 UTC 
2012 x86_64 x86_64 x86_64 GNU/Linux


** Attachment added: "Sample PostScript and PDF files"
   
https://bugs.launchpad.net/ubuntu/+source/ghostscript/+bug/942866/+attachment/2793752/+files/print_ubuntu_ps_pdf_samples.zip

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/942866

Title:
  Ubuntu 11.10: printing to PDF produces unsearchable PDF (contrary to
  10.04)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ghostscript/+bug/942866/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to