Athira
Athira

Reputation: 11

ngx-extended-pdf-viewer problem with print

I am using ngx-extended-pdf-viewer(4.0.0-alpha.5) in Angular 8 and pdfs are showing up correctly except for when I am using single paged pdfs. For single paged pdfs, the preview is blank. Is there any solution?

My code is here

 <ngx-extended-pdf-viewer [delayFirstView]="250" src="{{apiBaseURL}}unprotect/estimate-report/view/{{currentestimationid}}/{{estimationReportType}}" useBrowserLocale="true" height="80vh" [textLayer]="true"></ngx-extended-pdf-viewer>


  


[View image][1]


  [1]: https://i.sstatic.net/foGsi.png

Upvotes: 1

Views: 1975

Answers (2)

Marcello
Marcello

Reputation: 1

I've added the ng-deep and finally the preview appears:

    @media print {
        ::ng-deep #printContainer > div {
          display: inline;
        }
      }

Upvotes: 0

Athira
Athira

Reputation: 11

Issue resolved by adding the CSS rule

@media print {
    #printContainer>div {
        display: inline;
    }
}

Upvotes: 0

Related Questions