如何将n个列导出为Java中的PDF标题? [英] How to export n number columns as headings for PDF in Java?

查看:219
本文介绍了如何将n个列导出为Java中的PDF标题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁能告诉我如何将 n 数字列导出为Java中的PDF标题?

Can anyone tell me how to export n number columns as headings for PDF in Java?

实际上用户上传CSV文件。我需要将该文件导出为PDF。问题是,如果CSV文件有1000列作为标题,那么在导出为PDF时如何处理。

Actually user uploads a file in CSV. I need to export that file into PDF. The problem is if the CSV file has 1000 columns as headings then how to handle while exporting to PDF.

编辑:是的,我问的是实现布局,意味着我们不能将所有1000列作为标题放在一个页面中...我们可以为pdf页面添加滚动条吗?

Yeah I am asking how to implement the layout, means we can't put all 1000 columns as headings in one page... can we add scroller for pdf page?

Edit2: 我正在使用itext进行pdf生成。如何找到最大超限。如果发生水平滚动没问题。行也将成千上万。在这里,我能够生成pdf文件,但是如果它超过8或10,那么列就会混合在一起,所以为了避免我怎样才能生成水平卷轴呢?

I am using itext for pdf generation. How can I find the max exceed limit. No problem if horizontal scrolling occurs. The rows will be also in thousands. Here I am able to generate the pdf file but if it exceeds more than 8 or 10 it the columns are coming together they were mixing so to avoid that how can I produce a horizontal scroller?

推荐答案

我认为应该考虑的事情很少。

I think there are few things which should be considered.


  1. 找出答案最大支持的pdf页面宽度,因为如果它是一个限制,你就不能超过这个。

  2. 如果你想在pdf页面中包含1000列,请更改你的要求,因为用户会因水平滚动而烦恼。

  3. 如果您的专栏有10到15行记录,您可以在垂直位置逐个添加列。

这篇关于如何将n个列导出为Java中的PDF标题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆