sPDF icon indicating copy to clipboard operation
sPDF copied to clipboard

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

Open jeffryhartanto opened this issue 10 years ago • 0 comments

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.

jeffryhartanto avatar Aug 19 '15 04:08 jeffryhartanto