{"id":29519052,"url":"https://github.com/ameyb88/file-viewer","last_synced_at":"2025-07-16T16:03:00.313Z","repository":{"id":304098225,"uuid":"1017719233","full_name":"ameyb88/file-viewer","owner":"ameyb88","description":"A great file viewer for your Angular applications just like Gmail. You can preview PDF, DOCX, XLSX, PNG, JPEG and many more file types!","archived":false,"fork":false,"pushed_at":"2025-07-11T05:44:41.000Z","size":195,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-11T08:26:04.356Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ameyb88.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-11T02:01:50.000Z","updated_at":"2025-07-11T02:01:54.000Z","dependencies_parsed_at":"2025-07-11T08:26:07.272Z","dependency_job_id":"9c9c41b4-1cdf-4943-9848-7ad0eb42ccf3","html_url":"https://github.com/ameyb88/file-viewer","commit_stats":null,"previous_names":["ameyb88/file-viewer"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ameyb88/file-viewer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ameyb88%2Ffile-viewer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ameyb88%2Ffile-viewer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ameyb88%2Ffile-viewer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ameyb88%2Ffile-viewer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ameyb88","download_url":"https://codeload.github.com/ameyb88/file-viewer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ameyb88%2Ffile-viewer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265522986,"owners_count":23781753,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-16T16:00:54.837Z","updated_at":"2025-07-16T16:03:00.305Z","avatar_url":"https://github.com/ameyb88.png","language":null,"funding_links":[],"categories":["Third Party Components"],"sub_categories":["Viewers"],"readme":"# NG Universal File Previewer\n\nA powerful, universal file previewer library for Angular applications with support for PDF, images, documents, spreadsheets, and more.\n\n## ✨ Features\n\n- 📄 **PDF Preview** with page navigation and zoom controls\n- 🖼️ **Image Preview** with zoom and full-size view\n- 📊 **Excel/CSV** data table preview\n- 📝 **Word Document** preview (DOCX)\n- 🎨 **Modern UI** with light/dark theme support\n- 📱 **Responsive Design** - works on mobile and desktop\n- 🔧 **Highly Configurable** with custom processors\n- 🚀 **Easy Integration** - just add one component\n\n## Live Demo\n- https://ameyb88.github.io/file-viewer/\n\n## 🚀 Quick Start\n\n### Installation\n\n```bash\nnpm install ng-universal-file-previewer\n```\n\n### Import the Module\n\n```typescript\nimport { NgUniversalFilePreviewerModule } from 'ng-universal-file-previewer';\n\n@NgModule({\n  imports: [\n    NgUniversalFilePreviewerModule\n  ]\n})\nexport class AppModule { }\n```\n\n### Basic Usage\n\n```html\n\u003cngx-file-previewer\n  [config]=\"previewConfig\"\n  [theme]=\"'light'\"\n  (fileSelected)=\"onFileSelected($event)\"\n  (previewReady)=\"onPreviewReady($event)\"\u003e\n\u003c/ngx-file-previewer\u003e\n```\n\n```typescript\nexport class AppComponent {\n  previewConfig = {\n    maxFileSize: 10 * 1024 * 1024, // 10MB\n    supportedTypes: ['pdf', 'image', 'docx', 'xlsx', 'csv', 'txt'],\n    autoPreview: true\n  };\n\n  onFileSelected(file: File) {\n    console.log('File selected:', file.name);\n  }\n\n  onPreviewReady(result: any) {\n    console.log('Preview ready:', result);\n  }\n}\n```\n\n## 📖 Documentation\n\n### Supported File Types\n\n- **PDF**: Full rendering with page navigation and zoom\n- **Images**: PNG, JPEG, GIF, WebP, SVG\n- **Documents**: DOCX (with full content rendering)\n- **Spreadsheets**: XLSX, XLS, CSV\n- **Text**: TXT, JSON, HTML, XML\n\n### Configuration Options\n\n```typescript\ninterface FilePreviewConfig {\n  maxFileSize: number;           // Maximum file size in bytes\n  supportedTypes: FileType[];    // Array of supported file types\n  autoPreview: boolean;          // Auto-generate preview on file selection\n  showFileInfo: boolean;         // Show file information panel\n}\n```\n\n### Theming\n\nThe library supports both light and dark themes:\n\n```html\n\u003cngx-file-previewer [theme]=\"'dark'\"\u003e\u003c/ngx-file-previewer\u003e\n```\n\n### Custom Styling\n\nAdd custom CSS classes:\n\n```html\n\u003cngx-file-previewer [customClass]=\"'my-custom-preview'\"\u003e\u003c/ngx-file-previewer\u003e\n```\n\n## 🔧 Advanced Usage\n\n### Custom File Processors\n\n```typescript\nimport { FileProcessorService } from 'ng-universal-file-previewer';\n\nconstructor(private fileProcessor: FileProcessorService) {\n  // Register custom processor for a file type\n  this.fileProcessor.registerCustomProcessor('custom', async (file: File) =\u003e {\n    return '\u003cdiv\u003eCustom preview content\u003c/div\u003e';\n  });\n}\n```\n\n## 📦 Dependencies\n\n- `@angular/core` (^17.0.0)\n- `@angular/common` (^17.0.0)\n- `pdfjs-dist` (^3.4.120)\n- `mammoth` (^1.6.0)\n- `xlsx` (^0.18.5)\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## 📄 License\n\nMIT License - see LICENSE file for details.\n\n## 🐛 Issues\n\nReport issues on [GitHub Issues](https://github.com/yourusername/ng-universal-file-previewer/issues)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fameyb88%2Ffile-viewer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fameyb88%2Ffile-viewer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fameyb88%2Ffile-viewer/lists"}