Re: Generating ppt through java

2009-01-07 Thread dinshetty

Hi Yegor,

I need to read text in the cells (in the form of string) from an Excel 2007
file. 
I am using the package org.apache.poi.ss.usermodel.*.
I tried to use the methods Cell.getRichStringCellValue().getString() and
Cell.getRichStringCellValue().toString(). But these methods are returning
null, when the cell's text is having different fonts (i.e. some part of the
cell's text is bold and some part is plain).
Is there any way I can get the plain text regardless of the font and format
of the text ?

Regards,
Dinakara
-- 
View this message in context: 
http://www.nabble.com/Generating-ppt-through-java-tp18399673p21333054.html
Sent from the POI - Dev mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org



Re: Generating ppt through java

2008-10-17 Thread dinshetty

Hi,

How can we remove some slides of ppt using POI HSLF ?
Is there any api to delete slides ?

Regards,
Dinakara

-- 
View this message in context: 
http://www.nabble.com/Generating-ppt-through-java-tp18399673p20027790.html
Sent from the POI - Dev mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Generating ppt through java

2008-09-04 Thread dinshetty

Hi Yegor,

How can we insert a new slide between two slides of an existing ppt ?

Regards,
Dinakara
-- 
View this message in context: 
http://www.nabble.com/Generating-ppt-through-java-tp18399673p19303905.html
Sent from the POI - Dev mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Generating ppt through java

2008-07-30 Thread dinshetty

Hi Yegor,

I could set color and font (bold, italic) in PPGraphics2D and was able to
display it.
However How to display underlined text  using PPGraphics2D.drawString(String
s,float x ,float y) ?


Regards,
Dinakara
-- 
View this message in context: 
http://www.nabble.com/Generating-ppt-through-java-tp18399673p18727704.html
Sent from the POI - Dev mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Generating ppt through java

2008-07-21 Thread dinshetty

Hi Yegor,

The following method in PPGrapics2D is not implemented in the latest source
code in hslf.
Whether it is going to be implemented shortly ? The method paint() in
TextPainter class uses this method.
Is there any alternate way to display the text if we have corresponding
AttributedCharacterIterator and coordinates like below ?

public void drawString(AttributedCharacterIterator iterator, float x,
float y) {
log.log(POILogger.WARN, Not implemented);
}

Regards,
Dinakara
-- 
View this message in context: 
http://www.nabble.com/Generating-ppt-through-java-tp18399673p18571078.html
Sent from the POI - Dev mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Generating ppt through java

2008-07-18 Thread dinshetty

Hi Yegor,

I tried to run the follwing code, But I am getting some null pointer
exception as below
_records in TextRun.java is null. Why is this _records is used for? What can
be done to resolve this ?

Exception:
Exception in thread main java.lang.NullPointerException
at org.apache.poi.hslf.model.TextRun.getTextRuler(TextRun.java:671)
at org.apache.poi.hslf.model.TextPainter.paint(TextPainter.java:128)
at org.apache.poi.hslf.model.TextShape.draw(TextShape.java:531)
at
org.apache.poi.hslf.examples.TextPainter_small.main(TextPainter_small.java:57)


Program
SlideShow ppt = new SlideShow();
ppt.setPageSize(new Dimension(720, 540));
   
Slide slide = ppt.createSlide();

ShapeGroup group = new ShapeGroup();
//define position of the drawing in the slide
Rectangle bounds = new java.awt.Rectangle(200, 100, 350, 300);
group.setAnchor(bounds);
slide.addShape(group);
TextBox box1 = new TextBox();
group.setCoordinates(new java.awt.Rectangle(0, 0, 100, 100));
group.addShape(box1);

Graphics2D graphics = new PPGraphics2D(group);


TextRun tr1 = box1.createTextRun(); 
tr1.getRichTextRuns()[0].setFontSize(12);
tr1.getRichTextRuns()[0].setFontName(Arial);
box1.setHorizontalAlignment(TextBox.AlignLeft);
tr1.setText(
Yegor Kozlov\r +
yegor - apache - org\r +
yegor - apache - org\r +  
yegor - apache - org);

/*TextPainter painter = new TextPainter(box1);
painter.paint(graphics);*/

box1.draw(graphics);
slide.addShape(box1);
-- 
View this message in context: 
http://www.nabble.com/Generating-ppt-through-java-tp18399673p18527013.html
Sent from the POI - Dev mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Generating ppt through java

2008-07-15 Thread dinshetty

Hi,

Pls explain why TextRun and RichTextRun are used what does it represent.
-- 
View this message in context: 
http://www.nabble.com/Generating-ppt-through-java-tp18399673p18458602.html
Sent from the POI - Dev mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Generating ppt through java

2008-07-11 Thread dinshetty

I am trying to generate ppt through Java using Apache POI API. I am able to
create table, bulletted text etc using this API. 

Please answer the following two questions, if anyone aware of this.

1. How to split text across two slides, if  the row had to be broken across
2 slides because the row is so big that it can only be accomodated in 2
slide ?

2. How to resize table cell , if the text which is going to put in that cell
is larger than table cell size ?


-- 
View this message in context: 
http://www.nabble.com/Generating-ppt-through-java-tp18399673p18399673.html
Sent from the POI - Dev mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Generating ppt through java

2008-07-11 Thread dinshetty

Thanks for the reply.

Suppose I have some data and I want to put into some table cell, then how to
calculate the table cell size (i.e. height or width) required. If the text
is to be bold or font need to be changed then how to calculate the new
height and width of the table cell ?






dinshetty wrote:
 
 I am trying to generate ppt through Java using Apache POI API. I am able
 to create table, bulletted text etc using this API. 
 
 Please answer the following two questions, if anyone aware of this.
 
 1. How to split text across two slides, if  the row had to be broken
 across 2 slides because the row is so big that it can only be accomodated
 in 2 slide ?
 
 2. How to resize table cell , if the text which is going to put in that
 cell is larger than table cell size ?
 3. Suppose I have some data and I want to put into some table cell, then
 how to calculate the table cell size (i.e. height or width) required. If
 the text is to be bold or font need to be changed then how to calculate
 the new height and width of the table cell ?
 

-- 
View this message in context: 
http://www.nabble.com/Generating-ppt-through-java-tp18399673p18401391.html
Sent from the POI - Dev mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Generating ppt through java

2008-07-11 Thread dinshetty

Hi,

suppose I have some 9 rows of text. How can we find that only these many
rows can be put into one slide and remaining can be put into another slide.
i.e. How can we calculate that one slide can hold this much text. 
How can we calculate in the below cases ?
1. if we change font and make it bold etc) ?
2. if the alignment of the text is changed ?





dinshetty wrote:
 
 I am trying to generate ppt through Java using Apache POI API. I am able
 to create table, bulletted text etc using this API. 
 
 Please answer the following two questions, if anyone aware of this.
 
 1. How to split text across two slides, if  the row had to be broken
 across 2 slides because the row is so big that it can only be accomodated
 in 2 slide ?
 
 2. How to resize table cell , if the text which is going to put in that
 cell is larger than table cell size ?
 3. Suppose I have some data and I want to put into some table cell, then
 how to calculate the table cell size (i.e. height or width) required. If
 the text is to be bold or font need to be changed then how to calculate
 the new height and width of the table cell ?
 

-- 
View this message in context: 
http://www.nabble.com/Generating-ppt-through-java-tp18399673p18401574.html
Sent from the POI - Dev mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]