cloudify / sPDF

Create PDFs from Scala using plain old HTML and CSS. Uses wkhtmltopdf on the back-end which renders HTML using Webkit.
Other
199 stars 53 forks source link

[RuntimeException: no exit code: process destroyed.] on pdf.run command #22

Open jeffryhartanto opened 9 years ago

jeffryhartanto commented 9 years ago

On Windows 8, I try to run below code:

val pdf = Pdf(new PdfConfig {
    marginTop := "0.3in"
    marginBottom := "0.3in"
    marginLeft := "0in"
    marginRight := "0in"
})      
val page: String = "<div class='printpage'>"+userData.html+"</div>"
val baseURL: String = Play.application.path+"/EmailHistory/"+username+"_email_temp.pdf"
val f = new FileOutputStream(baseURL)
// Save the PDF generated from the above HTML into a Byte Array
val outputStream = new ByteArrayOutputStream
pdf.run(page, outputStream)
outputStream.writeTo(f)

That gives me [RuntimeException: no exit code: process destroyed.] on pdf.run(page, outputStream) command.. Is there any way to fix that?

Note: I don't have any problem running that code on my Mac.