How to create electronically signed PDF in JasperServer - jasper-reports

Is there a way to sign electronically a PDF generated by JasperServer?

As we can see in the wiki:
http://community.jaspersoft.com/wiki/pdf-output-digital-signing-not-implemented-jasperreports
JasperReports itself does not provide a direct way to sign digital
certificates in the PDF report output file nor implements such a
feature from iText which is the library used by JasperReports to
generate a PDF file.
We would need to customize the iText library (wich is the one used to export de documents).

Related

Generating PDF/A-2 with BIRT

How can we generate PDF/A-2 using BIRT?
You can't.
But you can use commercial software to post-process the PDF generated by BIRT.

how to convert HTML page to PDF using ITEXT or PDFCROWD API

PDF created will be based on dynamic HTML page.
Using ITEXT 5 or 7 with XMLWORKERHELPERCLASS would be lengthy process.
If i am using pdfcrowd API it seems to be ok but not able to generate on localhost or any other private ip. I am ready to pay for their services if they achieve above issue.
First you need to get iText 7 (the core library) and the pdfHtml add-on (the part that will parse the HTML+CSS and convert it to iText objects). Go to github to find out how to download these.
Suppose that you have this HTML:
With this corresponding CSS:
Then you can use this code snippet:
ConverterProperties converterProperties =
new ConverterProperties().setBaseUri(resoureLocation);
HtmlConverter.convertToPdf(
new FileInputStream(HTMLSource),
new FileOutputStream(pdfDestination), converterProperties);
Where resourceLocation points at your base URI, HTMLSource is the path to your HTML file, and pdfDestination is the path where you want the resulting PDF to be written.
When you execute this code, you will get the following PDF:
Note that buying a commercial license may be necessary if you intend to use iText in the context of a proprietary software project.

Report generation in web applications

As part of my web application, i am using iReport tool to generate reports and its working fine but my doubt is, is it possible to generate xls type report in browser like pdf (we can show the pdf file in the browser)? Means I need to show reports in xls file or word document in the client machine, is it possible? Can anybody clear my doubt?
Although it is a bit late, I'll try to give a generic answer
you can fetch your data to your local Jasper Reports server via JSON.
There is a sample of JsonDataSource in the 4.5.0 version of jasperreports at *\demo\samples\jsondatasource
to run report and receive output pdf, etc. you can use REST API for Jasper Server
then you send output to end user

Comparison between JasperReports and iText/iTextpdf

I want to know pros and cons of JasperReports and iText/iTextpdf. Till now, I have been working on JasperReports but now thinking about shifting on iText. Should I change to iText or continue with JasperReports?
I know that for dynamic reports, we should use iText and for reports with static structure, we can use JasperReports and then create pdfs from them. But I still want to know more about both of these.
Jasper is a PDF library using iText for the generation of its PDFs. iText is a library for creating and manipulating PDFs.
If your purpose is to generate reports, I would stick to Jasper. However, if you feel like you are going to generate more PDFs that aren't reports, you could take a look at the iText library.
iText has an amazing book published by Manning called iText in Action 2nd Edition, which covers iText5 if you want to learn more about it. Also check out the official website of iText at itextpdf.com
JasperReports is a Business Intelligence / Reporting tool that uses an old iText version to create reports. It is distributed by
JasperSoft / TIBCO. JasperReports only uses a limited part of the
complete iText functionality. Creating PDF is just one of many
features of JasperReports, and JasperSoft uses iText to implement that
feature.
iText is a library that can be used by developers to enhance their web
and other applications with PDF functionality: create PDF, fill out
PDF forms, examine and manipulate existing PDFs.
Source:
http://developers.itextpdf.com/question/what-difference-between-itext-jasperreports-and-adobe-lc
https://stackoverflow.com/a/15537779/1793718

JasperReport using iReport not support unicode character while export to pdf format

I am using iRport design tool to create the report in my project. I have created .jrxml and .jasper file, it works fine in the iReport means it supports for the Unicode character and displaying all unicode characters but if I integrated this .jasper file in my java class and exports the report into the pdf format by using itext jar file. Then the program runs well and create the report in pdf format but not showing the unicode characters in the generated report file. So please help me in this case sothat I will able to view unicode characters in the generated report file. Thanks in advance.
Of course the JasperReports has the unicode support.
This articles are about unicode support:
JasperReports - Unicode Sample
JasperReports - Fonts Sample
The main concept is to use the Font Extensions mechanism.
I think, You may need to add uni code font to class path.