Post by PaulPost by David H. LipmanPost by AdamHost OS: Ubuntu 10.04 LTS
Guest OS: Windows XP Pro SP3 (via VirtualBox)
Browser: Firefox 3.6.28
PDF Writer: Adobe Acrobat 8 Professional / PDF Plug-In for Firefox
The following was originally posted to "mozilla.support.firefox" ...
Print to PDF (of some web pages) in Firefox creates non-searchable PDF.
Here's a problem link ...
http://course.ucsc-extension.edu/modules/shop/index.html?action=section&OfferingID=1532219&SectionID=5270686
The problem does not occur with IE but I prefer to find a fix for Firefox.
Any ideas?
To add to Adams question, I will state my findings previously provided
in his initial query in the Mozilla Firefox news group.
If printed to Adobe Professional v9.5.0 or PDFCreator or to a PostScript
file and distilled to a PDF from Firefox v3.6.28 the PDF is rendered as
a graphic and is not searchable.
If printed to PDFCreator from Firefox v11 the PDF is searchable.
I believe this to be a FF v3.6.28 rendering issue.
After investigating a bit, it seems Firefox v3 switched to cairographics.
When Cairo runs into situations it cannot handle with simple primitives
(letter uses letter primitive, line uses line primitive, a straight mapping),
it uses bitmap rendering as a fallback. If you get a solid image going through
a PDF printer output, it could be something like that. Purely a guess, as
I can't really see in this situation, how Cairo would help. You'd be
doing something like HTML ---> Cairo ---> GDI??? ---> AdobePDFprinter ---> PDF.
I don't see how Cairo really helps in a major way. Must be missing the point.
The workaround is to try "PrintPDF" add-on, which did yield a searchable
PDF for the ucsc-extension.edu web page. Using this, adds File : Print To PDF
to the Firefox menu, after installation and a restart of Firefox.
https://addons.mozilla.org/en-US/firefox/addon/printpdf/?src=api
"PrintPDF 0.76 by Pavlov"
I actually built up (compiled from source) v3.6.28 in Visual C++ 2005 Express
on a Win2K virtual machine. (I was using that for debugging.) When I
added "PrintPDF 0.76 by Pavlov", I was seeing an Assert failure ("float
manager state") from v3.6.28. I don't expect that affects the real Firefox,
but it was curious nonetheless. I think that add-on is still worth a try. My
debug build emits output into an MSDOS-like window as it runs, and that
plus the debugger in the IDE is what I was using to watch how it works.
Too damn complicated to figure out how it works with a debugger though
(like, how the print architecture actually works, instead of my guess).
If anyone else wants to make a debug build of Firefox, this is the
"mozconfig" file I used in the mozilla-1.9.2 folder. The disable-ipc
was added to stop the build from breaking, in some code hooks for
connecting a debugger and collecting a stack trace of some sort.
The parallel compilation is set to "j1" since my virtual environment
only has one computing core.
mk_add_options MOZ_MAKE_FLAGS="-j1"
ac_add_options --with-windows-version=502
ac_add_options --enable-debug
ac_add_options --enable-application=browser
ac_add_options --disable-ipc
http://img16.imageshack.us/img16/1456/v3628running.gif
Have fun,
Very interesting information and findings. Thanx!