Merge fields problem

Hello,

I try to flatten fields from a pdf but all the text disappears. I use the following code :


<!–[if gte mso 9]>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:HyphenationZone>21</w:HyphenationZone>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>FR</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
<m:mathPr>
<m:mathFont m:val=“Cambria Math”/>
<m:brkBin m:val=“before”/>
<m:brkBinSub m:val="–"/>
<m:smallFrac m:val=“off”/>
<m:dispDef/>
<m:lMargin m:val=“0”/>
<m:rMargin m:val=“0”/>
<m:defJc m:val=“centerGroup”/>
<m:wrapIndent m:val=“1440”/>
<m:intLim m:val=“subSup”/>
<m:naryLim m:val=“undOvr”/>
</m:mathPr></w:WordDocument>
<![endif]–>

public static void FlattenAllFields(string pdf) {

using (Aspose.Pdf.Facades.Form pdfForm = new Aspose.Pdf.Facades.Form()) {

pdfForm.BindPdf(pdf);

if (pdfForm.FieldNames.Length > 0) {

     pdfForm.FlattenAllFields();</span></p>

pdfForm.Save(pdf);

}

}

}

Best regards,

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Tableau Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman","serif";}

<![endif]–>

Hi Fabien,


Thanks for contacting support.

I have tested the scenario using latest release of Aspose.Pdf for .NET 11.2.0 in VisualStudio 2015 project with .NET Framework 4.5.2 and I am unable to notice any issue. For your reference, I have also attached the resultant file generated over my end.

Can you please try using the latest release and share your findings.

Hello,

Thank you. I just open the attached pdf file but all text are missing !?
For example, can you read “BAUMIT SAS” in the field “Dénomination/sigle” ?

Best regards

Hi Fabien,


We are sorry for the confusion. I have tested the scenario again and noticed the reported issue of missing text in flattened PDF, so logged a ticket PDFNEWNET-40245 in our issue tracking system for further investigation and rectification. We will notify you as soon as it is resolved.

We are sorry for the inconvenience.

Best Regards,