Reputation: 117
I have an HTML page that I need to convert to PDF with C#, and I can't find how to make sure my PDF have exactly a width of 80mm and an automatic height (depending of content of the page). The HTML file is a receipt.
I have tried many libraries, but can't find the optimal solution.
Thanks.
Upvotes: 0
Views: 386
Reputation: 135
You can try frindly print as pdf and add spacific print style like this
/* override styles when printing */
@media print {
body {
/* body styles when printing */
}
}
You can take a look at this
Upvotes: 1