Shape filled Picture

Posted by: ravi.jasti on 4 August 2019, 5:28 pm EST

  • Posted 4 August 2019, 5:28 pm EST

    We have PDF report in which we have to show picture in each page .
    so we wrote a logic in java By using a Excel file as a template ( attached) and fill the data ..

    but i have found some issues which are as follows
    1 . Not able fill shape with picture
    2. Not able to insert picture with auto fit page

    can u help me how to solve this issue ,

    pdf_template_request.zip
  • Replied 5 August 2019, 10:24 pm EST

    Hello Ravi,

    Could you please share what logic did you use? Which code did you use to fill shape with picture?

    Please share your use case with us so that we can investigate this issue further.

    Thanks,
    Reeva
  • Replied 6 August 2019, 3:53 pm EST

    InputStream stream =new FileInputStream("Image Path");
    try {
    print("Shapes Count : "+dataSheet.getShapes().getCount());
    // Add a rectangle
    IShape rectangle = dataSheet.getShapes().get(0);//.addShape(AutoShapeType.Rectangle,1,50, 400, 400);
    rectangle.setTitle("Some Random name");
    rectangle.setName("Some Random name");
    // Set picture fill
    if(rectangle!=null) {
    print("Shape is avaliable");
    }else
    print("Shape is not avaliable");

    // rectangle.getFill().userPicture(stream, ImageType.PNG);
    rectangle.getFill().userTextured(stream, ImageType.PNG);


    } catch (Exception e) {
    e.printStackTrace();
    }


    Also Name and Title of Shape is not showing in output
  • Replied 7 August 2019, 9:25 pm EST

    Hello,

    We are able to replicate the issue wherein name and title of shape is not displaying in exported pdf/ xlsx and hence we are escalating the same to the concerned team for the fix.
    Tracking id for your issue is #DOCXLS-1376

    We will update you as soon as we hear anything from our concerned team.

    Thanks,
    Reeva
  • Replied 15 August 2019, 10:07 pm EST

    Hello,

    Our developers have fixed your issue and it will be out in next release but we don't have any ETA for the same.

    Thanks,
    Reeva
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels