Skip to main content
williamr41166379
Participant
February 14, 2023
Question

Strikethrough merge variable not retaining strike

  • February 14, 2023
  • 1 reply
  • 578 views

Hi

We're using the Acrobat PDF Services API "Document Generation" to fill a Word document template with variables, and outputting a PDF.

 

Some of the merge tags include strikethroughs, (think a price being discounted shown as :

 

Was £100 Now £50
Our Word document would be

Was £{{price_was}} Now {{price_now}}

 

However when the PDF generates the strikethrough has been removed. Does the API support this?

This topic has been closed for replies.

1 reply

Ben Vanderberg
Community Manager
Community Manager
February 14, 2023

Hi @williamr41166379 ,

 

I was able to produce this effect. There isn't any reason you wouldn't be able to do this. More than likely it is something in Word. Sometimes things can be strange in Word it is stripping out styling, so try:

  1.  Add the Was: £{{BeforeTag}} 
  2. Add a space after the last }.
  3. Add the strikethrough for the tag and the space like this: {{BeforeTag}} .
  4. Then remove the space.

 

The other thing you can try is doing a character style.

 

 

Participant
February 16, 2023

Hi @Ben Vanderberg , on behalf of @williamr41166379 ,  this has fixed it for us! Thank you for your help