Skip to content

How to change icon for the existing toolbar buttons #2723

Answered by stephanrauh
MathDad69 asked this question in Q&A
Discussion options

You must be logged in to vote

Create a custom toolbar by copying the source code of the default toolbar into your project. Basically, it's all here: https://github.com/stephanrauh/ngx-extended-pdf-viewer/tree/main/projects/ngx-extended-pdf-viewer/src/lib/toolbar

Granted, that's a lot of files, but most people only use a few buttons, and the source code is pretty simple. All you have to do is to modify the [image] attribute. Most buttons resemble this example:

<pdf-shy-button
  [cssClass]="show | responsiveCSSClass : 'always-in-secondary-menu'"
  title="Infinite scroll"
  primaryToolbarId="infiniteScroll"
  [toggled]="pageViewMode == 'infinite-scroll'"
  [action]="onClick"
  l10nLabel="pdfjs-infinite-scroll-button-label"…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@MathDad69
Comment options

Answer selected by MathDad69
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
Solved user support You've got a question, or a misconfiguration, or simply need a hint how to get things up and running
2 participants