Sign In  Sign Up Live-Chat

Image FixWith and FixHeight won't work in Table Cell.

Last post 05-19-2008, 10:20 AM by Sandy.Zhang. 2 replies.
Sort Posts: Previous Next
  •  05-15-2008, 3:28 AM 127121

    Image FixWith and FixHeight won't work in Table Cell.

    Hello,
    i have an Image in a table cell with "setFixWidth" and "setFixHeight" but the Image gets the width and height from the table cell not from the ImageInfo.

    My Code:
                Table table = new Table(sec1);

                table.setColumnWidths("150 150");
              
                //add a row
                Row row1 = new Row(table);
                table.getRows().add(row1);
              
                Cell cell11 = new Cell(table, "some text");
                row1.getCells().add(cell11);
              
                Cell cell12 = new Cell(table,"some more text");
               
                Image img2 = new Image(sec1);
                img2.getImageInfo().setFile("c:/temp/testImage.jpg");
                img2.getImageInfo().setFixWidth(100);
                img2.getImageInfo().setFixHeight(50);
                cell12.getParagraphs().add(img2);
               
                row1.getCells().add(cell12);
              
                //add another row
                Row row2 = new Row(table);
                table.getRows().add(row2);
              
                Cell cell21 = new Cell(table,"another some text");
                row2.getCells().add(cell21);
              
                Cell cell22 = new Cell(table,"another some more text");
                row2.getCells().add(cell22);
              
                //add table to sec1
                sec1.getParagraphs().add(table);

    Thanks for help
    vland
     
  •  05-15-2008, 12:12 PM 127264 in reply to 127121

    Re: Image FixWith and FixHeight won't work in Table Cell.

    Hi,

    I have tested this code and was able to reproduce the error. I have logged this as PDFJAVA-5154 in our issue tracking system. We will try our best to resolve this as soon as possible.

    Thanks.

     
  •  05-19-2008, 10:20 AM 127701 in reply to 127264

    Re: Image FixWith and FixHeight won't work in Table Cell.

    Attachment: Present (inaccessible)
    Hi,
      we have resolved this problem. You can get the hotfix in the attachment. We will release a new version at the end of this month. This function will be included in that release. Thank you for considering our product.

    Sandy.Zhang
    Product Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
View as RSS news feed in XML