ng2-pdf-viewer getOutline() returns undefined

394 Views Asked by At

demo of ng2-pdf-viewer

To show the table of content I used getOutline() as mentioned in here

    this.pdf.getOutline().then((outline: any[]) => {
      this.dataSource.data = outline;
    });

It is working fine this pdf. But for a few pdf Outline is undefined. I have implemented this ng2-pdf-viewer for those few pdf only.Please help

1

There are 1 best solutions below

0
beeCoder On

I got it , While converting docx to pdf while doing SAVE AS - PDF format with go to "option dialogue box" and "tick on headings" this will preserve the headers as bookmarks .Actually the headers was getting removed as bookmark