Jump to content
JasperReports Library 7.0 is now available ×

Heads up or bug?


ktrinad

Recommended Posts

By: Gregory A. Swarthout - gswarthout

Heads up or bug?

2004-01-15 08:46

When moving to JasperReports v0.5.1 we noticed that there was a subtle difference in the way our PDF reports were rendered. Bolded text now appears "fuzzier" and a bit harder to read. Through much trial and error, I was able to isolate iText v1.01 as the culprit.

 

With iText v0.96, when a font was defined like:

 

<reportFont name="ColumnHeader" isDefault="false" fontName="Arial" size="12"

pdfFontName="Helvetica-Bold" pdfEncoding="Cp1252" isPdfEmbedded="false"

isBold="true" isUnderline="false"/>

 

the isBold="true" had no effect on the PDF rendering. However, with iText v1.01, it DOES have an effect. The isBold="true" makes the font render in a soft, diffuse way. What is even stranger is that having pdfFontName="Helvetica" and isBold="true" renders differently that pdfFontName"Helvetica-Bold" and isBold="false". If pdfFontName="Helvetica-Bold" and isBold="true", the boldness and soft/diffuse effects combine.

 

I discovered this by alternating between iText v0.96 and iText v1.01 with JasperReports v0.5.1.

 

I don't know whether this is a bug or just a heads up that a change has taken place and reports may need to be redefined to combat it.

 

Teodor?

 

 

 

By: Teodor Danciu - teodord

RE: Heads up or bug?

2004-01-15 12:26

 

Hi,

 

I've noticed this myself but didn't investigate

it further since there is no recent modification

in the library that could be related to this.

 

If you say it is about the iText version we use,

maybe we should try to post on their forum in case

Paulo does not hear our cry for help.

:)

 

Thank you,

Teodor

 

 

 

By: Gregory A. Swarthout - gswarthout

RE: Heads up or bug?

2004-01-19 08:39

Teodor, here is Paulo's reponse:

 

I had a look at the JR code and what is done is wrong. If you want to keep

the old behavior change in JRPdfExporter:

 

Font font =

new Font(

baseFont,

jrFont.getSize(),

((jrFont.isBold())?Font.BOLD:0) +

((jrFont.isItalic())?Font.ITALIC:0) +

((jrFont.isUnderline())?Font.UNDERLINE:0) +

((jrFont.isStrikeThrough())?Font.STRIKETHRU:0),

text.getForecolor()

);

 

to

 

Font font =

new Font(

baseFont,

jrFont.getSize(),

((jrFont.isUnderline())?Font.UNDERLINE:0) +

((jrFont.isStrikeThrough())?Font.STRIKETHRU:0),

text.getForecolor()

);

 

If you want to do it the right way have a look FontFactory in iText where

there's the concept of font families.

 

Best Regards,

Paulo Soares

 

----- Original Message -----

From: "Gregory A. Swarthout" <gregorys@xmission.com>

To: "Paulo Soares" <psoares@consiste.pt>

Cc: <gregorys@xmission.com>

Sent: Friday, January 16, 2004 16:44

Subject: RE: [iText-questions] New behaviour in JasperReports v0.5.1

 

 

 

>> Paulo, here are 4 PDFs, with all combinations. The font that was changed

>> each time is the one for the column headers (white on black). Take a look

>> and tell me what you think.

>>

>> Greg

>>

>> Quoting Paulo Soares <psoares@consiste.pt>:

>>

>> The change was introduced in 0.97 in 2003-03-10 to simulate bold and

>> italic when the proper font was not available.

>> What I don't understand is how Helvetica with the bold attribute can be

>> different from Helvetica-Bold without any attribute. I would like to see

>> two pdfs with that.

>>

>> Best Regards,

>> Paulo Soares

>>

>> > -----Original Message-----

>> > From: itext-questions-admin@lists.sourceforge.net

>> [sMTP:itext-questions-admin@lists.sourceforge.net] On Behalf Of Gregory

 

A.

 

>> Swarthout

>> > Sent: Thursday, January 15, 2004 21:16

>> > To: itext-questions@lists.sourceforge.net

>> > Subject: [iText-questions] New behaviour in JasperReports v0.5.1

>> >

>> > When moving to JasperReports v0.5.1 we noticed that there was a subtle

>> > difference in the way our PDF reports were rendered. Bolded text now

>> > appears "fuzzier" and a bit harder to read. Through much trial and

>> error, I

>> > was able to isolate iText v1.01 as the culprit.

>> >

>> > With iText v0.96, when a font was defined like:

>> >

>> > <reportFont name="ColumnHeader" isDefault="false" fontName="Arial"

>> > size="12"

>> > pdfFontName="Helvetica-Bold" pdfEncoding="Cp1252" isPdfEmbedded="false"

>> > isBold="true" isUnderline="false"/>

>> >

>> > the isBold="true" had no effect on the PDF rendering. However, with

>> iText

>> > v1.01, it DOES have an effect. The isBold="true" makes the font render

>> in a

>> > soft, diffuse way. What is even stranger is that having

>> > pdfFontName="Helvetica" and isBold="true" renders differently than

>> > pdfFontName"Helvetica-Bold" and isBold="false". If

>> > pdfFontName="Helvetica-Bold" and isBold="true", the boldness and

>> > soft/diffuse effects combine.

>> >

>> > I discovered this by alternating between iText v0.96 and iText v1.01

>> with

>> > JasperReports v0.5.1.

>> >

>> > I don't know whether this is a bug or just a heads up that a change has

>> > taken place and reports may need to be redefined to combat it.

>> >

>> > Teodor?

>> >

>> > ======================================================================

>> >

>> > Hi,

>> >

>> > I've noticed this myself but didn't investigate

>> > it further since there is no recent modification

>> > in the library that could be related to this.

>> >

>> > If you say it is about the iText version we use,

>> > maybe we should try to post on their forum in case

>> > Paulo does not hear our cry for help.

>> >

>> >

>> > Thank you,

>> > Teodor

>> >

>> >

>> > -------------------------------------------------------

>> > The SF.Net email is sponsored by EclipseCon 2004

>> > Premiere Conference on Open Tools Development and Integration

>> > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.

>> > http://www.eclipsecon.org/osdn

>> > _______________________________________________

>> > iText-questions mailing list

>> > iText-questions@lists.sourceforge.net

>> > https://lists.sourceforge.net/lists/listinfo/itext-questions

>>

>>

>>

>>

>> ---

>>

>> To make success inevitable, let's start by drawing a bunch of UML

>> diagrams! -- Tom Copeland, Jakarta Developer

 

 

 

By: Teodor Danciu - teodord

RE: Heads up or bug?

2004-01-22 11:38

 

Hi,

 

I have commited the fix to the CVS repository.

 

Thank you Gregory and Paulo for solving this.

Teodor

 

 

 

By: Gregory A. Swarthout - gswarthout

RE: Heads up or bug?

2004-01-22 13:59

Teodor, I have done a full CVS update of the project, and I can't find any change. Which file(s) were changed?

 

Greg

 

 

By: Teodor Danciu - teodord

RE: Heads up or bug?

2004-01-22 23:44

 

Hi,

 

I have commented the two lines in the JRPdfExporter.

The CVS web interface does not show the modification,

but I have rechecked the reporsitory and everything

is OK.

 

Teodor

 

 

 

By: Gregory A. Swarthout - gswarthout

RE: Heads up or bug?

2004-01-23 09:01

The CVS web interface does not show the modification (as you said), but neither does a CVS checkout (I just deleted my previous checkout entirely and did a full checkout). This is the command I am using. Is there something wrong with it?

 

cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/jasperreports co -d jasperreports-local jasperreports

 

 

 

By: Paulo Soares - psoares33

RE: Heads up or bug?

2004-01-23 09:08

The changes can take 24 hours to show although the administrator can see them immediately.

 

 

By: Gregory A. Swarthout - gswarthout

RE: Heads up or bug?

2004-01-26 10:59

I checked again today (Monday) and the changes still aren't there.

 

 

By: Teodor Danciu - teodord

RE: Heads up or bug?

2004-01-26 13:48

 

https://sourceforge.net/docman/display_doc.php?docid=2352&group_id=1#1074819096

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