You need to explicitly set the correct MIME type when embedding the file into the PDF. This is especially important for standards like PDF/A-3 and Factur-X, which require strict metadata and MIME type declarations for embedded files.
The default value /application/octet-stream is too generic and not compliant for XML attachments.
When a Pdf document contains TextBoxFields some of which are hidden and you merge it with another document, the hidden state is reset and the field appears in the merged document:
Before:
After:
System.ArgumentException: 'An item with the same key has already been added. Key: Telerik.Windows.Documents.Fixed.Model.InteractiveForms.RadioButtonField'
It is reproducible when you have at least 2 pages with RadioButtonFields. The import operation goes smoothly. However, merging or removing a page after import leads to the described error.
InvalidCastException is thrown when importing a document with a structure element with an indirect reference to an integer value.
InvalidCastException: 'Unable to cast object of type 'Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Types.PdfInt' to type 'Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Elements.MarkedContents.StructElementObject'.'
Registering the font used to be enough for resolving the font's characters in .NET Standard
byte[] fontData = File.ReadAllBytes(".\\files\\cour.ttf");
FontFamily courierNewFont = new FontFamily("Courier New");
FontsRepository.RegisterFont(courierNewFont, FontStyles.Normal, FontWeights.Normal, fontData);However, as of version 2024.2.426 registering the font doesn't produce the correct result anymore and the text got missing in the PDF fields. When the document is opened in Adobe, the following message appears:
The FontsProvider works in both versions (before and after 2024.2.426). It is also required to iterate all widgets and apply the font explicitly to the widget.TextProperties.Font property.