-
Notifications
You must be signed in to change notification settings - Fork 137
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
Printing local HTML file on Mac does not work #216
Comments
If you can include the command you invoked, the output, and a sample HTML file that may help someone troubleshoot your issue. |
While creating test HTML I think I came closer to the reason: Relative references to files go wrong. The HTML is stupidly simple: <html><head>
<title></title>
</head>
<body>
<h1>Hello World</h1>
</body></html> When calling in the bash (being in the directory containing this HTML) the following command I get a purely empty PDF:
But when I name the input file with full file name the result is correct:
|
+1 |
UPD: for "electron-pdf": "4.0.8" (in my case, using with CRA), the problem was that CRA generates its assets relatively: in the final HTML, an asset is included as So simple config: adding |
Can the docs be updated to specify that an absolute file path is required on Mac? Doing it how the docs suggest doesn't work on Mac and causes much headache. |
I tried to run electron-pdf on several HTML files I have on my local iMac, but the output PDF is always completely blank.
When running electron-pdf on an URL presenting the very same HTML content all works fine, just like one would expect.
Also tried to naming the CSS manually for the local HTML files, did not work either.
The text was updated successfully, but these errors were encountered: