Search docs/


Whatever the file is PDF document, Word document, Excel, office document,zip archive file, image, text, html or anything else, you can perform a preview by this cordova Plugin to preview any file in native mode by providing the local or external URL.

Requires Cordova plugin: cordova-plugin-preview-any-file. For more info, please see the previewAnyFile plugin docs.

Stuck on a Cordova issue?

If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic's experts offer official maintenance, support, and integration help.

Contact Us Today!


ionic cordova plugin add cordova-plugin-preview-any-filenpm install @ionic-native/preview-any-file
Ionic Native Enterprise comes with fully supported and maintained plugins from the Ionic Team. Learn More or if you're interested in an enterprise version of this plugin Contact Us

Supported Platforms

  • Android
  • iOS


import { PreviewAnyFile } from '@ionic-native/preview-any-file';

constructor(private previewAnyFile: PreviewAnyFile) { }


  .then((res: any) => console.log(res))
  .catch((error: any) => console.error(error));