Hi,
I’m evaluating Aspose Words for custom XML binding and PDF conversion.
I have a custom XML with a date field that binds to a date control. While debugging I can see that the SDT properties are correct:
fullDate: Mon Jan 01 01:00:00 CET 2018
dateDisplayFormat: d’ de ‘MMMM’ de 'yyyy
dateStorageFormat: 0
But, when I convert the document to PDF, y get “2018-01-01” as the output instead of “1 de enero de 2018” (locale is Spanish).
I have tried changing the property isShowingPlaceholderText of the SDT and the fieldUpdateCultureSource option of the document to no avail.
How can I get Aspose to honor the date format stored in the Word document during the PDF conversion?
Here is the stored SDT:
<w:sdt>
<w:sdtPr>
<w:id w:val="-807625765"/>
<w:placeholder>
<w:docPart w:val="DefaultPlaceholder_-1854013438"/>
</w:placeholder>
<w:dataBinding w:prefixMappings="xmlns:ns0='http://www.codeoscopic.com/avant/2018/sign/XMLSchema' " w:storeItemID="{768CE43E-33AA-40B7-AC18-BBB8F02BD3A0}" w:xpath="/ns0:contract[1]/ns0:date[1]"/>
<w:date w:fullDate="2018-01-01T00:00:00Z">
<w:dateFormat w:val="d' de 'MMMM' de 'yyyy"/>
<w:lid w:val="es-ES"/>
<w:storeMappedDataAs w:val="date"/>
<w:calendar w:val="gregorian"/>
</w:date>
</w:sdtPr>
<w:sdtEndPr/>
<w:sdtContent>
<w:p w:rsidR="007F2F09" w:rsidRDefault="005B13C3">
<w:r>
<w:t>1 de enero de 2018</w:t>
</w:r>
</w:p>
</w:sdtContent>
</w:sdt>
Thanks in advance,
Alex