Skip to main content
tpk1982
Legend
May 26, 2016
Answered

Need to change font color

  • May 26, 2016
  • 2 replies
  • 3132 views

Hi All,

I am beginner of acrobat scripting.

My requirement is, i need to find font size more than 12 and change color to black. Not sure how to start my coding.

Please help.

Regards,

K

This topic has been closed for replies.
Correct answer Karl Heinz Kremer

As was already explained, you don't have access to text colors from within a JavaScript, there are also no actions you can apply. The only way to accomplish this is via the plug-in API. You can create your own plug-in, but I would advice against that because there are plug-ins available that perform this type of modifications. One that I am aware of is the Enfocus PitStop Pro preflight tool (unfortunately, this feature is not built into Acrobat's own Preflight tool). You can create a PitStop preflight profile that changes the color of text of a certain font size. PitStop is not cheap, but it's definitely cheaper than building your own tool.

2 replies

Karl Heinz  Kremer
Community Expert
Karl Heinz KremerCommunity ExpertCorrect answer
Community Expert
May 26, 2016

As was already explained, you don't have access to text colors from within a JavaScript, there are also no actions you can apply. The only way to accomplish this is via the plug-in API. You can create your own plug-in, but I would advice against that because there are plug-ins available that perform this type of modifications. One that I am aware of is the Enfocus PitStop Pro preflight tool (unfortunately, this feature is not built into Acrobat's own Preflight tool). You can create a PitStop preflight profile that changes the color of text of a certain font size. PitStop is not cheap, but it's definitely cheaper than building your own tool.

tpk1982
tpk1982Author
Legend
May 26, 2016

Thanks Karl Heinz Kremer

Sure i will try this with Pitstop, also is it possible to give overprint for text if text size is bigger than 24 and black is the applied color?

Karl Heinz  Kremer
Community Expert
Community Expert
May 26, 2016

You might be able to do that. It's been a while since I've used PitStop for that. They have a evaluation version, so you should be able to determine that before you pay for the solution.

try67
Community Expert
Community Expert
May 26, 2016

Are you talking about text in a form field or a comment, or in the actual static contents of the file? If the latter then it's not possible to do that using a script.

tpk1982
tpk1982Author
Legend
May 26, 2016

Thanks for your prompt reply.

Yes it's for my static text in PDF. It have 124 pages, i manually changing colors now

Can we use any action to achieve this?

try67
Community Expert
Community Expert
May 26, 2016

Not that I know of.