Re: Image extraction

2006-01-16 Thread Yegor Kozlov
Hi I think I know how to extract images from a ppt file. PowerPoint stores images in a separate OLE stream named Pictures. Extracting image data from it is not difficult, I will commit the patch in a couple of days. Regards, Yegor DN Hi. DN I've been testing POI lately on Word, Excel and

Re[2]: Powerpoint and HSLF

2006-03-27 Thread Yegor Kozlov
Hi Nick NB Yegor - YA adding slides fix: alas the RefId wasn't as simple as NB (slide ID+2), it's actually the sheet ID from the PersistPtr NB stuff. I've fixed the code, and added some more tests to NB TestSlides to check it all Thank you. I'm going to do stress testing

Re: ayuda, para ver power point!!

2006-04-03 Thread Yegor Kozlov
imagine an utility based on HSLF which will build screen captures of PPT slides and save them as images. Regards, Yegor Kozlov l Greetings. I do not speak ingles. use translator. I want that my l window java(JFrame) shows a file to power point. It is possible to do l this using POI-HSLF. Thanks

Re: Is PPT Merging possible with HSLF

2006-04-06 Thread Yegor Kozlov
or custom curves which are described by an arbitrary set of points). These guys are in my TODO list but my hands are always full and I can't say how soon I will proceed to them. Regards, Yegor Kozlov PA Hi, PA I need to merge two or more ppts to a new ppt. I also need to add my own PA slides

Re[2]: problem with HSLF slides and RichTextRuns

2006-04-06 Thread Yegor Kozlov
. WMF and Macintosh PICT are not yet supported. Regards, Yegor Kozlov - To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http

Re[2]: Is PPT Merging possible with HSLF

2006-04-07 Thread Yegor Kozlov
with a particular type of shape. Regards, Yegor Kozlov PA Thanks Yegor, PA Could i get the example you were talking ablout? PA Thanks a lot, PA Poornima PA On 4/6/06, Yegor Kozlov [EMAIL PROTECTED] wrote: Hi No, you can't do it for now. HSLF is young and evolving project and the described

Re: HSLF - problem getting correct style of richTextRuns

2006-05-29 Thread Yegor Kozlov
Hi In HSLF we only have initial support for rich text runs. You can read style attributes only if they are explicitly set. If style is not set explicitly it is taken from a special container TxMasterStyleAtom which is not implemented yet. I think I know how to handle master character styles.

Re[2]: org.apache.poi.hslf.model.Slide

2006-06-05 Thread Yegor Kozlov
The number of the first slide is stored in DocumentAtom. In PowerPoint you can change it in the Page Setup dialog. If we get slides in the correct order then getSlideNumber should return DocumentAtom.firstSlideNumber + idx; where idx is 0-based index in the array of slides. You can play with

Re[2]: org.apache.poi.hslf.model.TextRun

2006-06-08 Thread Yegor Kozlov
Hi TextRun is just a holder of the text. If you want to work with shapes you should use Slide.getShapes() which returns a collection of shapes in the slide: SlideShow ppt = new SlideShow(new HSLFSlideShow(filename)); Dimension pgsize = ppt.getPageSize(); //page size

Re: Position and size

2006-06-27 Thread Yegor Kozlov
There is a Shape.getAnchor() which returns anchor of the shape. see the example: SlideShow ppt = new SlideShow(new HSLFSlideShow(filename)); Slide sl = ppt.getSlides()[0]; Shape[] sh = sl.getShapes(); for (int i = 0; i sh.length; i++) { //anchor of

Re: PPT Pictures

2006-07-03 Thread Yegor Kozlov
Hi For instance, if there are 3 pictures, being 2 of them the same picture, the returned vector length is 2. It's how it is supposed to work. HSLFSlideShow.getPictures() returns the actual array of images contained in the presentation. Each image is included only once regardless of how many

Re: POI issue

2006-07-04 Thread Yegor Kozlov
Hi, Your code is almost correct. The last lines must be as follows: FileOutputStream out = new FileOutputStream(C:/Test/Presen.ppt); ppt.write(out); out.close(); I.e. To create a new PPT you call SlideShow ppt = new SlideShow(); To write it to a output stream call

Re[2]: PPT Pictures

2006-07-04 Thread Yegor Kozlov
/3, Yegor Kozlov [EMAIL PROTECTED]: Hi For instance, if there are 3 pictures, being 2 of them the same picture, the returned vector length is 2. It's how it is supposed to work. HSLFSlideShow.getPictures() returns the actual array of images contained in the presentation. Each image

Re[2]: PPT Pictures

2006-07-07 Thread Yegor Kozlov
, it happened mj with a .BMP and a .JPG file. mj Any suggestions? mj Thanks, mj mr_jonze. mj 2006/7/3, Yegor Kozlov [EMAIL PROTECTED]: Hi For instance, if there are 3 pictures, being 2 of them the same picture, the returned vector length is 2. It's how it is supposed to work

Re[2]: TextBox bug

2006-07-13 Thread Yegor Kozlov
I will look into it when have my hands free :)) NB On Thu, 13 Jul 2006, Tales Paiva Nogueira wrote: This piece of code doesn't work in all cases, I made some tests and the NullPointerException still happens. NB I wonder if in this case, it's a TextBox that doesn't actually have any NB text in

Re: HSLF: Adding notes to a slide

2006-07-25 Thread Yegor Kozlov
si Just wanted to double check, does add new text refer to notes? Yes, it refers to notes. We can add/edit text in shapes. It's clear how to implement notes, just need time to do it :). - To unsubscribe, e-mail: [EMAIL

Re: non {png,jpg} images

2006-08-03 Thread Yegor Kozlov
Hi, Supported image formats in PPT are: EMF, WMF, PICT, JPEG, PNG and DIB. If you insert pictures in other formats PPT may convert them, for example, into JPEG or PNG and store the converted data. I confirmed that on Windows BMP is converted into PNG. Could you send your PPT with TIFF? I would

Re: Get text from a URL pointing to a ppt file

2006-08-11 Thread Yegor Kozlov
Hi, I think it can be caching issue. I guess your code was something like this: URL url = new URL(http://localhost:8080/analysis.ppt;); URLConnection conn = url.openConnection(); InputStream is = conn.getInputStream(); SlideShow ppt = new SlideShow(is); //the order of slides is

Re: Extracting Tables from PowerPoint

2006-08-14 Thread Yegor Kozlov
Hi, A table in PowerPoint is a group of shapes. It HSLF API it is represented by a org.apache.poi.hslf.model.ShapeGroup class. Typically a table consists of TextBox and Line objects which represent text runs and borders. Below is sample code how to iterate over table cells: Slide slide = ...;

Re: RES: Extracting Tables from PowerPoint

2006-08-15 Thread Yegor Kozlov
Thnx again, G Gerson Albuquerque G -Mensagem original- G De: Yegor Kozlov [mailto:[EMAIL PROTECTED] G Enviada em: segunda-feira, 14 de agosto de 2006 11:26 G Para: POI Users List G Assunto: Re: Extracting Tables from PowerPoint G Hi, G A table in PowerPoint is a group of shapes. G It HSLF

Re: [HSLF] Indentation level identification

2006-08-17 Thread Yegor Kozlov
Hi, TPN Is there any other way to identify the indentation level for a given TPN RichTextRun? Unfortunately you can't retrieve the indentation level for a RichTextRun. It's not supported by the current code. Indentation level is stored as a 2-byte paragraph property in the style record.

Re[2]: [HSLF] Indentation level identification

2006-08-17 Thread Yegor Kozlov
Nick, In StyleTextPropAtom.setParentTextSize when we read paragraph properties we ignore the 2-byte value before the paragraph properties: // Fetch the 2 byte value that is safe to ignore as 0 short paraIgn = LittleEndian.getShort(rawContents,pos); pos += 2; In fact it stores the

Re: hslf textbox alignment

2006-08-18 Thread Yegor Kozlov
Hi, CdM Is there a way to do horizontal alignment in a CdM org.apache.poi.hslf.model.TextBox? I want to center the text inside the textbox CdM horizontally but I only found a method setVerticalAlignment. It looks like the get/set methods for horizontal alignment are missing. It's not hard to

Re: slide 2 image

2006-09-01 Thread Yegor Kozlov
Look at http://tonicsystems.com/. The claim their Java API can render slides into JPEG or PDF. SG Hi, SG I'm very new to poi. I'm looking for any code snippet, documentation SG of hint how to render a slide to a image. SG Can anyone give a hint? SG Thank you very much! SG Stefan SG

Re[2]: AW: Reading numeric values as strings from a cell

2006-09-07 Thread Yegor Kozlov
Hi, For numerical cells the code is like this: HSSFWorkbook wb = ...; HSSFDataFormat dataformat = wb.createDataFormat(); double value = cell.getNumericCellValue(); //get the cell value HSSFCellStyle style = cell.getCellStyle(); short idx = style.getDataFormat(); //get format pattern for

Re[2]: org.apache.poi.hslf.model.ShapeGroup - getShapes()

2006-09-26 Thread Yegor Kozlov
What shapes do you have in the slide? Text boxes, rectangles or something more complex, for example, polygons or custom shapes? NB On Tue, 26 Sep 2006, Erez Eisenstein wrote: class java.lang.ClassCastException - org.apache.poi.ddf.EscherOptRecord java.lang.ClassCastException:

Re: Problem Getting Grouped Images

2006-10-09 Thread Yegor Kozlov
Hi, Groupped image is just a shape inside another shape. Image extraction should work fine for it. Can you attach the ppt file? It's the easiest way to see what's wrong. Regards, Yegor G Hi POI Users, G I'm extracting images from a powerpoint file, but when I group the images G and try

Re: creating a table in PPT using POI -HSLF

2006-10-24 Thread Yegor Kozlov
Hi Currently tables are not supported by HSLF. You are right, a table in PowerPoint is a group of rectangles and lines plus some special info about rows/columns. We know how PowerPoint stores this information, just need time to implement. Regards, Yegor pb Hi, pb Is it possible to create a

Re: documentation - POI - PPT

2006-11-08 Thread Yegor Kozlov
Hi, PPT file format is not documented. What we learn about it we put in the following doc: http://jakarta.apache.org/poi/hslf/ppt-file-format.html It's far from complete, as always other tasks have higher priority then documenting :). Some time ago MSDN (prior to 1998) contained partial docs

Re[2]: (POI/PPT) NullPointerException - EscherTextboxWrapper

2006-11-21 Thread Yegor Kozlov
Should I open a new bug in bugzilla? Yes, I would like to look at it. NB Yegor - any thoughts on if it's our fault that Shape.getEscherChild is NB returning null, or if it's a nasty powerpoint feature we need to NB work around? Could it be a text box without text records, i.e

Re: error with getSlideNumber()

2006-11-30 Thread Yegor Kozlov
Hi, Make sure you are using the latest POI jar. We fixed this bug some time ago. Daily builds are available at http://encore.torchbox.com/poi-cvs-build/. If the problem persists, could you create an issue in bugzilla and attach your test ppt? Regards, Yegor DPN

Re: PPT Unicode

2006-12-05 Thread Yegor Kozlov
Hi, Could you provide a test case? As I understood you did something like this: - take a ppt file with a text. - programmatically change the text using HSLF API - save file - style information is wrong after save. Is it correct? Yegor TPN Hi List, TPN When PowerPoint stores text

Re: POI, Excel, charset 1251

2006-12-12 Thread Yegor Kozlov
Use unicode. http://jakarta.apache.org/poi/faq.html#faq-N100A4 FAQ #11. Regards, Yegor IS hi ! IS my Java program create Excel file where i tried fill in cell by Cp1251 (rus/cyrilic) string charcode IS but in Excel app this strings looks like this :

Re: CorruptPowerPointFileException

2006-12-19 Thread Yegor Kozlov
Hi We are investigating this problem. See http://issues.apache.org/bugzilla/show_bug.cgi?id=41176 You can attach the file to this bug. Do you know what software was used to produce this file? PowerPoint or OpenOffice or whatever else? Anything special about this file? Yegor EG Hi EG I get

Re: [HSLF] Bug 40143 - Font size

2006-12-21 Thread Yegor Kozlov
Hi We remember about this bug. I did some investigation into it but as usual, was diverted by other tasks :). After Christmas I will have a week to review HSLF code and fix this bug. Thank you for reminding us. Yegor TPN Hi List, TPN any news about bug #40143 TPN

Re: Master sheet handling

2006-12-25 Thread Yegor Kozlov
Hi Could you describe the problem in details? We don't yet support bullets and numbered lists. How did you access the bullets info? It would be good if you attach the problem to bugzilla. I will take a look at it. Regards, Yegor EG Hi EG Is it a known problem that master sheets are not

Re[2]: Master sheet handling

2006-12-26 Thread Yegor Kozlov
sheets' bullets are not recognized by HSLF. EG Hope I made myself clearer. EG -Original Message- EG From: Yegor Kozlov [mailto:[EMAIL PROTECTED] EG Sent: б 25 гцобш 2006 14:20 EG To: POI Users List EG Subject: Re: Master sheet handling EG Hi EG Could you describe the problem in details

Re: ArrayIndexOutOfBoundsException in TextRun

2006-12-26 Thread Yegor Kozlov
Hi Exceptions are not supposed to be thrown. Please post the bug. If possible, attach the ppt file. Regards, Yegor EG Hi EG I have several PPT presentations that cause an EG ArrayIndexOutOfBoundsException to be thrown. EG Before I open a bug in bugzilla, I wanted to know whether this is EG

Re: I am writing an PowerPoint viewer....

2007-01-04 Thread Yegor Kozlov
Line has enough info to translate ppt commands into Java graphics calls. The sample code is below. public void draw(Graphics2D graphics, Line line){ java.awt.Rectangle anchor = line.getAnchor(); Color color = line.getLineColor(); if (color != null){

Re: Problem with AutoShape.....

2007-01-05 Thread Yegor Kozlov
See the tutorial on how to work with shapes in HSLF: http://jakarta.apache.org/poi/hslf/how-to-shapes.html Yegor f8 hi to all... I am new of the forum... f8 I am trying to extract the autoshapes from a slide for then to paint them in f8 a Graphics2D.. f8 the code that I used ... f8 for

Re: spreadsheet with form elements getting corrupt with poi 3.0

2007-01-12 Thread Yegor Kozlov
Hi, Make sure you are using the latest POI jar. Looks like we fixed similar issue recently. If the problem persists, please create a bug in bugzilla and attache to it the ppt and sample code which produces the error. Regards, Yegor SJ I am generating a spareadsheet by reading off a template

Re[2]: What is the state of the project?

2007-02-05 Thread Yegor Kozlov
I doubt if there are any pure Java VBA interpreters. (there can be implementations based on various Java-COM bridges). Creating a VBA interpreter is out of scope of the POI HSSF project but some really useful functionality can be added. I mean to add the following: - read VBA modules using POI.

Re: Embedded images

2007-02-06 Thread Yegor Kozlov
The problem is that the cell width and height don't seem to be measured in the same units. Exactly. Excel anchores objects against top-left and buttom-right cells. In addition it uses dx and dy for fine positioning relative to these cells. So to get the correct aspect ratio you need to know the

Re[2]: Embedded images

2007-02-08 Thread Yegor Kozlov
into it on the weekend. Yegor SJ On 07/02/07, Yegor Kozlov [EMAIL PROTECTED] wrote: The problem is that the cell width and height don't seem to be measured in the same units. Exactly. Excel anchores objects against top-left and buttom-right cells. In addition it uses dx and dy for fine

Re: hslf way of getting slideshow text language

2007-02-09 Thread Yegor Kozlov
4010 is TextSpecInfoAtom. It stores special format runs that can't be described by normal style records. For example, if a part of a string is a hyperlink this info is stored in TextSpecInfoAtom. AFAIK it has nothing to do with the language information. Yegor CG Hi all, CG I am searching for a

Re[2]: hslf way of getting slideshow text language

2007-02-13 Thread Yegor Kozlov
h This led me to believe that this atom holds the information I seek. It h is also the only place that language information in mentioned in the h spec. Even if I am wrong, is there any knowledge as to where language h ID for the text runs is held? Right now I am experimenting with h

Re: Computing anchor size for easy image insertion?

2007-02-19 Thread Yegor Kozlov
There isn't an easier way do scale images. There was a discussion recently about scaling. Excel measures images in units of 1/256th of a character width of the default font. Conversion from these weird units to pixels is not trivial. It's the main problem. I have ideas how to add such support.

Re: Need to merge PPTs

2007-02-26 Thread Yegor Kozlov
Hi, Unfortunately merging ppt slides is not as simple. PPT format has a global area where it stores the data shared among slides such as image data, fonts, etc. If you copy a slide with an image you must put the image data into this global area. The same thing is with text boxes. While copying

HSSF Announcement: column autofit is implemented

2007-02-26 Thread Yegor Kozlov
be not correct. Regards, Yegor Kozlov - To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/

Re[2]: HSSF Announcement: column autofit is implemented

2007-02-28 Thread Yegor Kozlov
columns that are wider than TA required? I mean that I don't want to shrink the columns that can show there TA content even if they are wider than max width of content. TA Wassalam, TA Tahir -Original Message- From: Yegor Kozlov [mailto:[EMAIL PROTECTED] Sent: Monday, February 26, 2007

Re[2]: Create Cell comments

2007-03-15 Thread Yegor Kozlov
Hi, p Is it already available in version 3 alpha? I can't find in the API p documentation and also when I tried, there is an error. Yes, cells comments are available in 3 alpha. What was the error? Regards, Yegor - To

Re: [POI- HSSF] Alignment issue in sizing the Cell automatically

2007-03-21 Thread Yegor Kozlov
Hi, The POI 3.0 RC1 can be downloaded from http://people.apache.org/~nick/POI-3.0-RC1/ HSSFSheet.autoSizeColumn was added after 12-Dec-2006. Try the latest jar. Regards, Yegor VK Hi all, VK I'm new to this group. I'm trying to generate MS Excel from my java code. VK I'ts

Re[2]: problems with POI build

2007-03-23 Thread Yegor Kozlov
I use JDK 1.4.2 and JDK 1.5. To build POI users need JDK 1.4 or greater. It should be reflected it the docs somehow. Compilation under JDK 1.3 fails. I've just tried it and got 68 errors. Does it concerns you? Yegor AO Which JDK? AO Yegor Kozlov wrote: Hi, I don't quite understand what's

Re[2]: [POI- HSSF] Alignment issue in sizing the Cell automatically

2007-03-23 Thread Yegor Kozlov
Please help me in this regard, VK Thanks, VK Vinay VK On 3/21/07, Yegor Kozlov [EMAIL PROTECTED] wrote: Hi, The POI 3.0 RC1 can be downloaded from http://people.apache.org/~nick/POI-3.0-RC1/ HSSFSheet.autoSizeColumn was added after 12-Dec-2006. Try the latest jar. Regards

Re: PPT Error on Writing Presentation

2007-03-26 Thread Yegor Kozlov
Create a bug in bugzilla and attach the ppt. We already had similar issues. So far we considered them as anomalies that are rare to happen. But now I'm inclined to think it's normal. Attach the file and we will see what can be done. Regards, Yegor HN Hi HN I am working with POI to manage some

Re: POI and Powerpoint Tables

2007-03-26 Thread Yegor Kozlov
Hi, Tables are not yet supported. I hope to implement it during this year. If it is now possible, is it simply a matter of creating a ShapeGroup and adding TextBox's at the appropriate grid coordinate. You can do it, but PPT won't recognize this group of shapes as Table. Table is a complex

Re[2]: Getting class file has wrong version error on poi-scratchpad-3.0-rc2 jar

2007-03-30 Thread Yegor Kozlov
Very strange. We have this setting in build.xml and it is -target 1.3! We should be compatible with 1.3+ JVMs. Nick, are you using the standard build.xml? Which JDK? Regards, Yegor AS even if compiling in 1.5, there is a setting to use backward compatible AS classfile format. We should just

Re: HSLF - Adding Picture is 133% of actual size

2007-03-30 Thread Yegor Kozlov
Hi, It's a bug. Before setting coordinates for a picture we need to convert from pixels (96 dpi) to points (72 dpi). Missing this results in the 1.33 factor. I will upload the fix today. Thanks for the report. Regards, Yegor HN Hi HN I'm adding a picture to new slideshow and it always seems

Re[2]: Auto fit height of cell values in MS Excel

2007-04-04 Thread Yegor Kozlov
Hi, You should turn on word wrapping. Create a cell style with setWrapText(true) and assign it to the cell. Yegor AB Hi all, AB Actually, I intend to make the height to fit the value of the cell. AB With best regards, AB Anjishnu. AB -Original Message- AB From: Anjishnu

Re: What is the correct method to read a large excel file line by line?

2007-04-10 Thread Yegor Kozlov
Hi, Current implementation reads the whole document into memory. There is no way to read excel files line by line. Regards, Yegor LS Using HSSF, what is the correct method to read large excel files line by LS line? LS In my real world situation the excel file will be very large, over 100 LS

Re[2]: Encryption/password protected excel/word files

2007-04-17 Thread Yegor Kozlov
I wonder if Microsoft uses encryption compatible with javax.crypto.*. If yes, we have a chance to decode it. Otherwise it is not worth the trouble. Yegor NB On Tue, 17 Apr 2007, Justin Warren wrote: I should mention that the exceptions don't really tell if the files are password protected or

Re: HSSFComment?

2007-04-28 Thread Yegor Kozlov
What release are you using? Try the latest RC3. You can download it from http://people.apache.org/~nick/POI-3.0-RC3/ HSSFComment is there. Regards, Yegor HL Hi everyone, HL I am having trouble locating HSSFComment in the current POI's HSSF HL release. There is already a HOW-TO on the site

Re: HSSFComment?

2007-04-28 Thread Yegor Kozlov
What release are you using? Try the latest RC3. You can download it from http://people.apache.org/~nick/POI-3.0-RC3/ HSSFComment is there. Regards, Yegor HL Hi everyone, HL I am having trouble locating HSSFComment in the current POI's HSSF HL release. There is already a HOW-TO on the site

Re: hi all regarding introducing new methods

2007-05-02 Thread Yegor Kozlov
Hi, Follow instructions at http://jakarta.apache.org/poi/getinvolved/index.html Regards, Yegor RM Hi all RM i want to contribute to POI - HWPF RM Actually how i need to include my method in to API RM and what is the actual procedure RM what are all the conditions by jakarta.apache.org

Re: Why autoSizeColumn probably needs java.awt.headless=true

2007-05-04 Thread Yegor Kozlov
Rober, To calculate column width HSSFSheet.autoSizeColumn uses Java2D classes that throw exception if graphical environment is not available. However, some tasks such as computing text layout can be done in a headless mode, that is in the absence of graphical environment. To use headless mode

Re: HSSF SUM Formula support

2007-05-21 Thread Yegor Kozlov
http://jakarta.apache.org/poi/hssf/formula.html Hello First let me say that I use HSSF and it's realy fantastic staff. Is it possible to make formula cell like =SUM(B1:B5)? Thanks - To unsubscribe, e-mail: [EMAIL