Currently, I am utilizing the ngx-print npm library for printing my div
. It functions properly but the issue lies in it not displaying the background color accurately:
https://i.sstatic.net/Yq0aZ.jpg
This is My HTML Code :
<div class="hover-div">
<button mat-button class="title-div" printSectionId="card-container"
printTitle="professionalcard" [useExistingCss]="true" ngxPrint>
<div fxLayout="row">
<mat-icon class="preview-icon">print</mat-icon>
<div>print</div>
</div>
</button>
</div>
Has anybody faced this particular issue before? If so, what was your solution? Thank you.
Note: I have also attempted to print the div
without using the library, by employing window.print()
, but encountered the same problem consistently.