I need to insert an image (png/jpg) into a frame. But I am struggling with how to read the image in. Could you kindly review the below code and show me a way to fix it?
Hi Lohrii, could you kindly show me how to solve the problem? I tried to read in the image by Plotly but the place function doesn't work. Should I use the PlaceIntoFrame function? Please help, thanks!
Hi Lohrrialo,
I need to insert an image (png/jpg) into a frame. But I am struggling with how to read the image in. Could you kindly review the below code and show me a way to fix it?
app = win32com.client.Dispatch('InDesign.Application.CC.2019') myInddFile = r'C:\Users\zhijia\Documents\Robertjiang\Tracker\In-Design Project\Tracker Template_test_old.indd' myDocument = app.Open(myInddFile) myPage = myDocument.Pages.Item(1)
myRectangle = myPage.Rectangles.Add() myRectangle.GeometricBounds = ["6p", "6p", "18p", "18p"] myRectangle.StrokeWeight = 0 myRectangle.place('C:\Users\zhijia\Documents\Robertjiang\Tracker\In-Design Project\AA.jpg'')
The problem occurred at the end line of the above code. What I need is to
Could you kindly teach me how to achieve both in python please?
Great thanks!