Open VijiSridhar95 opened 1 year ago
@VadimDez any suggestion on how to get the HTML and send it to backend.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Bug Report or Feature Request (mark with an
x
)First Question: In my scenario, am supposed to send the HTML rendered to backend also.(C# .NET server).I uploaded the PDF and able to view the HTML but need to send the same HTML to back end also. When I tried to get the html via innerHtml of the viewChild am not getting all the pages(only 1st 2 pages is having data others are Loading), since the HTML is not rendered completely. Am using the below logic . Is there any other way to get the html for the uploaded pdf and send it back to server.
@ViewChild('pdfViewer', { static: false }) pdfViewer!: PdfViewerComponent; render() : void { this.html = this.pdfViewer.pdfViewerContainer.nativeElement.innerHTML; console.log("the rendered html", this.html); }
Second Question: I need to navigate to a particular section and highlight the section. How to achieve the navigation. Outline function is returning null for the PDF document which I uploaded. In html: <pdf-viewer #pdfViewer [src]="pdfSrc" (after-load-complete)="callBackFn($event)">
In typescript: callBackFn(pdf: PDFDocumentProxy): void { pdf.getOutline().then((outline: any[]) => { console.log("outline", outline); }); }