From e630d19cfe35e47f6a3e9f73e93f7574f64ad45c Mon Sep 17 00:00:00 2001 From: achahal Date: Wed, 27 Apr 2016 19:47:12 +0200 Subject: [PATCH 1/3] added use-xserver param --- .../scala/io/github/cloudify/scala.spdf/PdfConfig.scala | 3 +++ .../io/github/cloudify/scala/spdf/PdfConfigSpec.scala | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/src/main/scala/io/github/cloudify/scala.spdf/PdfConfig.scala b/src/main/scala/io/github/cloudify/scala.spdf/PdfConfig.scala index 2839575..e09259f 100644 --- a/src/main/scala/io/github/cloudify/scala.spdf/PdfConfig.scala +++ b/src/main/scala/io/github/cloudify/scala.spdf/PdfConfig.scala @@ -156,6 +156,8 @@ trait PdfConfig { val password = Parameter[String]("password") + val useXServer = Parameter[Option[Boolean]]("use-xserver") + val viewportSize = Parameter[String]("viewport-size") } @@ -242,6 +244,7 @@ object PdfConfig { title.toParameter, userStyleSheet.toParameter, username.toParameter, + useXServer.toParameter, viewportSize.toParameter, zoom.toParameter ).flatten diff --git a/src/test/scala/io/github/cloudify/scala/spdf/PdfConfigSpec.scala b/src/test/scala/io/github/cloudify/scala/spdf/PdfConfigSpec.scala index 5a6a8df..6656fd8 100644 --- a/src/test/scala/io/github/cloudify/scala/spdf/PdfConfigSpec.scala +++ b/src/test/scala/io/github/cloudify/scala/spdf/PdfConfigSpec.scala @@ -51,6 +51,13 @@ class PdfConfigSpec extends WordSpec with ShouldMatchers { PdfConfig.toParameters(config) should contain("--no-print-media-type") } + "use x-server" in { + val config = new PdfConfig { + useXServer := Option(true) + } + PdfConfig.toParameters(config) should contain("--use-xserver") + } + "check for executable in PATH" in { PdfConfig.findExecutable match { case Some(path) => path.contains("wkhtmltopdf") should equal(true) From f56c9e9a0a1dc67307e909cf882d22ffa6e9faa1 Mon Sep 17 00:00:00 2001 From: Ajit Chahal Date: Wed, 27 Apr 2016 19:57:22 +0200 Subject: [PATCH 2/3] Updated sbt version --- project/build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.properties b/project/build.properties index 8ac605a..43b8278 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.2 +sbt.version=0.13.11 From 974684fd9c28f1f295971c805d7a8ced4f4c5c4b Mon Sep 17 00:00:00 2001 From: Ajit Chahal Date: Wed, 27 Apr 2016 20:05:34 +0200 Subject: [PATCH 3/3] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index f9602ec..8b6bec5 100644 --- a/README.md +++ b/README.md @@ -115,3 +115,5 @@ val result = Future { pdf.run(new URL("http://www.google.com"), new File("google ## Copyright ## Copyright (c) 2013, 2014 Federico Feroldi. See `LICENSE` for details. + +https://github.com/wkhtmltopdf/wkhtmltopdf/issues/1508