ng2-pdfjs-viewer 25.0.4 → 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.
- package/README.md +70 -12
- package/package.json +1 -1
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://
|
|
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
|
|
@@ -488,6 +491,9 @@ export class MyComponent {
|
|
|
488
491
|
|
|
489
492
|
## 🎨 Examples
|
|
490
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
|
+
|
|
491
497
|
### 1. Basic PDF Viewer
|
|
492
498
|
|
|
493
499
|
```html
|
|
@@ -534,7 +540,51 @@ export class MyComponent {
|
|
|
534
540
|
</ng2-pdfjs-viewer>
|
|
535
541
|
```
|
|
536
542
|
|
|
537
|
-
### 4.
|
|
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
|
|
538
588
|
|
|
539
589
|
```typescript
|
|
540
590
|
export class PdfController {
|
|
@@ -555,6 +605,20 @@ export class PdfController {
|
|
|
555
605
|
}
|
|
556
606
|
```
|
|
557
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
|
+
|
|
558
622
|
---
|
|
559
623
|
|
|
560
624
|
## 🔄 Migration Guide
|
|
@@ -678,8 +742,6 @@ We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) f
|
|
|
678
742
|
# Clone the repository
|
|
679
743
|
git clone https://github.com/intbot/ng2-pdfjs-viewer.git
|
|
680
744
|
|
|
681
|
-
# Install dependencies
|
|
682
|
-
npm install
|
|
683
745
|
|
|
684
746
|
# Clear Angular cache (Windows)
|
|
685
747
|
Remove-Item -Recurse -Force "SampleApp\.angular"
|
|
@@ -689,11 +751,6 @@ Remove-Item -Recurse -Force "SampleApp\.angular"
|
|
|
689
751
|
@test.bat
|
|
690
752
|
```
|
|
691
753
|
|
|
692
|
-
### Reporting Issues
|
|
693
|
-
|
|
694
|
-
- 🐛 **Bug Reports**: [GitHub Issues](https://github.com/intbot/ng2-pdfjs-viewer/issues)
|
|
695
|
-
- 💡 **Feature Requests**: [GitHub Discussions](https://github.com/intbot/ng2-pdfjs-viewer/discussions)
|
|
696
|
-
- 📚 **Documentation**: [GitHub Wiki](https://github.com/intbot/ng2-pdfjs-viewer/wiki)
|
|
697
754
|
|
|
698
755
|
---
|
|
699
756
|
|
|
@@ -705,10 +762,11 @@ This project is licensed under the **Apache License 2.0 + Commons Clause License
|
|
|
705
762
|
|
|
706
763
|
## 🙏 Acknowledgments
|
|
707
764
|
|
|
708
|
-
|
|
709
|
-
|
|
765
|
+
|
|
766
|
+
|
|
710
767
|
- **Community Contributors** - For bug reports, feature requests, and contributions
|
|
711
768
|
- **7+ Million Users** - For trusting us with your PDF viewing needs
|
|
769
|
+
- **Mozilla PDF.js Team** - For the amazing PDF.js library
|
|
712
770
|
|
|
713
771
|
---
|
|
714
772
|
|
|
@@ -718,12 +776,12 @@ This project is licensed under the **Apache License 2.0 + Commons Clause License
|
|
|
718
776
|
- 💬 **Community**: [GitHub Discussions](https://github.com/intbot/ng2-pdfjs-viewer/discussions)
|
|
719
777
|
- 🐛 **Issues**: [GitHub Issues](https://github.com/intbot/ng2-pdfjs-viewer/issues)
|
|
720
778
|
- 📧 **Email**: codehippie1@gmail.com
|
|
779
|
+
- 📧 **Author**: [Aneesh Gopalakrishnan](http://github.com/codehippie1)
|
|
721
780
|
|
|
722
781
|
---
|
|
723
782
|
|
|
724
783
|
<div align="center">
|
|
725
784
|
|
|
726
|
-
**Made with ❤️ by [Aneesh](http://github.com/codehippie1)**
|
|
727
785
|
|
|
728
786
|
[](https://github.com/intbot/ng2-pdfjs-viewer)
|
|
729
787
|
[](https://www.npmjs.com/package/ng2-pdfjs-viewer)
|