In a UWP program, I am trying to fill a pre-made PDF form using Syncfusion's PDF library.
I fill text fields using the following line: (form.Fields["Date"] as PdfLoadedTextBoxField).Text = date; //date is a string
This works so far.
The rest of the text in the PDF has a custom letter-spacing, which I would like to match in the date as well. In order to accommodate Rich Text, I have enabled this option when preparing the form in Acrobat Pro DC.
The format I would use is the following:
<?xml version="1.0"?>
<body xfa:APIVersion="Acroform:2.7.0.0" xfa:spec="2.1" xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">
<p dir="ltr" style="letter-spacing: -0.04cm; margin-top:0pt;margin-bottom:8pt;line-height:12.95pt;font-family:Calibri;font-size:11pt">Sample text</p>
</body>
In case I fill in this code to Acrobat Pro DC as the Default text, the formatting works just fine. As soon as I enter this code manually to the form, it just shows the code; the same happens when I use the C# code above.
What is the proper way of filling this code to the PDF?