+
+
Unable to display PDF
+
+ The PDF viewer couldn't load this document. This might be due to browser restrictions or an invalid PDF file.
+
+
+
+
+ Download PDF
+
+
+
+ Open in New Tab
+
+
+
+ `;
+ }
+
+ public async connectedCallback() {
+ await super.connectedCallback();
+
+ // Set up resize observer for responsive rendering
+ const container = this.shadowRoot?.querySelector('.pdf-container');
+ if (container) {
+ this.resizeObserver = new ResizeObserver(() => {
+ if (this.pdfDocument && !this.isLoading) {
+ this.renderPage();
+ }
+ });
+ this.resizeObserver.observe(container);
+ }
+
+ if (this.url) {
+ await this.loadPdf();
+ }
+ }
+
+ public async updated(changedProperties: Map