简体   繁体   English

Google图表导出为PDF

[英]Google chart export in to PDF

I need to export a Google chart into PDF file. 我需要将Google chart导出为PDF文件。 But in forum says that, There is no way to directly export the charts as a PDF, but we can convert them to png images and import the image files into a PDF. 但是在论坛上说,没有办法将图表直接导出为PDF,但是我们可以将它们转换为png图像,然后将图像文件导入PDF。 So I converted svg format (google chart format) into png format. 所以我将svg格式(谷歌图表格式)转换为png格式。

My question is : Can I export this png image (streaming) directly into PDF with out saving in a physical path? 我的问题是:是否可以将png图像(流)直接导出为PDF ,而无需保存在物理路径中? If yes how it implement. 如果是,它将如何实施。

My language is java and java script as client side. 我的语言是java和java脚本作为客户端。

I searched many questions in this but doesn't get solution match for my issue 我在此搜索了许多问题,但没有找到适合我的问题的解决方案

Are you using iText library? 您正在使用iText库吗? They have exampes how to add image on page . 他们举例说明如何在页面添加图像 And even they use .jpg, nevertheless, I think you can change it for .png. 即使他们使用.jpg,但我认为您可以将其更改为.png。


PS I'm looking this issue to. PS我正在寻找这个问题。 Changing chart to image and then set it in PDF - is the first way, but as I understand, there is another one - using HTML to convert it to pdf. 将图表更改为图像,然后将其设置为PDF是第一种方法,但是据我了解,还有另一种方法-使用HTML将其转换为pdf。 So, now I'm trying to create html with charts, which will be converted in pdf format. 因此,现在我正在尝试使用图表创建html,并将其转换为pdf格式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM