Introduced in version 2025.4.1104.
Works OK in the previous version.
StackTrace:
at Telerik.Windows.Documents.Utilities.Guard.ThrowExceptionIfTrue(Boolean condition, String message)
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Types.IndirectObject.get_Content()
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Export.PdfExportContext.BeginExportIndirectObject(IndirectObject indirectObject, Int64 offset)
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Types.IndirectObject.Write(PdfWriter writer, IPdfExportContext context)
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Export.PdfExporter.WritePendingIndirectObjects(IPdfExportContext context, PdfWriter writer)
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Export.PdfExporter.WriteFontsFromContext(PdfWriter writer, IPdfExportContext context)
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Export.PdfExporter.Export(IRadFixedDocumentExportContext context, Stream output)
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.PdfFormatProvider.<>c__DisplayClass21_0.<ExportOverride>b__0()
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.ExceptionHandling.ExecutionHandler.TryHandleExecution[E](Action operation)
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.PdfFormatProvider.ExportOverride(RadFixedDocument document, Stream output, CancellationToken cancellationToken)
at Telerik.Windows.Documents.Common.FormatProviders.FormatProviderBase`1.Export(T document, Stream output, Nullable`1 timeout)
This is the code for import/export which result is illustrated below:
string inputFilePath = "test1.doc";
Telerik.Windows.Documents.Flow.Model.RadFlowDocument document;
Telerik.Windows.Documents.Flow.FormatProviders.Doc.DocFormatProvider doc_provider = new Telerik.Windows.Documents.Flow.FormatProviders.Doc.DocFormatProvider();
using (Stream input = File.OpenRead(inputFilePath))
{
document = doc_provider.Import(input, TimeSpan.FromSeconds(10));
}
Telerik.Windows.Documents.Flow.FormatProviders.Docx.DocxFormatProvider docx_provider = new Telerik.Windows.Documents.Flow.FormatProviders.Docx.DocxFormatProvider();
string outputFilePath = "Exported.docx";
using (Stream output = File.OpenWrite(outputFilePath))
{
docx_provider.Export(document, output, TimeSpan.FromSeconds(10));
}
Process.Start(new ProcessStartInfo() { FileName = outputFilePath, UseShellExecute = true });This results in a missing paragraph. For example, having a table with three cells and Page field in the footer of a document and exporting it to PDF, will not export the last paragraph.
As a workaround add new run after the last field character in the cell's table before exporting the document to PDF.
BlockCollection footerContent = this.document.Sections.First().Footers.Default.Blocks;
Table footerTable = footerContent.First() as Table;
var cells = footerTable.Rows.Last().Cells.Where(x => x.EnumerateChildrenOfType<FieldCharacter>().Any());
foreach (var cell in cells)
{
cell.Blocks.AddParagraph().Inlines.AddRun();
}In WordsProcessing on import only the lower case CSS attributes are correctly imported. Upper case and mixed case are ignored and the default values are used.
The calculations are wrong, leading to single lines on a page. As a result, the content of the PDF document is laid out on a bigger number of pages.
Workaround: Change the line spacing and its type before exporting to PDF:
foreach (var paragraph in this.document.EnumerateChildrenOfType<Paragraph>())
{
HeightType? heightType = paragraph.Properties.LineSpacingType.GetActualValue();
if (heightType == HeightType.Exact || heightType == HeightType.AtLeast)
{
paragraph.Properties.LineSpacingType.LocalValue = Telerik.Windows.Documents.Flow.Model.Styles.HeightType.Auto;
paragraph.Properties.LineSpacing.LocalValue = 2;
}
}
The exception is thrown because we try to export a tblGrid element, but currently we do not support this: https://feedback.telerik.com/Project/184/Feedback/Details/190082-wordsprocessing-export-tblgrid-table-grid-property-for-table-elements
Importing a document containing a bookmark located in a structured document tag (sdt) will lead to ArgumentNullException.
Import of Tables with border style needs improvements. Currently, it takes multiple seconds to import table with 100x6 cells no matter if the border style is defined globally or locally. This may be seen when importing the attached files "table with borders.html" and "table single border style.html". Importing the same table without borders is achieved in less than a second which may be seen with the attached "table without borders.html".
Hello support team,
We faced an exception that ShadingType 1 is not supported. Can you please confirm that this is expected?
Regards,
Vitalii