ngx-print icon indicating copy to clipboard operation
ngx-print copied to clipboard

not able to attach external stylesheet using styleSheetFile property

Open Zankhna95 opened this issue 5 years ago • 3 comments

Describe the bug

I am using .scss file to apply styles in pdf. Styles are not getting attached.

To Reproduce I have a folder structure as mention below. Folder name -> statatistics Inside the folder, I have 3 files

  1. statistics.component.ts 2.statistics.component.html 3.statistics.component.scss

Expected behavior Could you please let me know how to apply external scss file?

Screenshots Expected PDF: image

The result I am getting right now is : image

Desktop (please complete the following information):

  • OS: Windows
  • Browser:chrome

Zankhna95 avatar May 18 '20 20:05 Zankhna95

Same thing here.

eriklive avatar Jun 04 '20 16:06 eriklive

Same thing here too, but with .css

guilhermefsreis avatar Jul 28 '20 11:07 guilhermefsreis

@Zankhna95 for now it is not possible to attach a .scss file, you'd need to compile first to css and then add it to your /assets/.

Lets say we have this statistics component. I'd create a folder src/assets/reports, and a statistics.css file inside it. Then referring to it as <button styleSheetFile="assets/reports/statistics.css"...>...</button>

thederickff avatar Jul 28 '20 12:07 thederickff

Answered by @derickfelix

Core121 avatar Dec 04 '23 02:12 Core121