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

designing a pdf


rbojja

Recommended Posts

  • Replies 9
  • Created
  • Last Reply

Top Posters In This Topic

rbojja wrote:

i need to design my pdf document with dots (.) in large size.

 

Code:

<staticText>
<reportElement x="0" y="0" width="400" height="100"/>
<textElement isStyledText="true">
<font size="60"/>
</textElement>
<text>...</text>
</staticText>

 

HTH,

Lucian

Link to comment
Share on other sites

Hi,

The solution is fine for seeing a dot using the style

sheet.But when it comes to scenario where i have a text say

 

Welcome to Jasper Reports i need a dot in the beginning of the text.

 

ie

 

.Welcome to Jasper Reports. i am unable to show the dot in large size before the text.

 

say my text is of times new roman '8' font and i need a dot here.

Link to comment
Share on other sites

You can use styled text to display the dot with a larger font size:

Code:

<staticText>
<reportElement x="0" y="0" width="400" height="100"/>
<textElement isStyledText="true"/>
<text><![CDATA[<style size="40">.</style>Welcome to Jasper Reports]]></text>
</staticText>

 

HTH,

Lucian

Link to comment
Share on other sites

Hi Lucian,
Please see the attachment for reference the way of representing the text on pdf.

The below given solution works fine,but if any change of width/height doesnt show the desired result.And more over the text is also show in large font.

I seperated the dot and text into two static text elements but still representing dot is a big task for me.

Can you correct me if i am going wrong. [file name=for_u_r_reference.doc size=24064]

Link to comment
Share on other sites

rbojja wrote:

The below given solution works fine,but if any change of width/height doesnt show the desired result.And more over the text is also show in large font.

I seperated the dot and text into two static text elements but still representing dot is a big task for me.

 

I don't understand what the problems are. How exactly does changing the width/height affect the desired result? And how is the text shown in large font? Please post some sample of what you are doing so that we understand what happens.

 

If a standard dot character is not good for you, you may try to use a Unicode bullet character (assuming that the PDF font you use includes a glyph for this character):

Code:

<textField>
<reportElement x="0" y="0" width="100" height="20"/>
<textFieldExpression>"u2022 Welcome to Jasper Reports."</textFieldExpression>
</textField>

 

Regards,

Lucian

Link to comment
Share on other sites

Hi --

 

I do quite a few reports with large dots as bullet points. I tend to use a separate <textField> or <staticText> for my dots. Then I use the pdfFontName as "ZapfDingbats" for my dots, and I use lower-case "l" as my character. That gives me a really good dot. Same goes for triangles, squares, diamonds, and the scissor.

Link to comment
Share on other sites

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