0 Replies Latest reply: Apr 1, 2017 9:13 AM by Sebastian Servat RSS

    PhantomJS truncates chart y-axis label on PDF export

    Sebastian Servat

      Hi All,

       

      I’m building an extension which integrates with a .NET API, which exposes a service to export a chart to PDF.

       

      If I use Selenium and PhantomJS drivers, this is the result:

      phantomjsdriver-export.png

      Code:

       


      var
      driver = new PhantomJSDriver();

      driver.Manage().Window.Maximize();

      driver.Navigate().GoToUrl("http://localhost:4848/extensions/PhantomJS/PhantomJS.html");


      System.Threading.Thread.Sleep(TimeSpan.FromSeconds(10));


      driver.GetScreenshot().SaveAsFile("screenshot.png", ScreenshotImageFormat.Png);

      driver.Quit();

       

      If I use ChromeDriver instead, it outputs the expected result:

      chromedriver-export.jpg

       

      Code:

       


      var
      driver = new ChromeDriver();

      driver.Manage().Window.Maximize();

      driver.Navigate().GoToUrl("http://localhost:4848/extensions/PhantomJS/PhantomJS.html");


      System.Threading.Thread.Sleep(TimeSpan.FromSeconds(10));


      driver.GetScreenshot().SaveAsFile("screenshot.png", ScreenshotImageFormat.Png);

      driver.Quit();

       

      Has anyone come across any similar issues before with PhantomJS and Sense?

       

      Any help, much appreciated.

       

      Thanks,

       

      Seb