• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

script to add a line to a placed pdf in illustrator

New Here ,
Mar 25, 2022 Mar 25, 2022

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.

TOPICS
Scripting

Views

349

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Mar 25, 2022 Mar 25, 2022

Copy link to clipboard

Copied

Are the .pdf files embedded or are they linked files?

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 25, 2022 Mar 25, 2022

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 25, 2022 Mar 25, 2022

Copy link to clipboard

Copied

It's not a scripting approach. It's a graphic style way.

 

Leader Line Styles 1

 

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.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 25, 2022 Mar 25, 2022

Copy link to clipboard

Copied

Oh what an interesting way to do this! Thanks!

 

I'll test and report back ~ thanks kindly! 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 26, 2022 Mar 26, 2022

Copy link to clipboard

Copied

You can download an improved style library that contains 20 different leader line styles including arrowheads.

 

Leader Line Arrow Styles 1

 

leader_line_styles_arrows_001.png

 

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).

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 27, 2022 Mar 27, 2022

Copy link to clipboard

Copied

Beautiful!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 27, 2022 Mar 27, 2022

Copy link to clipboard

Copied

@Kurt Gold, out of curiosity, why do you have a MacOS version? What is different about the two?

- Mark

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 27, 2022 Mar 27, 2022

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?

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 27, 2022 Mar 27, 2022

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:

 

Screen Shot 2022-03-28 at 9.08.53 am.pngScreen Shot 2022-03-28 at 9.09.03 am.png

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 27, 2022 Mar 27, 2022

Copy link to clipboard

Copied

LATEST

Yes, that is just an illusion. Can be ignored.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines