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

How to "embed" fonts using JRPrintServiceExporter


mreis

Recommended Posts

Hi,

 

we'd like to use the JRPrintServiceExporter functionality in order to directly print a jasper report on a network printer. Following the corresponding sample code everything works out fine, except for some parts/texts with special fonts that are obviously not known to the printer (by default).

When we produce a PDF from the report everything works fine and the PDF can be printed correctly.

Is there a way to tell the JRPrintServiceExporter to somehow "embed"/use the fonts that are embedded in the PDF version of the report or is it possible to produce PDF and then print it (using javax.print or similar)?

 

many thanks & kind regards,

Markus

Code:
<staticText>  <reportElement .../>  <box>    <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>    <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>    <bottomPen lineWidth="0.0" lineColor="#000000"/>    <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>  </box>  <textElement textAlignment="Left" verticalAlignment="Top" rotation="None" lineSpacing="Single">    <font fontName="GI16-Medium" pdfFontName="GI16Med.ttf" size="30" isBold="false" isItalic="true" isUnderline="false" isPdfEmbedded ="true" pdfEncoding ="Cp1252" isStrikeThrough="false" />  </textElement>  <text><![CDATA[bausparvertrag]]></text></staticText>
Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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