Skip to main content
atabake79414131
Participant
May 22, 2017
Question

can i make superscript characters in "Adobe Acrobat Pro DC" ??

  • May 22, 2017
  • 4 replies
  • 25155 views

I need to know urgently if there is a possibility to make superscript characters or numbers in Adobe Acrobat Pro DC? Thanks!!

This topic has been closed for replies.

4 replies

atabake79414131
Participant
May 22, 2017

it works. thanks a lot!

JR Boulay
Community Expert
Community Expert
May 22, 2017

First you must tick the "Allow Rich Text formatting" option.

When typing, hit ctrl-E* to display the "Form Field Text Properties".

* cmd-E on MacOS

Acrobate du PDF, InDesigner et Photoshopographe
atabake79414131
Participant
May 22, 2017

thank you!

atabake79414131
Participant
May 22, 2017

Hey! Thanks.

I am working with form fields and would like to put superscript numbers behind certain words.

That means if possible after i created them on the pdf.

is there chance at all? i cant even copie and paste the numbers from somewhere else into the pdf...

there must be a way!!

try67
Community Expert
Community Expert
May 22, 2017

Go to the field's Properties, and under the Options tab tick the "Allow Rich Text Formatting" box.

Now exit the Form Edit mode, click into the field and press Ctrl+E. A properties toolbar will open with various settings. One of them is to set the text as superscript.

Bernd Alheit
Community Expert
Community Expert
May 5, 2020

You are right I exagerated!  

 

I will show a picture. 

 

 

The first date (see image in yellow) works fine. The date is taken from a calander. 

 

Here is the script to add the er in superscript for the first date

 

var oDateValue = util.scand("d/mmmm/yyyy",this.getField("Date1_af_date").valueAsString);

var nJours = util.printd("d", oDateValue);
var cMois = util.printd("mmmm", oDateValue);
var nAnnee= util.printd("yyyy", oDateValue);

var DateComplete = nJours+ " "+cMois+ " "+nAnnee;
var MoisAnne = " "+ cMois + " "+ nAnnee;


var g = this.getField("DatteLettres_af_date");


if (nJours ==="1" && cMois !="")

{
// Create an array to hold the Span objects
var spans = new Array();
// Each Span object is an object, so we must create one
spans[0] = new Object();
spans[0].text = nJours;
spans[1] = new Object();
spans[1].text = "er";
spans[1].superscript = true;
spans[2] = new Object();
spans[2].superscript = false;
spans[2].text = MoisAnne.toLowerCase();
}

 

else{


event.value = DateComplete.toLowerCase();

}

// Now assign our array of Span objects to the field using
// field.richValue
g.richValue = spans;

 

For the second one, I have some issues. 

 

The text for the letter comes from an acroDialog. This allows to easily change the letter template. 

I applied some scripting and replace some terms with some variable results to update the letter.

 

End of script to display info into the letter:

 

var NewTexteLettre1_v = "";


NewTexteLettre1_v = TexteLettre1_v.replace(/AfficherPolitesseDeLaLettre/g,PolitesseArray1).replace(/AfficherDateOuverture/g, dateOuvertureR).replace(/AfficherMontantSansLotsAdjudicataireDeLaLettreSansQualite/g,NewMontantSSLotsAdj).replace(/AfficherGarantieDeLaLettre/g,AfficherGarantieL1).replace(/AfficherNonConformiteOuAdmissibiliteDeLaLettre/g, AfficherConformite1).replace(/AfficherAdjudicataireSSLotsQual/g,AdjudicataireSSLotsQual).replace(/AfficherLotsEtMontantsAdjudicataireDeLaLettreSansQualite/g,LotMontantAdjL1).replace(/AfficherLotsEtMontantsAdjudicataireAvecLotsSansQualite/g,TousAdjudicataireLots).replace(/AfficherNoteQualiteAvecQualiteSansLotsDeLaLettre/g,NoteQual1).replace(/AfficherMontantAdjQual/g,MontantAdjQual).replace(/AfficherMontantAjusteQual/g,PrixAjusteQual).replace(/AfficherRangNonAdj/g,rangLettre1R).replace(/AfficherNoteQualitéAdjudicataire/g,NoteQualAdj).replace(/AfficherSignataire/g,Signataire).replace(/AfficherTitreSignataire/g,TitreSignataire).replace(/AfficherInitiales/g,Initiales).replace(/AfficherMontantSansLotsAdjudicataireAvecQualite/g, MontantSSLotsAdjQualL1).replace(/AfficherMontantAjusteSansLotsAdjudicataireAvecQualite/g,MontantAjSLASAQL1).replace(/AfficherAdjudicataireSansLotsSansQualiteOuAvec/g,SoumisionnaireSSLots).replace(/AfficherAutresAdj/g,AfficherAutresL1).replace(/AfficherDuouDes/g,afficherDuouDesL1);

 


event.value = NewTexteLettre1_v;

 

My challenge:

 

How could I add the er in superscript in the letter?  I know how to add er but not in superscript in the second example, and I don't want to manually configure the letter like I did for the first date because there is a lot of info in the text field coming from the acrodialog. 

 

I think I would need to use something like this but I don't know how to adapt it to. Also where should i place the adapted  script, in the personalized format script?

 

Info from API reference 2017

// Custom Keystroke event for a rich text field.
var span = event.richChange;
for ( var i=0; i<span.length; i++)
{
span[i].text = span[i].text.toUpperCase();
span[i].underline = !span[i].underline;
span[i].textColor = (span[i].underline) ? color.blue : color.red;
}
event.richChange = span;

 

Hopefully I can get some help.   Thanks

 


Split the text in 2 spans and insert the span for "er".

JR Boulay
Community Expert
Community Expert
May 22, 2017

Superscript where?

  • Form fields?
  • Layout?
  • Comments?
Acrobate du PDF, InDesigner et Photoshopographe