0

In my PHP based admin panel, I've a button "Print Message", which print a receipt table. Currently I've no printer so I am saving this receipt as PDF (using 'save as pdf' option from print section in chrome). I want to change the font-face and font color of this PDF document. I've tried several options like
- Inline CSS on target table.
- External CSS file with media="print" attribute.
- @media print{} media query.
but nothing worked for me.

When I am using the system installed fonts, its working and showing result on my system but when I am using attached font using @font-face, its not working.

I hope someone here can help me.
Thanks.

vinayofficial
  • 462
  • 1
  • 5
  • 21
  • Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: [How to create a Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve). – Charlotte Dunois Jul 16 '16 at 11:12

1 Answers1

-1

Have a look at PrinceXML.

It's definitely the best HTML/CSS to PDF converter out there, although it's not free (But hey, your programming is not free either, so if it saves you 10 hours of work, you're home free (since you also need to take into account that the alternative solutions will require you to setup a dedicated server with the right software)

For more info look here: https://stackoverflow.com/a/434827/4958186

Community
  • 1
  • 1
john
  • 57
  • 10