This content has been marked as final. Show 5 replies
You create a new image object, but you also need to use the add() method somewhere to add it to the document. But you can't add() images like that. Instead, add a rectangle (as a container for the image), then place the image in it. Something like this:
r = app.activeDocument.pages.rectangles.add();
r.geometricBounds = ["4p8", "10p4", "6p0", "21p4"];
r.place (File ("~/Desktop/Master/images/LOGO.pdf"), false);
when i am trying your script. i am getting a black rectangular box. I am not getting any logo on my document. In my opinion it is taking default background color as black.
To solve this problem i tried to make second parameter of place as true
r.place (File ("~/Desktop/Master/images/LOGO.pdf"), true);
If you make true in place of false it will ask you option when you run the script. In that option transparent background is checked. I do not know why he is taking black as backgroung color. Please help me.
Have a loom at the pdfPlacePreference properties. I've never used them, but it looks as if that's what you need.
Where should i use pdfPlacePreference. I did not get what do you want to say.
Can you help me to write the script for this. I trying for last two day and did not come with good way to solve the problem.
A bit of rummaging around in the OMV (or any equivalent) shows that pdfPlacePreferences is a property of the application. Add therefore this line to your script:
app.pdfPlacePreferences.transparentBackground = true;