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

mark_37

Members
  • Posts

    2
  • Joined

  • Last visited

mark_37'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. Hi, I'm fairly new to JasperReports so I apologize now. I'm currently using iReports 5.6.0 in a Linux environment. I'm having difficulty compressing my PDF. It seems fine if I do not include any images but the moment I do JasperReports seems to iqnore my compression settings. My Java code looks like this: if (jasperReport != null) { JRPdfExporter pdfExporter = new JRPdfExporter(); SimplePdfExporterConfiguration configuration = new SimplePdfExporterConfiguration(); configuration.setCompressed(true); pdfExporter.setConfiguration(configuration); pdfExporter.setExporterInput(new SimpleExporterInput(jasperReport)); pdfExporter.setExporterOutput(new SimpleOutputStreamExporterOutput(pdfFileDest)); pdfExporter.exportReport(); } and my XML for my image object inside my report looks like this: <jr:column width="270" uuid="ba4b6dd8-4345-4bf9-ac45-040f657f1eb5"> <jr:detailCell height="200" rowSpan="1"> <image scaleImage="RetainShape" isUsingCache="true"> <reportElement positionType="Float" isPrintRepeatedValues="false" x="0" y="11" width="264" height="184" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true" uuid="ea12b5e6-69bb-4161-81fb-268c28d59c73"> <printWhenExpression><![CDATA[$F{selected}.booleanValue()]]></printWhenExpression> </reportElement> <imageExpression><![CDATA[$F{filePath}]]></imageExpression> </image> </jr:detailCell> </jr:column> As you can see my image is displayed inside of a table. I should also mention that my report consists of a main report and one sub-report. The sub-report is responsible for displaying the images and contains the XML above. I have included the property: <property name="net.sf.jasperreports.export.pdf.compressed" value="true"/> in both reports. What am I missing or doing wrong?
×
×
  • Create New...