Skip to main content
Inspiring
September 7, 2021
Question

Error message trying to justify text in Acrobat

  • September 7, 2021
  • 1 reply
  • 695 views

Hello everyone,

 

I´m trying to justify a text, and I´m using the inverted slashes to escape the inverted commas inside the text, but still, the debugger keeps saying I have a problem of "unterminated string".

Can you please take a look and tell me what I may have done wrong, because for me everything seems OK.

Here is a picture of part of the text. The problematic part is highlighted.

Thanks you very much in advance!

This topic has been closed for replies.

1 reply

radzmar
Community Expert
Community Expert
September 7, 2021

Please post the entire script, not just a portion. 

Inspiring
September 7, 2021

This is the full script:

 

var spans = [{

alignment: "justify",

fontFamily: ["MouseMemoirs"],

fontStyle: "normal",

fontWeight: 100,

text: "The energy giant Royal Dutch Shell has announced it has passed its peak
production of oil. The days of increasing oil production are over and the
decline in output has started. Shell said in a press release that, \"+oil
production peaked in 2019+\". The \"+high point+\" of Shell+\'+s oil production
reached around 1.7 million barrels per day. It now expects an annual
drop of up to two per cent per year. The fall comes a year ahead of
Shell+\'+s initial forecasts. In 2015, the company predicted the peak of
global oil demand would be in 2020. The announcement included news
that Shell would reduce the number of its oil refineries from 14 sites to
six. This means the loss of around 9,000 jobs, or more than 10 per cent
of its workforce.
Shell said it is shifting its focus onto renewables and reducing its carbon
footprint. It pledged to achieve net-zero carbon emissions by 2050. The
company said it wants to diversify into becoming an energy provider
rather than relying on fossil fuels. It has been actively exploring new,
green technologies such as carbon capture. It has also been buying
companies that provide electric vehicle charging stations. Shell CEO Ben
van Beurden vowed to create half a million EV charging points by 2025.
He said: \"We must give our customers the products and services they
want - products that have the lowest environmental impact. We
will...grow in markets where demand for cleaner products and services is
strongest.\"",

textColor: ["RGB", 0, 0, 0],

textSize: 18

}]

this.getField("Texto1").richValue = spans;