Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When printing with PrintType.html, css is not applied. #11

Closed
hellowkc12 opened this issue Jul 26, 2022 · 6 comments
Closed

When printing with PrintType.html, css is not applied. #11

hellowkc12 opened this issue Jul 26, 2022 · 6 comments

Comments

@hellowkc12
Copy link

hellowkc12 commented Jul 26, 2022

@OnClick="@(_ => PrintingService.Print("printable-form", PrintType.Html))"

<form id="printable-form">
    html code..
</form>

I want to print this picture.
Screenshot_1

However, when printed, it comes out like this:
image

@hellowkc12 hellowkc12 changed the title When printing with printtyp.html, css is not applied. When printing with PrintType.html, css is not applied. Jul 26, 2022
@Luk164
Copy link

Luk164 commented Feb 1, 2023

I have similar problem, my site.css gets applied but I am using MudBlazor and its styles seem to be ignored.
Example of element in website:
image
And when printed:
image

@vertonghenb
Copy link
Contributor

@Luk164 can you give me a repo that I can reproduce this issue with?

@Luk164
Copy link

Luk164 commented Feb 3, 2023

@vertonghenb I can do you one better, check out the PR I made #16. It also has the link to original issue with PrintJS and all the explanations.

@coeur85
Copy link

coeur85 commented Jan 31, 2024

any words on this ?

@Luk164
Copy link

Luk164 commented Feb 1, 2024

any words on this ?

I think the lib is dead, if you need it make a fork yourself and merge my PR into it, though I would suggest looking for an alternative

@vertonghenb
Copy link
Contributor

any words on this ?

I think the lib is dead, if you need it make a fork yourself and merge my PR into it, though I would suggest looking for an alternative

Totally forgot about this! Thanks for the reminder! I'll check the PR ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants