GithubHelp home page GithubHelp logo

jasperreports-pdf-lib7's People

Contributors

dadza avatar shertage avatar teodord avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jasperreports-pdf-lib7's Issues

Installation Instructions don't work / unclear

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)>>

iText Commercial Licence

Can this project be used without an AGPL Licence when a commercial iText Licence is accquired?

Type STRIKETHRU cannot be resolved or is not a field

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

output a list of JasperPrint object to PDF got blank pages before each item

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.