Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #55 from 0livier/master

Added support for two wkhtmltoimage options that were missing
  • Loading branch information...
commit 524bbd3b1883204ea3a7f11f31fc38b81f6426fe 2 parents 2e7692d + 08a088a
@docteurklein docteurklein authored
Showing with 10 additions and 1 deletion.
  1. +2 −0  src/Knp/Snappy/Image.php
  2. +8 −1 test/Knp/Snappy/ImageTest.php
View
2  src/Knp/Snappy/Image.php
@@ -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)
View
9 test/Knp/Snappy/ImageTest.php
@@ -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);
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.