Showing posts with label PDF Viewer. Show all posts
Showing posts with label PDF Viewer. Show all posts

Friday, August 5, 2016

Installing Adobe Reader in Ubuntu 16.04 LTS

For those who like Adobe Reader to read PDF files, you may find it difficult to install Adobe Reader on Ubuntu 16.04 LTS systems. Assembling information from a few posts, here is the solution that worked for me,
 

sudo apt-get clean all
sudo add-apt-repository "deb http://archive.canonical.com/ precise partner"
sudo apt-get update
sudo apt-get install adobereader-enu
sudo add-apt-repository -r "deb http://archive.canonical.com/ precise partner"
sudo apt-get clean all
sudo apt-get update

If you are on a x64 system, you may see many annoying warning messages when you run acroreader, such as,

......
(acroread:19366): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",
......
Gtk-Message: Failed to load module "canberra-gtk-module"
Gtk-Message: Failed to load module "gail"
Gtk-Message: Failed to load module "atk-bridge"


To get rid of the warning messages, install these four packages gtk2-engines-murrine, libcanberra-gtk-module, libatk-adaptor, and libgail-commonfor i386 as follows,

sudo apt-get install gtk2-engines-murrine:i386 libcanberra-gtk-module:i386 libatk-adaptor:i386 libgail-common:i386

If you are running Gnome like I do, then the last step is to set up default application for open PDF files. This is to edit the /etc/gnome/defaults.list file.

sudo gedit /etc/gnome/defaults.list
The editing is to find and replace the line

application/pdf=evince.desktop

by

application/pdf=acroread.desktop
and add the following lines to the end of the file,

application/fdf=acroread.desktop
application/xdp=acroread.desktop
application/xfdf=acroread.desktop
application/pdx=acroread.desktop

Finally, run nautilus to apply change if you do not wish to log out and log back in.

nautilus -q


Wednesday, January 22, 2014

Producing PDF document Compatible to Firefox Build-in PDF Viewer

Sometimes Firefox Build-in PDF Viewer does not render some PDF documents well, in which case, the PDF Viewer complains that the PDF document may not be displayed correctly.

A suggested method to correct it is to use external PDF viewer as suggested at Mozilla.

Web searches yield lots of discussions and the discussions are mostly how to find a way to display it correctly just like the above. Those discussions are on the "consumer" side.

However, if you are the on the side of producing and posting PDF documents online, you are probably more interested from beginning with in producing PDF documents that can be displayed correctly by the Firefox Build-in PDF Viewer.

As I investigate, this is not a trivial task. Generally, when the PDF Viewer does not display the document correctly, it is a result that the document contains certain feature which the viewer does not support. To generate a compatible PDF document to the viewer is not to use any unsupported feature that the viewer does not support. However, I failed to locate any document showing which feature is supported and which is not, including the project site at GitHub.

One method that worked for me at least in a few occasions is to use Firefox's Element Inspector.

When a PDF document is not displayed correctly, locate the element that is not displayed correctly or a nearby element to the element that is invisible as a result of not being displayed correctly, right-click the mouse and select "Inspect Element". Examine the element and elements nearby in the Inspector. If you examine them carefully, you may identify something suspicious. For instance, in FireFox 26.0, a PDF file saved in Microsoft PowerPoint is not displayed correctly. Examining it in the Element Inspector, I found out that the location of the problem and suspected that the font "Verdana" somehow could not be displayed correctly, as shown below.
 

By replacing font "Verdana" by a recognizable font, the problem went away.