cell font not working

The PDF Creator enables you to create secure PDF documents and to view, print and process existing PDF documents.
If you have any questions about the installation and usage of the PDF Creator please post them here.
Post Reply
alasmana
Posts: 7
Joined: Mon Dec 26 2005

cell font not working

Post by alasmana » Mon Jan 02 2006

The font size is not setting. The font class is but the size stays the same.

This is my code:

.createObject(nObjTable,"oTop")
obj = .getObjectByName("oTop")
IF !ISNULL(obj)
WITH obj
.Attribute("Rows") = 1
.Attribute("Columns") = 1
.Attribute("left") = lnLeft
.Attribute("top") = lnTop
.Attribute("right") = lnLeft + nThumbW
.Attribute("bottom") = lnTop + nVBreak
ENDWITH
ENDIF

.ObjectAttributeSTR("oTop.Cells[1,1]", "TextGap", 2)
.ObjectAttributeSTR("oTop.Cells[1,1]", "DataType", 1)
.ObjectAttributeSTR("oTop.Cells[1,1]", "BackColor", "C0C0C0")
.ObjectAttributeSTR("oTop.Cells[1,1]", "Font", "Arial Narrow,8,0,0,0") &&Text Font not working
.ObjectAttributeSTR("oTop.Cells[1,1]", "Text", lcTextTop)
.RedrawObject("oTop.Cells[1,1]") &&back color not working

Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan » Tue Jan 03 2006

Hello,

I tried your code using version 2.0f of the PDF Creator and it works.

Which version of the Creator are you using?

Happy New Year!

alasmana
Posts: 7
Joined: Mon Dec 26 2005

Post by alasmana » Wed Jan 11 2006

I'm using 2.0f as well. I just downloaded. Neither the font nor the color is working.

Please help.

Tks.

alasmana
Posts: 7
Joined: Mon Dec 26 2005

Post by alasmana » Wed Jan 11 2006

I forgot to tell you. I'm looking at the PDF with Adobe Reader. I have tried with 6.0 and 7.0. Neither of it works. I'm not embedding the font. Could it be that the problem? What about the colors?.

Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan » Thu Jan 12 2006

Hello,

No, it is not an issue about embedding the fonts or not, Arial is available on all systems and it doesn't need to be embedded unless you are trying to view the file on a system that doesn't have Arial.

You are setting the backColor to Gray yourself and this worked in my sample.

I notice that you are using: ObjectAttributeSTR
The function name should be ObjectAttributeStr instead.

Hope this helps.

alasmana
Posts: 7
Joined: Mon Dec 26 2005

font size still not working

Post by alasmana » Mon Jan 16 2006

Ok, I managed the back color to work. It's weird, I only had to put the color instruction after the text instruction and it worked.

The font is kind of working, the font type works, it changes to symbol for example but the font size is not working.

.ObjectAttributeSTR("oTable.Cells[1,1]", "Font", "Symbol,8,700,0,0")

However the title font works fine. I just don't understand why.

.ObjectAttributeSTR("oTable.Cells[1,1]", "TitleFont", "Arial Narrow,8,0,0,0") &&Text Font not working

I need the text font to work because the title doesn't have some attributes that I need.

Thanks for everything by the way.

Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan » Thu Jan 19 2006

Hello,

I was able to reproduce this issue of the font size not being set when setting the Font property of a cell.
This works properly when setting it for a text by example.

I will forward this issue to our Developers to check if it.

Post Reply