Copy link to clipboard
Copied
Hello - I am still learning scripting.
I have a document that has small, placed pdfs and I want to be able to select the small pdf (it's about 1 x 2 inches, rectangle) and have a script add a leader line to the placed pdf. Imagine a comment box with a line and arrow head. Best if I could add lines to multiple placed pdfs at the same time.
Even better, if I could customize the location of the line depending on where the placed pdf is located on the page. For instance, if I have a placed pdf on the left, I'd want the line to come out of the pdf on the right side, middle of the rectangle.
Is there any scripts out there that could do something like this?
thanks in advance.
Copy link to clipboard
Copied
Are the .pdf files embedded or are they linked files?
Copy link to clipboard
Copied
Great question! They are linked. It's prefered that they stay linked, but is there a difference in the script if they are not?
Copy link to clipboard
Copied
It's not a scripting approach. It's a graphic style way.
Instruction:
- Download and unzip the file.
- Open a document that contains some linked .pdf files.
- In the Graphic Styles palette flyout menu, choose Open Graphic Styles library > Other Library and take the .ai file you have downloaded.
- Select one or all (ungrouped) linked .pdf files and apply one of the styles in the Style Library palette.
- Change the settings in the Appearance palette, if required.
Could certainly be improved, but you may check if this way could be useful.
Copy link to clipboard
Copied
Oh what an interesting way to do this! Thanks!
I'll test and report back ~ thanks kindly!
Copy link to clipboard
Copied
You can download an improved style library that contains 20 different leader line styles including arrowheads.
You can apply them to single linked files or simultaneously to multiple selected linked files.
You can also apply them to path objects, but you would first have to make sure that they are separate groups. That is, if you have for example 8 rectangles, each rectangle has to be a single grouped object. If you have multiple objects within one group the styles will be applied to the bounding box of the entire group.
As long as the styles are live they will adapt to the objects if you change their size. Also, you can tweak the style settings (e.g. position, angle or size of the leader lines).
Copy link to clipboard
Copied
Beautiful!
Copy link to clipboard
Copied
@Kurt Gold, out of curiosity, why do you have a MacOS version? What is different about the two?
- Mark
Copy link to clipboard
Copied
I'm not quite sure what you mean in this case, Mark.
Actually there is no specific Mac version. It's just a style library, independent from the OS.
Am I overlooking something?
Copy link to clipboard
Copied
Oh, I see. Please ignore my question. It's likely something to do with Google Drive's treatment of MacOS metadata or something. When I go to download your file via your link to Google Drive it looks like this inside your .zip file:
Now that I look at the file sizes, it is clearer that the MACOSX folder is just metadata (only 120 bytes).
So, just my ignorance in assuming you'd made platform-specific versions. Now I know.
Anyway great solution you came up with! Thanks!
- Mark
Copy link to clipboard
Copied
Yes, that is just an illusion. Can be ignored.