In one of our recent Grails project we had to provide support for Viewing Pdf even if end user’s browser did not have any pdf viewer plugin or add on installed. So we decided that we would open our pdf on Google Doc’s pdf viewer.
This will behave in same manner as Gmail does , when it has a pdf as attachment to mail , It provides two buttons
Now if user selects view , the pdf viewer opens in Google Doc.
Installation of plugin
grails install-plugin pdf-viewer
View on Google Docs
Here fullPath is full path of file along its name . ex /home/username/pdfname.pdf . And Pdf is a taglib included in this plugin.
Detailed documentation of plugin can be found at GitHub
Demo App for this plugin can be found at Github