Ngx-extended-pdf-viewer: Not possible to highlight when document loaded as blob/base64 type

Created on 29 Jun 2020  路  5Comments  路  Source: stephanrauh/ngx-extended-pdf-viewer

--Not possible to highlight the given input on the document, when document loaded as blob/base64 type.
--When giving the file name as a static src it is working fine

Solved user support

Most helpful comment

Unexpected. What do you mean be "highlight"? So far, I only know the highlighting of the find function. Are you referring to that?

All 5 comments

Unexpected. What do you mean be "highlight"? So far, I only know the highlighting of the find function. Are you referring to that?

Yes, Same. We are using find functionality to highlight text. But for a downloaded file (assets files) find is working, But when we are trying with a Base64 / Blob one. It is not working.

@stephanrauh

 <ngx-extended-pdf-viewer [src]="base64Data" useBrowserLocale="true" [(page)]="highlightPage"
            [showDownloadButton]="false" [showOpenFileButton]="false" [showBookmarkButton]="false"
            [showPresentationModeButton]="true" [showFindButton]="true" [showBorders]="true" height="128vh"
            [showZoomButtons]="true" (updateFindMatchesCount)="updateFindMatchesCount($event)"
            (updateFindState)="updateFindState($event)" [handTool]="false"
            [showHandToolButton]="true">
          </ngx-extended-pdf-viewer>

For the above src highlight is not working

The below one is working fine, because the file is accessing from local

<ngx-extended-pdf-viewer [src]="'../../../../assets/mock-api-json/pdf-sample.pdf'"** useBrowserLocale="false"
            [(page)]="highlightPage" [showDownloadButton]="false" [showOpenFileButton]="false"
            [showBookmarkButton]="false" [showPresentationModeButton]="true" [showFindButton]="true"
            [showBorders]="true" height="128vh" [showZoomButtons]="true"
            (updateFindMatchesCount)="updateFindMatchesCount($event)" (updateFindState)="updateFindState($event)"
            [useBrowserLocale]="true" [handTool]="false" [showHandToolButton]="true">
          </ngx-extended-pdf-viewer>

Maybe the text layer is missing. Try [textLayer]="true".

@stephanrauh Its working now :). Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Dev-Akshay-Shelke picture Dev-Akshay-Shelke  路  10Comments

sameerAhmad9291 picture sameerAhmad9291  路  7Comments

Prasanth-FrontendDeveloper picture Prasanth-FrontendDeveloper  路  7Comments

rscherer picture rscherer  路  7Comments

leo6104 picture leo6104  路  3Comments