Copy link to clipboard
Copied
I am almost there. I have Adobe Acrobat DC.
I can bring up the Java Console.
My file name is test.pdf
The text of about 100 pages is extremely light.
I can't figure out which code to put in the box so that it will turn all of my text to bold after hitting CTL + Enter.
I am very new at this.
Thank You for ANY help or DIRECTION you can provide.
No. That code was written for an HTML page. It can't be used for a PDF file.
Copy link to clipboard
Copied
You're not almost there. You aren't even close. Unfortunately, Acrobat JavaScript can't change the PDF page content. It's just not possible.
Copy link to clipboard
Copied
So, you are saying nothing from the below can be used???:
<html>
<head>
<script language="JavaScript"><!--
function bold(id) {
if (document.getElementById) {
document.getElementById(id).style.fontWeight = 'bold';
}
else if (document.all) {
document.all[id].style.fontWeight = 'bold';
}
}
//--></script>
<p id="myPara">
some sample text <span id="mySpan">this bit will turn bold</span> but this won't.
</p>
<form>
<input type="button" value="bold" onClick="bold('mySpan')">
</form>
</body>
</html>
Copy link to clipboard
Copied
No. That code was written for an HTML page. It can't be used for a PDF file.
Copy link to clipboard
Copied
There's a very good article at the link below that describes the JavaScript Core vs. Browser JavaScript vs. Acrobat JavaScript.
Learning to Program JavaScript for Adobe Acrobat - KHKonsulting LLC