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

Support for multiple HTML files to single PDF #4

Open emmenko opened 10 years ago

emmenko commented 10 years ago

Hi @cloudify,

I see that the wkhtmltopdf supports multiple HTML files as input

$ wkhtmltopdf --extended-help
Name:
  wkhtmltopdf 0.9.9

Synopsis:
  wkhtmltopdf [OPTIONS]... <input file> [More input files] <output file>

Description:
  Converts one or more HTML pages into a PDF document, *not* using wkhtmltopdf
  patched qt.

So basically I can pass a list of different HTML inputs to be rendered in one PDF. I was wondering if this is also supported in this library but I suppose it's not (I haven't found it anyway).

So what I would do is basically something like

val pdf = Pdf(PdfConfig.default)
val os = new ByteArrayOutputStream
pdf.run(Seq(template1, template2, template3), os)

to be able to generate the correct command line.

What do you think? Is that possible?

Thanks

wahyuwidjaja commented 8 years ago

Hi,

Have similar problem, is there a way to add new pages to the same pdf file? val pdf = Pdf(PdfConfig.default) val os = new ByteArrayOutputStream pdf.run(template1, os) pdf.run(template2, os)