-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Insert image into selected frame #5
Labels
Comments
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! |
@robertjiang77 the place method should start with an upper case |
And to fit content to frame
See, scripting reference line #802 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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!
The text was updated successfully, but these errors were encountered: