ng2-pdfjs-viewer 25.0.3 → 25.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +84 -15
  2. package/package.json +25 -7
package/README.md CHANGED
@@ -17,7 +17,7 @@ The most reliable, feature-rich Angular PDF viewer component powered by Mozilla'
17
17
 
18
18
  <div align="center">
19
19
 
20
- [**Live Demo**](https://ng2-pdfjs-viewer.azurewebsites.net) • [**API Reference**](#-api-reference) • [**Examples**](#-examples) • [**Migration Guide**](#-migration-guide)
20
+ [**Live Demo**](https://angular-pdf-viewer-demo.vercel.app/) • [**API Reference**](#-api-reference) • [**Examples**](#-examples) • [**Server Examples**](../Server-Side-Examples.md) • [**Migration Guide**](#-migration-guide)
21
21
 
22
22
  </div>
23
23
 
@@ -94,6 +94,9 @@ Whether you need a simple embedded PDF viewer or a complex document management s
94
94
 
95
95
  ## 🚀 Quick Start
96
96
 
97
+ > **🎯 Live Demo**: [https://angular-pdf-viewer-demo.vercel.app/](https://angular-pdf-viewer-demo.vercel.app/)
98
+ > **📁 Source Code**: [https://github.com/intbot/ng2-pdfjs-viewer/tree/main/SampleApp](https://github.com/intbot/ng2-pdfjs-viewer/tree/main/SampleApp)
99
+
97
100
  ### 1. Install the Package
98
101
 
99
102
  ```bash
@@ -195,9 +198,20 @@ Add PDF.js assets to your `angular.json`:
195
198
 
196
199
  ### Prerequisites
197
200
 
198
- - Angular 20.0+ (supports Angular 2.0+)
199
- - Node.js 18.0+
200
- - TypeScript 5.0+
201
+ - **Angular**: 20.0+ (recommended) | 2.0+ (supported)
202
+ - **Node.js**: 18.0+
203
+ - **TypeScript**: 5.0+
204
+
205
+ ### Angular Version Support
206
+
207
+ | Angular Version | Support Level | Notes |
208
+ |----------------|---------------|-------|
209
+ | **20.0+** | ✅ **Recommended** | Fully tested and optimized |
210
+ | **15.0 - 19.x** | ✅ **Supported** | Should work with minor testing |
211
+ | **10.0 - 14.x** | ✅ **Supported** | Compatible with testing |
212
+ | **2.0 - 9.x** | ⚠️ **Legacy** | May require additional testing |
213
+
214
+ **Note**: While the library supports Angular 2.0+, it's primarily tested and optimized for Angular 20+. For production use with older versions, thorough testing is recommended. The library uses relaxed peer dependencies (Angular >=10.0.0) to ensure compatibility across different Angular versions.
201
215
 
202
216
  ### Install Package
203
217
 
@@ -477,6 +491,9 @@ export class MyComponent {
477
491
 
478
492
  ## 🎨 Examples
479
493
 
494
+ > **🎯 Live Demo**: [https://angular-pdf-viewer-demo.vercel.app/](https://angular-pdf-viewer-demo.vercel.app/)
495
+ > **📁 Source Code**: [https://github.com/intbot/ng2-pdfjs-viewer/tree/main/SampleApp](https://github.com/intbot/ng2-pdfjs-viewer/tree/main/SampleApp)
496
+
480
497
  ### 1. Basic PDF Viewer
481
498
 
482
499
  ```html
@@ -523,7 +540,51 @@ export class MyComponent {
523
540
  </ng2-pdfjs-viewer>
524
541
  ```
525
542
 
526
- ### 4. Programmatic Control
543
+ ### 4. Convenience Setters (Object-Based Configuration)
544
+
545
+ ```typescript
546
+ export class PdfController {
547
+ // Group visibility configuration
548
+ groupVisibility = {
549
+ "download": true,
550
+ "print": true,
551
+ "find": true,
552
+ "fullScreen": true,
553
+ "openFile": true,
554
+ "viewBookmark": true,
555
+ "annotations": false
556
+ };
557
+
558
+ // Auto actions configuration
559
+ autoActions = {
560
+ "downloadOnLoad": false,
561
+ "printOnLoad": false
562
+ };
563
+
564
+ // Control visibility configuration
565
+ controlVisibility = {
566
+ "showToolbarLeft": true,
567
+ "showToolbarMiddle": true,
568
+ "showToolbarRight": true,
569
+ "showSecondaryToolbarToggle": true,
570
+ "showSidebar": true,
571
+ "showSidebarLeft": true,
572
+ "showSidebarRight": true
573
+ };
574
+ }
575
+ ```
576
+
577
+ ```html
578
+ <ng2-pdfjs-viewer
579
+ pdfSrc="assets/sample.pdf"
580
+ [groupVisibility]="groupVisibility"
581
+ [autoActions]="autoActions"
582
+ [controlVisibility]="controlVisibility"
583
+ >
584
+ </ng2-pdfjs-viewer>
585
+ ```
586
+
587
+ ### 5. Programmatic Control
527
588
 
528
589
  ```typescript
529
590
  export class PdfController {
@@ -544,6 +605,20 @@ export class PdfController {
544
605
  }
545
606
  ```
546
607
 
608
+ ### 6. Server-Side Integration
609
+
610
+ For server-side developers, we provide comprehensive examples for integrating PDF APIs with ng2-pdfjs-viewer:
611
+
612
+ **[📋 Server-Side Examples](../Server-Side-Examples.md)** - Complete examples for:
613
+ - **ASP.NET Core (C#)** - RDLC reports, physical files, iTextSharp
614
+ - **Node.js (Express)** - File serving, PDFKit, Puppeteer
615
+ - **Python (FastAPI)** - ReportLab, WeasyPrint, file handling
616
+ - **Java (Spring Boot)** - iText, JasperReports, file serving
617
+ - **PHP (Laravel)** - TCPDF, DomPDF, file management
618
+ - **Go (Gin)** - gofpdf, file serving, PDF generation
619
+
620
+ Each example includes proper Content-Type headers, error handling, CORS configuration, and Angular integration patterns.
621
+
547
622
  ---
548
623
 
549
624
  ## 🔄 Migration Guide
@@ -667,8 +742,6 @@ We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) f
667
742
  # Clone the repository
668
743
  git clone https://github.com/intbot/ng2-pdfjs-viewer.git
669
744
 
670
- # Install dependencies
671
- npm install
672
745
 
673
746
  # Clear Angular cache (Windows)
674
747
  Remove-Item -Recurse -Force "SampleApp\.angular"
@@ -678,11 +751,6 @@ Remove-Item -Recurse -Force "SampleApp\.angular"
678
751
  @test.bat
679
752
  ```
680
753
 
681
- ### Reporting Issues
682
-
683
- - 🐛 **Bug Reports**: [GitHub Issues](https://github.com/intbot/ng2-pdfjs-viewer/issues)
684
- - 💡 **Feature Requests**: [GitHub Discussions](https://github.com/intbot/ng2-pdfjs-viewer/discussions)
685
- - 📚 **Documentation**: [GitHub Wiki](https://github.com/intbot/ng2-pdfjs-viewer/wiki)
686
754
 
687
755
  ---
688
756
 
@@ -694,10 +762,11 @@ This project is licensed under the **Apache License 2.0 + Commons Clause License
694
762
 
695
763
  ## 🙏 Acknowledgments
696
764
 
697
- - **Mozilla PDF.js Team** - For the amazing PDF.js library
698
- - **Angular Team** - For the excellent framework
765
+
766
+
699
767
  - **Community Contributors** - For bug reports, feature requests, and contributions
700
768
  - **7+ Million Users** - For trusting us with your PDF viewing needs
769
+ - **Mozilla PDF.js Team** - For the amazing PDF.js library
701
770
 
702
771
  ---
703
772
 
@@ -707,12 +776,12 @@ This project is licensed under the **Apache License 2.0 + Commons Clause License
707
776
  - 💬 **Community**: [GitHub Discussions](https://github.com/intbot/ng2-pdfjs-viewer/discussions)
708
777
  - 🐛 **Issues**: [GitHub Issues](https://github.com/intbot/ng2-pdfjs-viewer/issues)
709
778
  - 📧 **Email**: codehippie1@gmail.com
779
+ - 📧 **Author**: [Aneesh Gopalakrishnan](http://github.com/codehippie1)
710
780
 
711
781
  ---
712
782
 
713
783
  <div align="center">
714
784
 
715
- **Made with ❤️ by the ng2-pdfjs-viewer team**
716
785
 
717
786
  [![GitHub](https://img.shields.io/badge/GitHub-Repository-blue?logo=github)](https://github.com/intbot/ng2-pdfjs-viewer)
718
787
  [![NPM](https://img.shields.io/badge/NPM-Package-red?logo=npm)](https://www.npmjs.com/package/ng2-pdfjs-viewer)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ng2-pdfjs-viewer",
3
- "version": "25.0.3",
3
+ "version": "25.0.5",
4
4
  "author": {
5
5
  "name": "Aneesh Goapalakrishnan",
6
6
  "email": "codehippie1@gmail.com"
@@ -24,9 +24,8 @@
24
24
  }
25
25
  },
26
26
  "peerDependencies": {
27
- "@angular/common": "^20.0.0",
28
- "@angular/core": "^20.0.0",
29
- "ng-packagr": "^20.0.0"
27
+ "@angular/common": "^10.0.0",
28
+ "@angular/core": "^10.0.0"
30
29
  },
31
30
  "$schema": "./node_modules/ng-packagr/package.schema.json",
32
31
  "bugs": {
@@ -34,11 +33,30 @@
34
33
  },
35
34
  "keywords": [
36
35
  "angular",
37
- "ng",
38
- "ng2",
36
+ "angular-pdf-viewer",
37
+ "pdf-viewer",
38
+ "pdf-reader",
39
+ "PDF",
40
+ "PDF Viewer",
39
41
  "pdfjs",
40
42
  "viewerjs",
41
- "viewer.html"
43
+ "ng2",
44
+ "angular-component",
45
+ "angular-pdf",
46
+ "ng2-pdf",
47
+ "angular 2 - 20",
48
+ "angular 20",
49
+ "angular-library",
50
+ "typescript",
51
+ "javascript",
52
+ "pdf-rendering",
53
+ "pdf-annotations",
54
+ "pdf-zoom",
55
+ "pdf-printing",
56
+ "responsive-ui",
57
+ "custom PDF Viewer",
58
+ "accessibility",
59
+ "open-source"
42
60
  ],
43
61
  "license": "Apache-2.0 + Commons Clause",
44
62
  "readme": "README.md",