jaspersoft / jasperreports-pdf-lib7 Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU Affero General Public License v3.0
License: GNU Affero General Public License v3.0
When using with Jasperreport Library programmatically, how can we change the default PDF producer to this alternative producer?
i.e. com.jaspersoft.jasperreports.export.pdf.modern.ModernPdfProducerFactory
I followed the instructions given in README.md. I tried setting the classpath via both window->preferences->Java->Build Path->class variables
and the CLASSPATH
envvar.
I set the property
net.sf.jasperreports.export.pdf.producer.factory=com.jaspersoft.jasperreports.export.pdf.modern.ModernPdfProducerFactory
in
C:\Program Files\TIBCO\Jaspersoft Studio Professional-7.9.0\jrio\jrio\WEB-INF\classes\jasperreports.properties
(As well as any other jasperreports.properties
file I could find.)
The pdf exported by Jaspersoft studio was still produced pdf via iText2.7.1 as evident in the pdf:
<</ModDate(D:20211129184429+01'00')/Creator(JasperReports Library version 6.16.0-48579d909b7943b64690c65c71e07e0b80981928)/CreationDate(D:20211129184429+01'00')/Producer(iText 2.1.7 by 1T3XT)>>
Can this project be used without an AGPL Licence when a commercial iText Licence is accquired?
Hi,
I've integrate "jasperreports-pdf-lib7" in my workspace, then have this issue :
STRIKETHRU cannot be resolved or is not a field JRPdfExporter.java /jasperreports-pdf-lib7/src/main/java/com/jaspersoft/jasperreports/export/pdf line 1728
com.itextpdf.io.font.FontConstants in : com.itextpdf.io (version 7.1.2) doesn't contains : FontConstants.STRIKETHRU.
Could you help me ?
Thks
I have a report which composed of different Jasperreport templates, e.g. template1 and template2, therefore we use ArrayList to collect the JasperPrint Objects and generate the report into PDF like this:
JasperFillManager fm = new JasperFillManager();
JasperPrint jp1 = fm.fillReport("template1.jasper", ...);
JasperPrint jp2 = fm.fillReport("template1.jasper", ...);
List list = new java.util.ArrayList();
list.add(jp1);
list.add(jp2);
JRPdfExporter pdfExporter = new JRPdfExporter();
///////////////////////////////////////////////////////////////////////////////////
// NOTE: this set of code is required for using itext7 support instead of itext2
JasperReportsContext defJrCtx = net.sf.jasperreports.engine.DefaultJasperReportsContext.getInstance();
defJrCtx.setProperty(pdfExporter.PDF_PRODUCER_FACTORY_PROPERTY, "com.jaspersoft.jasperreports.export.pdf.modern.ModernPdfProducerFactory");
////////////////////////////////////////////////----------------------------------
pdfExporter.setExporterInput(SimpleExporterInput.getInstance(list));
FileOutputStream fos = new FileOutputStream('test.pdf')
pdfExporter.setExporterOutput(new SimpleOutputStreamExporterOutput(fos));
pdfExporter.exportReport();
The above code will generate the PDF file with an extra blank page before each items in the ArrayList, i.e. before contents of template1 and before contents of template2; on commenting out the itext7 support code (use itext2), the output will not have the extra blank pages; is there any way to instruct the ModernPdfProducerFactory / itext7 to NOT outputting the extra blank pages?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.