Reputation: 323
I have a webpage with material-icon and font-awesome icons. However, when I try to export the HTML website as PDF (using web tools, plugins or Adobe Acrobat DC for Mac), the icons are not shown (it just shows a the name of the icon).
I am including the css references to both sets of icons like this in my index.html:
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
If then I try to use a material.io icon in my index.html as follows:
<i class="material-icons">translate</i>
the result is:
Is there any way I can change my index.html, or CSS file or exportation tools to make the icons are shown when exporting to PDF? By the way, the same happens with font-awesome, not only with material-icons.
Thanks a lot and kind regards.
Upvotes: 2
Views: 1433
Reputation: 11
You can use selenium / phantomJS to take the screenshot of the HTML page and create pdf of same.
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
driver = webdriver.PhantomJS(desired_capabilities=dcap)
driver.get(url);
Upvotes: 1