Sign In  Sign Up Live-Chat

Aspose PDF JAVA Image in a Table Cell Alignment Right won't work

Last post 05-27-2008, 10:04 PM by Sandy.Zhang. 4 replies.
Sort Posts: Previous Next
  •  05-26-2008, 2:02 AM 128592

    Aspose PDF JAVA Image in a Table Cell Alignment Right won't work

    Hello,
    i have an Image in a Table Cell and i am trying to align it right, but it won't work.
    I am using aspose PDF for Java.

    My Code:
    ...
    Image image = new Image(sec1);

    imageInfo.setFile("c:/temp/test.jpg");

    ImageInfo imageInfo = image.getImageInfo();

    imageInfo.setAlignment(AlignmentType.Right);

    cell1.getParagraphs().add(image);
    ...

    thanks for help
    vland
     
  •  05-26-2008, 5:55 AM 128623 in reply to 128592

    Re: Aspose PDF JAVA Image in a Table Cell Alignment Right won't work

    Hi,
        The Cell class has provide more specific control for the position of the content. You can use the setPadding method to control the content's position. If you want the Image to be located at the right side of the Cell, you can call this code: cell.setPadding(0, 0, the_left_margin_you_want, 0) first.
        I hope this will help. Thank you for considering our product.

    Sandy.Zhang
    Product Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  05-26-2008, 6:03 AM 128625 in reply to 128623

    Re: Aspose PDF JAVA Image in a Table Cell Alignment Right won't work

    Hello,
    with the Text Paragraph it work.
    I think it's a bug and it also should work with the Image Paragraph.

    Example:
    ...
    Text text1 = new Text(sec1, "test text");

    TextInfo textInfo = text1.getTextInfo();

    textInfo.setAlignment(AlignmentType.Right);

    cell1.getParagraphs().add(text1);
    ...

    thanks for help
    vland
     
  •  05-26-2008, 6:27 AM 128629 in reply to 128625

    Re: Aspose PDF JAVA Image in a Table Cell Alignment Right won't work

    Hi,
    I have logged this as PDFJAVA-5195 in our issue tracking system. We will try our best to resolve this as soon as possible. 

    Thank you for your helpful advice.


    Sandy.Zhang
    Product Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  05-27-2008, 10:04 PM 128882 in reply to 128629

    Re: Aspose PDF JAVA Image in a Table Cell Alignment Right won't work

    Attachment: Present (inaccessible)
    Hi,
        According to your advice, we have resolved this problem. You can try the hotfix in the attachment.You can also download a new release from our web site several days later. We will release a new hotfix soon.

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