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

PDF generation fails silently #23

Open
pathikrit opened this issue Aug 22, 2015 · 1 comment
Open

PDF generation fails silently #23

pathikrit opened this issue Aug 22, 2015 · 1 comment
Labels

Comments

@pathikrit
Copy link

This library works on my mac just fine.

But, on, ubuntu 14.04, I have it installed like this:

$ which wkhtmltopdf
/usr/bin/wkhtmltopdf

$wkhtmltopdf -V
Name:
  wkhtmltopdf 0.9.9
...

I am using it like this:

val html: String = "<html> .... "
val pdf = Pdf("/usr/bin/wkhtmltopdf", PdfConfig.default)
val destination = File.createTempFile("html2pdf", ".pdf")
val exitCode = pdf.run(html, destination)
if (exitCode != 0) Logger.error(s"PDF generation task exited with non-zero exitCode=$exitCode")
if (destination.length() == 0) Logger.warn(s"Generated PDF is empty")

But, I see that exitCode is 1 and the generated PDF is empty.
What's wrong? Why is it silently failing? It does not print any other helpful debug info at all! How can I make it print debug info and underlying error?

@guillaumebadin
Copy link

+1

@cloudify cloudify added the bug label Nov 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants