Skip to content

Instantly share code, notes, and snippets.

@kai101
Created January 30, 2018 02:24
Show Gist options
  • Select an option

  • Save kai101/7d85506890969d0a444d40a4fb8e7ef3 to your computer and use it in GitHub Desktop.

Select an option

Save kai101/7d85506890969d0a444d40a4fb8e7ef3 to your computer and use it in GitHub Desktop.

Revisions

  1. kai101 created this gist Jan 30, 2018.
    14 changes: 14 additions & 0 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    Using phantom js to render a html page into pdf/image.
    ```
    sudo apt-get install phantomjs
    ```

    fixing
    ```
    QXcbConnection: Could not connect to display
    ```

    run the command with these environment parameters
    ```
    QT_QPA_PLATFORM=offscreen phantomjs
    ```