Jump to content
We've recently updated our Privacy Statement, available here ×

srrao

Members
  • Posts

    2
  • Joined

  • Last visited

srrao's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. @hozawa Yes I have flush() and close() all IO streams. The report looks fine when I export from Jasper Studio. Wondering if I need any other dependencies apart from the following in my Java project: <dependency> <groupId>net.sf.jasperreports</groupId> <artifactId>jasperreports</artifactId> <version>6.7.0</version></dependency><dependency> <groupId>com.lowagie</groupId> <artifactId>itext</artifactId> <version>2.1.7.js6</version></dependency>[/code]
  2. I'm using maven version 6.7.0 and Jaspersoft Studio Community version 6.6.0 to generate the required reports in PDF. The problem with the PDF output is that it prints only the first character in every static text and fields (eg: "TTT" instead of "Ted", "EEEE" instead of "Evan"). Tried exporting to HTML, where it works perfectly fine. Note that I'm using the same jasper file to output in both the formats. I played around with Stretch Type and Print When Detail Overflows property, but that did not change much. Also tried using Maven version 6.6.0 instead of 6.7.0 without any success. JasperPrint jasperPrint = JasperFillManager.fillReport(reportStream, parameters, jrBeanItems);/* outputStream to create PDF */OutputStream outputStream = null;...//Print to PDFString outputFile = userHomeDirectory + File.separatorChar + "JasperTableExample.pdf";outputStream = new FileOutputStream(new File(outputFile));JasperExportManager.exportReportToPdfStream(jasperPrint, outputStream);//Print to HTMLString outputFileHTML = userHomeDirectory + File.separatorChar + "JasperTableExample4.html";JasperExportManager.exportReportToHtmlFile(jasperPrint, outputFileHTML);[/code] Current HTML output ( and the expected result in the PDF format) Actual Result in PDF format
×
×
  • Create New...