php – 如何导出整个页面或html内容与Highcharts不只是图表?
嗨,我所有的图表都是出口的高图,我得到我的php项目的图表
但问题是 我正在寻找导入html内容或整个页面与图表不仅仅是图表 有可能吗? 可以帮我吗 或者在这里显示的是一个样本小提琴http://jsfiddle.net/YBXdq/ 我需要导出图表下方的文字很好
有这么多直接和间接的方式来实现这一点
>使用HTML Canvas:http://html2canvas.hertzen.com/ 例 exec('wkhtmltoimage --quality 50 http://www.bbc.com bbc.jpg'); >使用wkhtmltopdf ImageMagic – 使用wkhtmltopdf将网页转换为pdf – 使用ImageMagic将pdf转换为jpg 例 exec("convert a.pdf a.jpg"); >使用PHP imagegrabwindow和imagegrabscreen 例 $browser = new COM("InternetExplorer.Application"); $handle = $browser->HWND; $browser->Visible = true; $browser->Navigate("http://localhost"); /* Still working? */ while ($browser->Busy) { com_message_pump(4000); } $im = imagegrabwindow($handle,0); $browser->Quit(); header("Content-Type: image/png"); imagepng($im); imagedestroy($im); 先进的例子 – 另见Get Website Screenshots Using PHP 可能的问题:Getting imagegrabscreen to work >使用Webshort,如果你安装了python,使用exec调用它 例 exec("python webshot.py https://example.com/webshot/php example.png"); >下载并使用Website Thumbnail Generator 例 webthumb.php?url=http://www.google.com&x=150&y=150 >使用boxcutter 例 exec('boxcutter -f image.png'); >使用GrabzIt捕获PHP中的截图 例 $grabzIt = new GrabzItClient("APPLICATION KEY","APPLICATION SECRET"); $id = $grabzIt->TakePicture("http://www.google.com","http://www.example.com/GrabzItHandler.php"); >使用wimg.ca 使用此当前页面的示例 http://wimg.ca/https://stackoverflow.com/questions/10328457/how-to-export-the-whole-page-or-html-content-with-highcharts-not-just-the-chart/10330701#10330701 > TimThumb – PHP Image Resizer 例 timthumb.php?src=http://www.google.com/&webshot=1 我认为已经给出了足够的例子 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |