Center an anchor element with the baseline of text

New Here ,
Aug 09, 2022 Aug 09, 2022

Copy link to clipboard

Copied

Hi everyone,

I'm trying to develop an Adobe script that places a PDF inside a text element. The only problem I have is that the PDF placed is not "placed" vertically centered with the baseline of text.

 

E.g.: result liked: Lorem ipsum is <PLACED PDF>

                                                                      <PLACED PDF>

what Indesign does: Lorem ipsum is 

 

I'm using the option `FitOptions.FRAME_TO_CONTENT`. How can I center those elements knowing the baseline of the text?

 

If I have to include more PDFs (different sizes) into the text, and my text is composed by multiple lines, how could I manage the different values of baseline?

Best,

 

Lorenzo

TOPICS
SDK

Views

31

Likes

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
Advocate ,
Aug 09, 2022 Aug 09, 2022

Copy link to clipboard

Copied

LATEST

You need to change BASELINE value for each PDF - or more precisely - for the PARENT character.

---
Can automate anything - as long as it doesn't require A.I. 😉 and even then 3rd helping hand can be created 😉

Likes

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