How to set font size in PDF?

Asked

Viewed 1,120 times

0

I am making a report using iReport this all ok, but in the application when generating PDF the source is not the same as in the iReport preview, the font type is ok, I would like to know a way to define the font size to be displayed in PDF.

  • This happens when you go in "Text Properties" of your element, in the property "Size" and increases there ?

  • That’s it! I’ve installed a new font. jar it and inserted it into my project, the font style changes however the font size in the pdf always gets 10px, someone knows how to fix this font size issue ?

1 answer

1

According to a post made in this link, can be useful for you: Link export PDF

The problem is that Ireport uses Java/AWT for mounting and previewing the report and the PDF generator does not, which requires defining a specific PDF source. In Ireport version 3.7.1 these methods are "deprecated" which makes it necessary to create a JAR/Zip library with the fonts used (and create an xml with some settings) and add them to the application classpath.

The interesting thing is that version 3.7.1 has a utility to perform this task, through the menu Tools --> Options --> iReport --> Fonts. Just click install font, select the Font (and its variations, type Bold, Italic, etc.) and generate the jar/zip file to be added to the classpath.

From this moment, just run the application that the report will respect the formats chosen in the process of PDF generation. Remember to enable the "Embedded pdf" option in the ireport options and if the formatted field has html tags, enable the field option to read html tags...

There is also a topic on this site that may be interesting to you: Change source iReport

  • I’ve done the above process, plus the font size in the pdf always remains standard 10px

  • @Brunno you can use the link tmb another link that I made available in my answer http://answall.com/questions/2303/como-alterar-fonte-em-pdf-gerado-pelo-ireport?rq=1

Browser other questions tagged

You are not signed in. Login or sign up in order to post.