PDF dynamic features

I was asked to write a program that generates reports in the form of PDF files. There are two main dynamic functions that have been set, which I'm not sure are even possible:

1) The report contains a table with several columns. Users should be able to click on a column heading to sort table rows by the values ​​in that column.

I have never seen a PDF file that users can click to re-sort the table results, but I was told that this is possible.

2) The report should have a drop-down list that users can choose to switch which rows of the table are displayed or hidden.

I am sure that this cannot be done in a PDF file, although I was told differently.

So my question is: which of these things is possible and which library should I use to create PDF files? (The library can be in any programming language.)

+4
source share
5 answers

I would look at Acrobat. There is a JavaScript implementation for it.

http://www.adobe.com/devnet/acrobat/javascript.html

+1
source

Do not use PDF as a replacement for html / CSS / JavaScript / etc. PDF is best used when it is used as an unchanged document format, and not as a poor person’s web page. Of course, you can put your foot in a box and call it shoes, but it's really just a box.

+2
source

Take a look

You can also download a ready-to-learn PDF sample with a built-in function.

+2
source

For Java, there are the following tools / libraries that are very good and stable: JasperReports - you develop your report in a graphic designer, and then populate it with data programmatically.

Another iText . It works on the lower lava (the actual JasperReports is built on top of it for the PDF part), so it can support the requested sorting options.

+1
source

Yes, all these dynamic features are possible using the XFA PDF form (created in LiveCycle Designer) and scripting (JavaScript). We have examples of sorting rows in tables and hiding and displaying subforms at http://www.pdfscripting.com , but you must be a member to access them (not free). You can find free sample files doing an Internet search for XFA PDF files or LiveCycle Designer PDF files, but not necessarily, but it is possible in all cases.

Dimitri WindJack Solutions http://www.windjack.com

0
source

All Articles