Jump to content
JasperReports Library 7.0 is now available ×

Fonts and PDF Exporting in WebApp


2004 IR Help

Recommended Posts

By: Andres Gomez - tanty

Fonts and PDF Exporting in WebApp

2005-11-04 10:24

Hi all!!

 

I've a problem. I'm trying to make PDF documents with embedded TTF external Fonts in a WebApp with no success. Every time, the builtin fonts are in the PDF document but the TrueType fonts aren't.

 

In the .jrxml is written:

 

...

<reportFont name="EtiquetaTitulo" isDefault="false" fontName="Open Symbol" size="12" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="OPENSYMBOL.TTF" pdfEncoding="Cp1250" isPdfEmbedded="true"/>

...

 

and, in the .java which exports the PDF:

 

...

JRProperties.setProperty("net.sf.jasperreports.export.pdf.fontdir.jasper", <path_to_fonts>));

 

JasperPrint jasperPrint = JasperFillManager.fillReport(report, reportParameters, dataSorce);

JRExporter exporter = getExporter(<pdf_type>);

 

exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);

exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, outputStream);

 

exporter.exportReport();

...

 

What's wrong?

 

I've read about the FONT_MAP parameter since JasperReports-1.0.1 but no documentation/sample is included and I don't know how and if I have to use it.

 

Any help is wellcome.

 

Cheers.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...