Skip to content
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

Added info for using laravel-snappy in Homestead #108

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rawzone
Copy link

@rawzone rawzone commented Apr 21, 2016

No description provided.

@mikevrind
Copy link

@rawzone Maybe you can fix the merge conflict so @barryvdh can merge? This is some nice info to have in the readme. Would have saved me some time 👍

@rawzone
Copy link
Author

rawzone commented Feb 8, 2017

@mikevrind Sure thing - Will take a look at that in the following days. I'm quite new to the whole github pull request thingy so some how i missed this conflict.

@barryvdh
Copy link
Owner

barryvdh commented Feb 8, 2017

Probably easier to just re-submit the text in this case

@rawzone
Copy link
Author

rawzone commented Feb 8, 2017

Seems like it yes - Ill try to setup a fresh homestead install and check the information is still valid. If so make a fresh pull request with the information.

@jbaron-mx
Copy link

In my case, sudo was required to run each command listed in this PR, don't know if my homestead version has something to do with this (I will leave my configuration down below).

Anyway, here is the command list that worked for me:

  1. sudo apt-get install wkhtmltopdf
  2. sudo apt-get install xvfb
  3. echo -e '#!/bin/bash\nxvfb-run -a --server-args="-screen 0, 1920x1080x24" /usr/bin/wkhtmltopdf -q $*' | sudo tee /usr/bin/wkhtmltopdf.sh; sudo chmod a+x /usr/bin/wkhtmltopdf.sh; sudo ln -s /usr/bin/wkhtmltopdf.sh /usr/local/bin/wkhtmltopdf
  4. Reboot your homestead VM

Versions

  • Vagrant: 1.9.1
  • Provider: Virtualbox
  • Homestead Box: 0.6.0
  • Homestead Repo: 3.1.0
  • OS: macOS Sierra

Note: I'm running Homestead 0.6.0 cause my app needs PHP 7.0, the lastest Homestead box is running on PHP 7.1

@jbaron-mx
Copy link

Hi guys, I've been digging stackoverflow and found another method to install it. I think it's a cleaner solution because it does not need a fake X Server to run.

  1. sudo apt-get install xfonts-75dpi
  2. wget http://download.gna.org/wkhtmltopdf/0.12/0.12.2/wkhtmltox-0.12.2_linux-trusty-amd64.deb
  3. sudo dpkg -i wkhtmltox-0.12.2_linux-trusty-amd64.deb
  4. wkhtmltopdf http://google.com google.pdf should work without any problem.

@Ravaelles
Copy link

Ravaelles commented Feb 14, 2019

I'm using Laravel Homestead with Ubuntu 18.04 and the only solution that worked for me was this one:

sudo wget https://builds.wkhtmltopdf.org/0.12.1.3/wkhtmltox_0.12.1.3-1~bionic_amd64.deb
sudo dpkg -i wkhtmltox_0.12.1.3-1~bionic_amd64.deb
sudo apt-get install -f
sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin
sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin

And like jbaron-mx said, test it with wkhtmltopdf http://www.google.com google.pdf

@MattWohler
Copy link

I'm using Laravel Homestead with Ubuntu 18.04 and the only solution that worked for me was this one:

sudo wget https://builds.wkhtmltopdf.org/0.12.1.3/wkhtmltox_0.12.1.3-1~bionic_amd64.deb
sudo dpkg -i wkhtmltox_0.12.1.3-1~bionic_amd64.deb
sudo apt-get install -f
sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin
sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin

And like jbaron-mx said, test it with wkhtmltopdf http://www.google.com google.pdf

Verified. Same here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants