Chart Appears as red colour in android mobile acrobat Reader

A discussion forum for JFreeChart (a 2D chart library for the Java platform).

Chart Appears as red colour in android mobile acrobat Reader

Postby plunavat » Wed Feb 07, 2018 4:21 pm


I am using scatter chart and printing the same to pdf using JASPERREPORT (as i need to show other data)
I am creating collection as follows
Code: Select all
public FamilyChartSheet(Tbl12ModelPerformance tbl12ModelPerformance,JFreeChart chart) {
      this.tbl12ModelPerformance = tbl12ModelPerformance;
      this.chart = new JCommonDrawableRenderer(chart);
      if (this.tbl12ModelPerformance != null) {
         Tbl09Performancecurvemaster tbl09Performancecurvemaster = this.tbl12ModelPerformance
         Tbl02Modelmaster tbl02Modelmaster = this.tbl12ModelPerformance.getTbl02Modelmaster();
         this.pumpModel = tbl02Modelmaster.getPumpModel();
         this.performanceCurveNo = tbl09Performancecurvemaster.getPerformanceCurveNo();
         this.mounting = tbl02Modelmaster.getTbl01Pumptype().getMounting();
         this.suction = tbl02Modelmaster.getSuction();
         this.discharge = tbl02Modelmaster.getDischarge();
         this.uomDimension = "mm";
         this.minStage = tbl02Modelmaster.getMinStage();
         this.maxStage = tbl02Modelmaster.getMaxStage();
         this.stageType = tbl02Modelmaster.getStageType();

Code to generate pdf

Code: Select all
public void PDFExporterOfferPath(Collection<?> beanCollection, String jasperpath, String path,
         Map<String, Object> parameters1) {

      try {
         JRBeanCollectionDataSource beanCollectionDataSource = new JRBeanCollectionDataSource(beanCollection);
         JasperPrint jasperPrint = JasperFillManager.fillReport(getReportPathCompany() + jasperpath, parameters1,
         ArrayList<JasperPrint> jasperPrintList = new ArrayList<JasperPrint>();

         File file1 = new File(path);
         if (!file1.exists()) {
         OutputStream output = new FileOutputStream(file1);
         JRPdfExporter exporter = new JRPdfExporter();
         exporter.setParameter(JRExporterParameter.JASPER_PRINT_LIST, jasperPrintList);
         exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, output);
      } catch (Exception ex) {

The pdf when opened in Acrobat Reader in Android Mobile App shows following (chart is showing red colour box)


When the pdf is opened in Drive Pdf Viewer or WPS Office Viewer then the pdf display is ok


Could you please let me know the issue
I am using jasperReport 5.6.0, jfreechart 1.0.14

Thanks & Regards,
Pranav C Lunavat
Posts: 27
Joined: Sun Jan 01, 2012 10:59 am

Re: Chart Appears as red colour in android mobile acrobat Re

Postby david.gilbert » Sat Feb 10, 2018 2:07 pm

I would guess that this is a bug in the PDF viewer application, not something related to JFreeChart.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Ask your company to buy the JFreeChart Developer Guide
:idea: Check out other products sold by my company Object Refinery Limited
JFreeChart Project Leader
Posts: 11664
Joined: Fri Mar 14, 2003 10:29 am

Return to JFreeChart

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 7 guests