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

How to retrieve drop shadow details?

Explorer ,
Aug 12, 2022 Aug 12, 2022

Copy link to clipboard

Copied

Hi all , how to retrieve the details of drop shadow effects of the image in illustrator using script.

 

Thank you.

TOPICS
Scripting

Views

657

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
Explorer ,
Aug 13, 2022 Aug 13, 2022

Copy link to clipboard

Copied

Hi all, here I’ve attached the image, that image has been applied drop shadow , I want to retrieve the drop shadow details using script, can please anyone help me to get the solution.

 

IMG_20220813_154257.jpgThank you.

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 ,
Aug 13, 2022 Aug 13, 2022

Copy link to clipboard

Copied

Hi @Abpujar, as far as I know, you can't get the details of the drop shadow. You can set the drop shadow (using Live Effects), but once it is set, you cannot get it's details.

Maybe it would be possible to export the document as svg, then load the svg as text and derive the dropshadow details from the svg markup? I doubt it would work because it probably rasterizes the dropshadow. Maybe you could measure the dimensions of the rasterized dropshadow image and compare to the page item, and work out the size of the dropshadow? I doubt you could get an unambiguous result. Sorry not much hope from me. Maybe someone has an idea?

- 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
Explorer ,
Aug 14, 2022 Aug 14, 2022

Copy link to clipboard

Copied

Hi @m1b  thank you so much for the reply. We can apply drop shadow effect through script but how can we retrieve those details?? Please help me i didn't get any solution to retrieve drop shadow effect. 

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 ,
Aug 14, 2022 Aug 14, 2022

Copy link to clipboard

Copied

I think there is two ways to do that. But we need to remember that Ai adds raster effects to stroke.

Method 1

Just draw a transparent rectangle on image with 0,5 pt stroke and add effect. that can mimic shadow effect.

 

Method 2. 

  1. Place Image. Select it
  2. Go to Effects=Path-Outline Object 
  3. Open Appearance Panel and add stroke
  4. Add Drop shadow effects to that stroke. 

Screenshot 2022-08-14 221440.png

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 ,
Aug 14, 2022 Aug 14, 2022

Copy link to clipboard

Copied

Hi @Ares Hovhannesyan, very interesting! So you could read the strokeWeight of the shape as a proxy for the drop shadow size? Am I following you?

- 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 ,
Aug 15, 2022 Aug 15, 2022

Copy link to clipboard

Copied

Yes absolutely. and remember that dropshadow and many other effect are raster effect. 

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 ,
Aug 15, 2022 Aug 15, 2022

Copy link to clipboard

Copied

@Abpujar, is your script also applying the dropshadow? Or is it already there?

- 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 ,
Aug 15, 2022 Aug 15, 2022

Copy link to clipboard

Copied

you could save the file "uncompressed", then open the file with a text editor to see all details. Yes, you could do this with javascript as well.

 

dropShadowDetails.jpg

dropShadowDetails2.jpg

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
Explorer ,
Aug 15, 2022 Aug 15, 2022

Copy link to clipboard

Copied

Hi @m1b I’ve applied drop shadow manually to the image. now I want to retrieve the values through script.can you please help me.

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
Explorer ,
Aug 18, 2022 Aug 18, 2022

Copy link to clipboard

Copied

Hi all, we can apply angle and distance in drop shadow effect, can please anyone help me , how to apply angle and distance value of drop shadow effect here ?

 

xmlstring = '<LiveEffect name="Adobe Drop Shadow"><Dict data="R vert 7 R opac 0.75 B pair 1 R dark 100 R horz 14.655 R blur 5 I blnd 1 I csrc 0 "/></LiveEffect>';

 

app.documents[0].selection[0].applyEffect(xmlstring) ;

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
Explorer ,
Aug 22, 2022 Aug 22, 2022

Copy link to clipboard

Copied

Oooops!! I was comparing it with indesign. In indesign we can adjust the angle of the drop shadow using angle, but in illustrator we can adjust offset value to change the angle of the drop shadow.

 

Is there any solution to Retrieve Drop Shadow details through script? I didn’t find any solution . 

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
Explorer ,
Aug 30, 2022 Aug 30, 2022

Copy link to clipboard

Copied

LATEST

Anyone with the solution? 

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