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();
if (this.url) {
await this.loadPdf();
}
}
public async firstUpdated(_changedProperties: any) {
super.firstUpdated(_changedProperties);
// Set up resize observer for responsive rendering after first render
const container = this.shadowRoot?.querySelector('.pdf-container');
if (container) {
this.resizeObserver = new ResizeObserver(() => {
if (this.pdfDocument && !this.isLoading) {
this.renderPage();
}
});
this.resizeObserver.observe(container);
}
}
public async updated(changedProperties: Map