angularthemingpdf-viewerngx-extended-pdf-viewer

How to use theming for Angular library ngx-extended-pdf-viewer


As described here (github link) the ngx-extended-pdf-viewer library supports color theming. I would like to change the color of the header-menu and it's buttons. In my case the menu is very dark and the buttons are white. I can change the background color by creating a custom toolbar and set the style, but this is not a preferred solution I guess:

    <ngx-extended-pdf-viewer 
    #pdfViewer
      [customToolbar]="additionalButtons"
      [src]="'assets/pdfs/dachstein.pdf'"
      [height]="'50vh'"
      [useBrowserLocale]="true"
      [textLayer]="true">
    </ngx-extended-pdf-viewer>
    
    <ng-template #additionalButtons>
      <div id="toolbarViewer" style="background-color:darkblue">
...

But how do I use theming, or at least change the color of the buttons?


Solution

  • There is an option theme that is not appearing in the documentation. It offers three options dark, custom and light. For the custom option I could not find any documentations but one of the presets may be enought.

        <ngx-extended-pdf-viewer
            backgroundColor="#5c5c5c"
            theme="dark"