views:

265

answers:

4

I would love to use google document viewer, but I am dealing with sensitive documents and google's Terms state that if you use their service the document basically becomes public domain.

Are they any alternatives that will keep your content private?

Also it would be best if there was the ability to disable printing and downloading.

FYI: I am developing with ruby on rails, it would be cool if there was a gem.

A: 

Hi

You might want to check this gem 'prawn'. Its a PDF generator for ruby

http://wiki.github.com/sandal/prawn/

cheers, sameera

sameera207
thanks, but I am looking for a way to securely embed a pdf document on a webpage, not generate pdfs
Jonathan
+2  A: 

PDF is a page format and it doesn't convert to HTML that nicely. If you want to preserve the look of the PDF file 100%, convert to an image. You can convert to a lower res image to dissuade users to print your pdf. Also, you can put a watermark on the image with "CONFIDENTIAL" or "DO NOT COPY" with imagemagick: http://www.imagemagick.org/script/composite.php

Use ghostscript to convert your PDF to an image:

gs -q -dNOPAUSE -dBATCH -sDEVICE=pngalpha -r300 -dEPSCrop -sOutputFile=$FILE.png $FILE.pdf

Or ImageMagick:

convert -density 300 $FILE.pdf $FILE.png

Source: http://hublog.hubmed.org/archives/001875.html

Costi
+1  A: 

Found a great solution with FlexPaper http://flexpaper.devaldi.com/

Doesn't support all document types, only pdfs for now, but that does the trick for me

Jonathan
A: 

Found a better solution for document viewer. Works as a document viewer for any products. and even with Sharepoint as a Sharepoint Viewer. Check details at www.ajaxdocumentviewer.com

Suni