-
-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
65 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# PhantomJS Export | ||
|
||
**PhantomJS** supports `pdf`, `jpeg`, and `png` file export. | ||
You need to download and install [phantomjs](http://phantomjs.org/download.html) first. | ||
|
||
## Usage | ||
Right click at the preview, then click `PhantomJS`. Choose the file type you want to export. | ||
|
||
## Configuration | ||
You can edit phantomjs configuration by running `Markdown Preview Enhanced: Open PhantomJS Config` command. | ||
|
||
The `phantomjs_header_footer_config.js` file should look like this: | ||
|
||
|
||
```javascript | ||
'use strict' | ||
/* | ||
configure header and footer (and other options) | ||
more information can be found here: | ||
https://github.com/marcbachmann/node-html-pdf | ||
Attention: this config will override your config in exporter panel. | ||
eg: | ||
let config = { | ||
"header": { | ||
"height": "45mm", | ||
"contents": '<div style="text-align: center;">Author: Marc Bachmann</div>' | ||
}, | ||
"footer": { | ||
"height": "28mm", | ||
"contents": '<span style="color: #444;">{{page}}</span>/<span>{{pages}}</span>' | ||
} | ||
} | ||
*/ | ||
// you can edit the 'config' variable below | ||
let config = { | ||
} | ||
|
||
module.exports = config || {} | ||
``` | ||
|
||
--- | ||
|
||
You can also write configuration for individual markdown file by front-matter. | ||
For example: | ||
|
||
```markdown | ||
--- | ||
phantomjs: | ||
orientation: "landscape" | ||
--- | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters