Skip to main content
Participant
August 9, 2022
Question

Center an anchor element with the baseline of text

  • August 9, 2022
  • 1 reply
  • 132 views

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

This topic has been closed for replies.

1 reply

Robert at ID-Tasker
Legend
August 9, 2022

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