Permalink
Browse files

Added: support for two options of wkhtmltoimage that were missing (us…

…e-xserver and enable-smart-width)
  • Loading branch information...
1 parent 2e7692d commit 0710c73a4f818d4743fbd9a86c8a8a1c0d6d2d3f @phpcc phpcc committed with 0livier Apr 9, 2013
Showing with 10 additions and 1 deletion.
  1. +2 −0 src/Knp/Snappy/Image.php
  2. +8 −1 test/Knp/Snappy/ImageTest.php
View
@@ -65,9 +65,11 @@ protected function configure()
'radiobutton-svg' => null, // Use this SVG file when rendering unchecked radiobuttons
'run-script' => null, // Run this additional javascript after the page is done loading (repeatable)
'disable-smart-width' => null, // Use the specified width even if it is not large enough for the content
+ 'enable-smart-width' => null, // Extend --width to fit unbreakable content (default)
'stop-slow-scripts' => null, // Stop slow running javascripts
'no-stop-slow-scripts' => null, // Do not stop slow running javascripts (default)
'transparent' => null, // Make the background transparrent in pngs *
+ 'use-xserver' => null, // Use the X server (some plugins and other stuff might not work without X11)
'user-style-sheet' => null, // Specify a user style sheet, to load with every page
'username' => null, // HTTP Authentication username
'width' => null, // Set screen width (default is 1024)
@@ -9,4 +9,11 @@ public function testCreateInstance()
$testObject = new \Knp\Snappy\Image();
$this->assertInstanceOf('\Knp\Snappy\Image', $testObject);
}
-}
+
+ public function testAvailableOptions()
+ {
+ $testObject = new \Knp\Snappy\Image();
+ $testObject->setOption('use-xserver', true);
+ $testObject->setOption('enable-smart-width', true);
+ }
+}

0 comments on commit 0710c73

Please sign in to comment.