[英]ReactJS components for PDF export, Excel export and print
I´m building some ReactJS Table
and Report
components tha basically will contain <table>
data, some graphics ( d3
) and some textual data. 我正在构建一些ReactJS Table
和Report
组件,它基本上将包含<table>
数据,一些图形( d3
)和一些文本数据。 I need to provide 3 buttons: 我需要提供3个按钮:
Are there any trustable packages available for the tasks above using ReactJS ? 使用ReactJS是否有任何可信任的包可用于上述任务? What is the approach to handle these requirements ? 处理这些要求的方法是什么?
I would use a combination of the following JavaScript libraries: 我将使用以下JavaScript库的组合:
React Csv is my favourite JavaScript library for working with csv. React Csv是我最喜欢的用于处理csv的JavaScript库。 It excels at dynamic generation. 它擅长动态生成。
PDF Make is my favourite JavaScript library for generating PDFs. PDF Make是我最喜欢的用于生成PDF的JavaScript库。
Note: I would attach the files to this post, but there is currently no facility for this in StackOverflow. 注意:我会将文件附加到此帖子,但StackOverflow中目前没有此功能。
Example: Copy and paste this as .html (in React, it would be onClick={window.print()} ... If I'm correct) 示例:将其复制并粘贴为.html(在React中,它将是onClick = {window.print()} ...如果我是正确的)
<!Doctype html>
<html>
<body>
<p>Use the button below to print</p>
<button id="print" onclick="window.print()">Print</button>
</body>
</html>
Old question, but since I was looking for something similar, I ended up using : 老问题,但由于我正在寻找类似的东西,我最终使用:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.